var MetaMaskSDK=function(){"use strict";var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};
/*! *****************************************************************************
            Copyright (c) Microsoft Corporation.

            Permission to use, copy, modify, and/or distribute this software for any
            purpose with or without fee is hereby granted.

            THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
            REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
            AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
            INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
            LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
            OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
            PERFORMANCE OF THIS SOFTWARE.
            ***************************************************************************** */function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function n(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function i(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(e){o=[6,e],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])}}}var o=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}var u=a,f=s;function h(e){if(u===setTimeout)return setTimeout(e,0);if((u===a||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}"function"==typeof o.setTimeout&&(u=setTimeout),"function"==typeof o.clearTimeout&&(f=clearTimeout);var c,l=[],d=!1,p=-1;function g(){d&&c&&(d=!1,c.length?l=c.concat(l):p=-1,l.length&&b())}function b(){if(!d){var e=h(g);d=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,d=!1,function(e){if(f===clearTimeout)return clearTimeout(e);if((f===s||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}(e)}}function y(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];l.push(new m(e,t)),1!==l.length||d||h(b)}function m(e,t){this.fun=e,this.array=t}function v(){}m.prototype.run=function(){this.fun.apply(null,this.array)};var A=v,w=v,_=v,M=v,S=v,E=v,k=v,C=o.performance||{},R=C.now||C.mozNow||C.msNow||C.oNow||C.webkitNow||function(){return(new Date).getTime()},x=new Date,O={nextTick:y,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:A,addListener:w,once:_,off:M,removeListener:S,removeAllListeners:E,emit:k,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*R.call(C),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-x)/1e3}},P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function B(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var I,L={exports:{}};I=L,function(e){var t=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n="object"==typeof O&&!0,i="function"==typeof Symbol,o="object"==typeof Reflect,a="function"==typeof setImmediate?setImmediate:setTimeout,s=i?o&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&f.call(this,this._conf)}function f(t){t&&(this._conf=t,t.delimiter&&(this.delimiter=t.delimiter),t.maxListeners!==e&&(this._maxListeners=t.maxListeners),t.wildcard&&(this.wildcard=t.wildcard),t.newListener&&(this._newListener=t.newListener),t.removeListener&&(this._removeListener=t.removeListener),t.verboseMemoryLeak&&(this.verboseMemoryLeak=t.verboseMemoryLeak),t.ignoreErrors&&(this.ignoreErrors=t.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),void 0!==O&&O.emitWarning){var n=new Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,O.emitWarning(n)}else console.error(r),console.trace&&console.trace()}var c=function(e,t,r){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var i=new Array(n);n--;)i[n]=arguments[n];return i}};function l(t,r){for(var n={},i=t.length,o=r?value.length:0,a=0;a<i;a++)n[t[a]]=a<o?r[a]:e;return n}function d(e,t,r){var n,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(r.on||r.off)&&(n=r.on,i=r.off),t.addEventListener?(n=t.addEventListener,i=t.removeEventListener):t.addListener?(n=t.addListener,i=t.removeListener):t.on&&(n=t.on,i=t.off),!n&&!i)throw Error("target does not implement any known event API");if("function"!=typeof n)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=n,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function p(r,n,i,o){var a=Object.assign({},n);if(!r)return a;if("object"!=typeof r)throw TypeError("options must be an object");var s,u,f,h=Object.keys(r),c=h.length;function l(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var d=0;d<c;d++){if(s=h[d],!o&&!t.call(n,s))throw Error('Unknown "'+s+'" option');(u=r[s])!==e&&(f=i[s],a[s]=f?f(u,l):u)}return a}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function b(e){var t="value must be type of "+e.join("|"),r=e.length,n=e[0],i=e[1];return 1===r?function(e,r){if(typeof e===n)return e;r(t)}:2===r?function(e,r){var o=typeof e;if(o===n||o===i)return e;r(t)}:function(n,i){for(var o=typeof n,a=r;a-- >0;)if(o===e[a])return n;i(t)}}Object.assign(d.prototype,{subscribe:function(e,t,r){var n=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var n=c.apply(null,arguments),a={data:n,name:t,original:e};if(r){var s=r.call(i,a);!1!==s&&o.emit.apply(o,[a.name].concat(n))}else o.emit.apply(o,[t].concat(n))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!n._onNewListener?(this._onNewListener=function(r){r===t&&null===a[e]&&(a[e]=s,n._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!o.hasListeners(r)&&a[e]&&(a[e]=null,n._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,n._on.call(i,e,s))},unsubscribe:function(e){var t,r,n,i=this,o=this._listeners,a=this._emitter,u=this._off,f=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function h(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=w.call(a,i);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;u.call(f,e,t),delete o[e],--this._listenersCount||h()}else{for(n=(r=s(o)).length;n-- >0;)e=r[n],u.call(f,e,o[e]);this._listeners={},this._listenersCount=0,h()}}});var m=b(["function"]),v=b(["object","function"]);function A(e,t,r){var n,i,o,a=0,s=new e((function(u,f,h){function c(){i&&(i=null),a&&(clearTimeout(a),a=0)}r=p(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),n=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof h;var l=function(e){c(),u(e)},d=function(e){c(),f(e)};n?t(l,d,h):(i=[function(e){d(e||Error("canceled"))}],t(l,d,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),r.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),f(e)}),r.timeout))}));return n||(s.cancel=function(e){if(i){for(var t=i.length,r=1;r<t;r++)i[r](e);i[0](e),i=null}}),s}function w(e){var t=this._observers;if(!t)return-1;for(var r=t.length,n=0;n<r;n++)if(t[n]._target===e)return n;return-1}function _(e,t,r,n,i){if(!r)return null;if(0===n){var o=typeof t;if("string"===o){var a,u,f=0,h=0,c=this.delimiter,l=c.length;if(-1!==(u=t.indexOf(c))){a=new Array(5);do{a[f++]=t.slice(h,u),h=u+l}while(-1!==(u=t.indexOf(c,h)));a[f++]=t.slice(h),t=a,i=f}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var d,p,g,b,y,m,v,A=null,w=t[n],M=t[n+1];if(n===i)r._listeners&&("function"==typeof r._listeners?(e&&e.push(r._listeners),A=[r]):(e&&e.push.apply(e,r._listeners),A=[r]));else{if("*"===w){for(u=(m=s(r)).length;u-- >0;)"_listeners"!==(d=m[u])&&(v=_(e,t,r[d],n+1,i))&&(A?A.push.apply(A,v):A=v);return A}if("**"===w){for((y=n+1===i||n+2===i&&"*"===M)&&r._listeners&&(A=_(e,t,r,i,i)),u=(m=s(r)).length;u-- >0;)"_listeners"!==(d=m[u])&&("*"===d||"**"===d?(r[d]._listeners&&!y&&(v=_(e,t,r[d],i,i))&&(A?A.push.apply(A,v):A=v),v=_(e,t,r[d],n,i)):v=_(e,t,r[d],d===M?n+2:n,i),v&&(A?A.push.apply(A,v):A=v));return A}r[w]&&(A=_(e,t,r[w],n+1,i))}if((p=r["*"])&&_(e,t,p,n+1,i),g=r["**"])if(n<i)for(g._listeners&&_(e,t,g,i,i),u=(m=s(g)).length;u-- >0;)"_listeners"!==(d=m[u])&&(d===M?_(e,t,g[d],n+2,i):d===w?_(e,t,g[d],n+1,i):((b={})[d]=g[d],_(e,t,{"**":b},n+1,i)));else g._listeners?_(e,t,g,i,i):g["*"]&&g["*"]._listeners&&_(e,t,g["*"],i,i);return A}function M(e,t,r){var n,i,o=0,a=0,s=this.delimiter,u=s.length;if("string"==typeof e)if(-1!==(n=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,n),a=n+u}while(-1!==(n=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(n=0;n+1<o;n++)if("**"===i[n]&&"**"===i[n+1])return;var f,c=this.listenerTree;for(n=0;n<o;n++)if(c=c[f=i[n]]||(c[f]={}),n===o-1)return c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),r?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,h.call(this,c._listeners.length,f))):c._listeners=t,!0;return!0}function S(e,t,r,n){for(var i,o,a,u,f=s(e),h=f.length,c=e._listeners;h-- >0;)i=e[o=f[h]],a="_listeners"===o?r:r?r.concat(o):[o],u=n||"symbol"==typeof o,c&&t.push(u?a:a.join(this.delimiter)),"object"==typeof i&&S.call(this,i,t,a,u);return t}function E(e){for(var t,r,n,i=s(e),o=i.length;o-- >0;)(t=e[r=i[o]])&&(n=!0,"_listeners"===r||E(t)||delete e[r]);return n}function k(e,t,r){this.emitter=e,this.event=t,this.listener=r}function C(t,r,i){if(!0===i)s=!0;else if(!1===i)o=!0;else{if(!i||"object"!=typeof i)throw TypeError("options should be an object or true");var o=i.async,s=i.promisify,u=i.nextTick,f=i.objectify}if(o||u||s){var h=r,c=r._origin||r;if(u&&!n)throw Error("process.nextTick is not supported");s===e&&(s="AsyncFunction"===r.constructor.name),r=function(){var e=arguments,t=this,r=this.event;return s?u?Promise.resolve():new Promise((function(e){a(e)})).then((function(){return t.event=r,h.apply(t,e)})):(u?y:a)((function(){t.event=r,h.apply(t,e)}))},r._async=!0,r._origin=c}return[r,f?new k(this,t,r):this]}function R(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,e)}k.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},R.EventEmitter2=R,R.prototype.listenTo=function(t,n,i){if("object"!=typeof t)throw TypeError("target musts be an object");var o=this;function a(e){if("object"!=typeof e)throw TypeError("events must be an object");var r,n=i.reducers,a=w.call(o,t);r=-1===a?new d(o,t,i):o._observers[a];for(var u,f=s(e),h=f.length,c="function"==typeof n,l=0;l<h;l++)u=f[l],r.subscribe(u,e[u]||u,c?n:n&&n[u])}return i=p(i,{on:e,off:e,reducers:e},{on:m,off:m,reducers:v}),r(n)?a(l(n)):a("string"==typeof n?l(n.split(/\s+/)):n),this},R.prototype.stopListeningTo=function(e,t){var r=this._observers;if(!r)return!1;var n,i=r.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)n=r[i],e&&n._target!==e||(n.unsubscribe(t),o=!0);return o},R.prototype.delimiter=".",R.prototype.setMaxListeners=function(t){t!==e&&(this._maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t)},R.prototype.getMaxListeners=function(){return this._maxListeners},R.prototype.event="",R.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},R.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},R.prototype._once=function(e,t,r,n){return this._many(e,1,t,r,n)},R.prototype.many=function(e,t,r,n){return this._many(e,t,r,!1,n)},R.prototype.prependMany=function(e,t,r,n){return this._many(e,t,r,!0,n)},R.prototype._many=function(e,t,r,n,i){var o=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),r.apply(this,arguments)}return a._origin=r,this._on(e,a,n,i)},R.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,r,n,o,a,s=arguments[0],f=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(f&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(r=s.length,i)for(n=0;n<r;n++)if("symbol"==typeof s[n]){a=!0;break}a||(s=s.join(this.delimiter))}var h,c=arguments.length;if(this._all&&this._all.length)for(n=0,r=(h=this._all.slice()).length;n<r;n++)switch(this.event=s,c){case 1:h[n].call(this,s);break;case 2:h[n].call(this,s,arguments[1]);break;case 3:h[n].call(this,s,arguments[1],arguments[2]);break;default:h[n].apply(this,arguments)}if(f)h=[],_.call(this,h,e,this.listenerTree,0,r);else{if("function"==typeof(h=this._events[s])){switch(this.event=s,c){case 1:h.call(this);break;case 2:h.call(this,arguments[1]);break;case 3:h.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(c-1),o=1;o<c;o++)t[o-1]=arguments[o];h.apply(this,t)}return!0}h&&(h=h.slice())}if(h&&h.length){if(c>3)for(t=new Array(c-1),o=1;o<c;o++)t[o-1]=arguments[o];for(n=0,r=h.length;n<r;n++)switch(this.event=s,c){case 1:h[n].call(this);break;case 2:h[n].call(this,arguments[1]);break;case 3:h[n].call(this,arguments[1],arguments[2]);break;default:h[n].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===s)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},R.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,r,n,o,a,s=arguments[0],f=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(f&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(n=s.length,i)for(o=0;o<n;o++)if("symbol"==typeof s[o]){t=!0;break}t||(s=s.join(this.delimiter))}var h,c=[],l=arguments.length;if(this._all)for(o=0,n=this._all.length;o<n;o++)switch(this.event=s,l){case 1:c.push(this._all[o].call(this,s));break;case 2:c.push(this._all[o].call(this,s,arguments[1]));break;case 3:c.push(this._all[o].call(this,s,arguments[1],arguments[2]));break;default:c.push(this._all[o].apply(this,arguments))}if(f?(h=[],_.call(this,h,e,this.listenerTree,0)):h=this._events[s],"function"==typeof h)switch(this.event=s,l){case 1:c.push(h.call(this));break;case 2:c.push(h.call(this,arguments[1]));break;case 3:c.push(h.call(this,arguments[1],arguments[2]));break;default:for(r=new Array(l-1),a=1;a<l;a++)r[a-1]=arguments[a];c.push(h.apply(this,r))}else if(h&&h.length){if(h=h.slice(),l>3)for(r=new Array(l-1),a=1;a<l;a++)r[a-1]=arguments[a];for(o=0,n=h.length;o<n;o++)switch(this.event=s,l){case 1:c.push(h[o].call(this));break;case 2:c.push(h[o].call(this,arguments[1]));break;case 3:c.push(h[o].call(this,arguments[1],arguments[2]));break;default:c.push(h[o].apply(this,r))}}else if(!this.ignoreErrors&&!this._all&&"error"===s)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(c)},R.prototype.on=function(e,t,r){return this._on(e,t,!1,r)},R.prototype.prependListener=function(e,t,r){return this._on(e,t,!0,r)},R.prototype.onAny=function(e){return this._onAny(e,!1)},R.prototype.prependAny=function(e){return this._onAny(e,!0)},R.prototype.addListener=R.prototype.on,R.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},R.prototype._on=function(t,r,n,i){if("function"==typeof t)return this._onAny(t,r),this;if("function"!=typeof r)throw new Error("on only accepts instances of Function");this._events||u.call(this);var o,a=this;return i!==e&&(r=(o=C.call(this,t,r,i))[0],a=o[1]),this._newListener&&this.emit("newListener",t,r),this.wildcard?(M.call(this,t,r,n),a):(this._events[t]?("function"==typeof this._events[t]&&(this._events[t]=[this._events[t]]),n?this._events[t].unshift(r):this._events[t].push(r),!this._events[t].warned&&this._maxListeners>0&&this._events[t].length>this._maxListeners&&(this._events[t].warned=!0,h.call(this,this._events[t].length,t))):this._events[t]=r,a)},R.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=_.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var a=0;a<i.length;a++){var s=i[a];if(n=s._listeners,r(n)){for(var u=-1,f=0,h=n.length;f<h;f++)if(n[f]===t||n[f].listener&&n[f].listener===t||n[f]._origin&&n[f]._origin===t){u=f;break}if(u<0)continue;return this.wildcard?s._listeners.splice(u,1):this._events[e].splice(u,1),0===n.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&E(this.listenerTree),this},R.prototype.offAny=function(e){var t,r=0,n=0;if(e&&this._all&&this._all.length>0){for(r=0,n=(t=this._all).length;r<n;r++)if(e===t[r])return t.splice(r,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(r=0,n=t.length;r<n;r++)this.emit("removeListenerAny",t[r]);this._all=[]}return this},R.prototype.removeListener=R.prototype.off,R.prototype.removeAllListeners=function(t){if(t===e)return!this._events||u.call(this),this;if(this.wildcard){var r,n=_.call(this,null,t,this.listenerTree,0);if(!n)return this;for(r=0;r<n.length;r++)n[r]._listeners=null;this.listenerTree&&E(this.listenerTree)}else this._events&&(this._events[t]=null);return this},R.prototype.listeners=function(t){var r,n,i,o,a,u=this._events;if(t===e){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!u)return[];for(o=(r=s(u)).length,i=[];o-- >0;)"function"==typeof(n=u[r[o]])?i.push(n):i.push.apply(i,n);return i}if(this.wildcard){if(!(a=this.listenerTree))return[];var f=[],h="string"==typeof t?t.split(this.delimiter):t.slice();return _.call(this,f,h,a,0),f}return u&&(n=u[t])?"function"==typeof n?[n]:n:[]},R.prototype.eventNames=function(e){var t=this._events;return this.wildcard?S.call(this,this.listenerTree,[],null,e):t?s(t):[]},R.prototype.listenerCount=function(e){return this.listeners(e).length},R.prototype.hasListeners=function(t){if(this.wildcard){var r=[],n="string"==typeof t?t.split(this.delimiter):t.slice();return _.call(this,r,n,this.listenerTree,0),r.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(t===e?s(i).length:i[t]))},R.prototype.listenersAny=function(){return this._all?this._all:[]},R.prototype.waitFor=function(t,r){var n=this,i=typeof r;return"number"===i?r={timeout:r}:"function"===i&&(r={filter:r}),A((r=p(r,{timeout:0,filter:e,handleError:!1,Promise:Promise,overload:!1},{filter:m,Promise:g})).Promise,(function(e,i,o){function a(){var o=r.filter;if(!o||o.apply(n,arguments))if(n.off(t,a),r.handleError){var s=arguments[0];s?i(s):e(c.apply(null,arguments).slice(1))}else e(c.apply(null,arguments))}o((function(){n.off(t,a)})),n._on(t,a,!1)}),{timeout:r.timeout,overload:r.overload})};var x=R.prototype;Object.defineProperties(R,{defaultMaxListeners:{get:function(){return x._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");x._maxListeners=e},enumerable:!0},once:{value:function(e,t,r){return A((r=p(r,{Promise:Promise,timeout:0,overload:!1},{Promise:g})).Promise,(function(r,n,i){var o;if("function"==typeof e.addEventListener)return o=function(){r(c.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),r(c.apply(null,arguments))};"error"!==t&&(a=function(r){e.removeListener(t,s),n(r)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(x,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),I.exports=R}();var j={},T={},D={};let N;Object.defineProperty(D,"__esModule",{value:!0}),D.default=function(){if(!N&&(N="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!N))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(U)};const U=new Uint8Array(16);var F={},q={},W={};Object.defineProperty(W,"__esModule",{value:!0}),W.default=void 0,W.default=/^(?:[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,Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var z,V=(z=W)&&z.__esModule?z:{default:z};q.default=function(e){return"string"==typeof e&&V.default.test(e)},Object.defineProperty(F,"__esModule",{value:!0}),F.default=void 0;var H=function(e){return e&&e.__esModule?e:{default:e}}(q);const K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).substr(1));F.default=function(e,t=0){const r=(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase();if(!(0,H.default)(r))throw TypeError("Stringified UUID is invalid");return r},Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var Y=Z(D),G=Z(F);function Z(e){return e&&e.__esModule?e:{default:e}}let Q,J,X=0,$=0;T.default=function(e,t,r){let n=t&&r||0;const i=t||new Array(16);let o=(e=e||{}).node||Q,a=void 0!==e.clockseq?e.clockseq:J;if(null==o||null==a){const t=e.random||(e.rng||Y.default)();null==o&&(o=Q=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=J=16383&(t[6]<<8|t[7]))}let s=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:$+1;const f=s-X+(u-$)/1e4;if(f<0&&void 0===e.clockseq&&(a=a+1&16383),(f<0||s>X)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");X=s,$=u,J=a,s+=122192928e5;const h=(1e4*(268435455&s)+u)%4294967296;i[n++]=h>>>24&255,i[n++]=h>>>16&255,i[n++]=h>>>8&255,i[n++]=255&h;const c=s/4294967296*1e4&268435455;i[n++]=c>>>8&255,i[n++]=255&c,i[n++]=c>>>24&15|16,i[n++]=c>>>16&255,i[n++]=a>>>8|128,i[n++]=255&a;for(let e=0;e<6;++e)i[n+e]=o[e];return t||(0,G.default)(i)};var ee={},te={},re={};Object.defineProperty(re,"__esModule",{value:!0}),re.default=void 0;var ne=function(e){return e&&e.__esModule?e:{default:e}}(q);re.default=function(e){if(!(0,ne.default)(e))throw TypeError("Invalid UUID");let t;const 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},Object.defineProperty(te,"__esModule",{value:!0}),te.default=function(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=(0,oe.default)(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),a=r(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return(0,ie.default)(a)}try{n.name=e}catch(e){}return n.DNS=se,n.URL=ue,n},te.URL=te.DNS=void 0;var ie=ae(F),oe=ae(re);function ae(e){return e&&e.__esModule?e:{default:e}}const se="6ba7b810-9dad-11d1-80b4-00c04fd430c8";te.DNS=se;const ue="6ba7b811-9dad-11d1-80b4-00c04fd430c8";te.URL=ue;var fe={};function he(e){return 14+(e+64>>>9<<4)+1}function ce(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function le(e,t,r,n,i,o){return ce((a=ce(ce(t,e),ce(n,o)))<<(s=i)|a>>>32-s,r);var a,s}function de(e,t,r,n,i,o,a){return le(t&r|~t&n,e,t,i,o,a)}function pe(e,t,r,n,i,o,a){return le(t&n|r&~n,e,t,i,o,a)}function ge(e,t,r,n,i,o,a){return le(t^r^n,e,t,i,o,a)}function be(e,t,r,n,i,o,a){return le(r^(t|~n),e,t,i,o,a)}Object.defineProperty(fe,"__esModule",{value:!0}),fe.default=void 0;fe.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let i=0;i<r;i+=8){const r=e[i>>5]>>>i%32&255,o=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[he(t)-1]=t;let r=1732584193,n=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const a=r,s=n,u=i,f=o;r=de(r,n,i,o,e[t],7,-680876936),o=de(o,r,n,i,e[t+1],12,-389564586),i=de(i,o,r,n,e[t+2],17,606105819),n=de(n,i,o,r,e[t+3],22,-1044525330),r=de(r,n,i,o,e[t+4],7,-176418897),o=de(o,r,n,i,e[t+5],12,1200080426),i=de(i,o,r,n,e[t+6],17,-1473231341),n=de(n,i,o,r,e[t+7],22,-45705983),r=de(r,n,i,o,e[t+8],7,1770035416),o=de(o,r,n,i,e[t+9],12,-1958414417),i=de(i,o,r,n,e[t+10],17,-42063),n=de(n,i,o,r,e[t+11],22,-1990404162),r=de(r,n,i,o,e[t+12],7,1804603682),o=de(o,r,n,i,e[t+13],12,-40341101),i=de(i,o,r,n,e[t+14],17,-1502002290),n=de(n,i,o,r,e[t+15],22,1236535329),r=pe(r,n,i,o,e[t+1],5,-165796510),o=pe(o,r,n,i,e[t+6],9,-1069501632),i=pe(i,o,r,n,e[t+11],14,643717713),n=pe(n,i,o,r,e[t],20,-373897302),r=pe(r,n,i,o,e[t+5],5,-701558691),o=pe(o,r,n,i,e[t+10],9,38016083),i=pe(i,o,r,n,e[t+15],14,-660478335),n=pe(n,i,o,r,e[t+4],20,-405537848),r=pe(r,n,i,o,e[t+9],5,568446438),o=pe(o,r,n,i,e[t+14],9,-1019803690),i=pe(i,o,r,n,e[t+3],14,-187363961),n=pe(n,i,o,r,e[t+8],20,1163531501),r=pe(r,n,i,o,e[t+13],5,-1444681467),o=pe(o,r,n,i,e[t+2],9,-51403784),i=pe(i,o,r,n,e[t+7],14,1735328473),n=pe(n,i,o,r,e[t+12],20,-1926607734),r=ge(r,n,i,o,e[t+5],4,-378558),o=ge(o,r,n,i,e[t+8],11,-2022574463),i=ge(i,o,r,n,e[t+11],16,1839030562),n=ge(n,i,o,r,e[t+14],23,-35309556),r=ge(r,n,i,o,e[t+1],4,-1530992060),o=ge(o,r,n,i,e[t+4],11,1272893353),i=ge(i,o,r,n,e[t+7],16,-155497632),n=ge(n,i,o,r,e[t+10],23,-1094730640),r=ge(r,n,i,o,e[t+13],4,681279174),o=ge(o,r,n,i,e[t],11,-358537222),i=ge(i,o,r,n,e[t+3],16,-722521979),n=ge(n,i,o,r,e[t+6],23,76029189),r=ge(r,n,i,o,e[t+9],4,-640364487),o=ge(o,r,n,i,e[t+12],11,-421815835),i=ge(i,o,r,n,e[t+15],16,530742520),n=ge(n,i,o,r,e[t+2],23,-995338651),r=be(r,n,i,o,e[t],6,-198630844),o=be(o,r,n,i,e[t+7],10,1126891415),i=be(i,o,r,n,e[t+14],15,-1416354905),n=be(n,i,o,r,e[t+5],21,-57434055),r=be(r,n,i,o,e[t+12],6,1700485571),o=be(o,r,n,i,e[t+3],10,-1894986606),i=be(i,o,r,n,e[t+10],15,-1051523),n=be(n,i,o,r,e[t+1],21,-2054922799),r=be(r,n,i,o,e[t+8],6,1873313359),o=be(o,r,n,i,e[t+15],10,-30611744),i=be(i,o,r,n,e[t+6],15,-1560198380),n=be(n,i,o,r,e[t+13],21,1309151649),r=be(r,n,i,o,e[t+4],6,-145523070),o=be(o,r,n,i,e[t+11],10,-1120210379),i=be(i,o,r,n,e[t+2],15,718787259),n=be(n,i,o,r,e[t+9],21,-343485551),r=ce(r,a),n=ce(n,s),i=ce(i,u),o=ce(o,f)}return[r,n,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,r=new Uint32Array(he(t));for(let n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))},Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=void 0;var ye=ve(te),me=ve(fe);function ve(e){return e&&e.__esModule?e:{default:e}}var Ae=(0,ye.default)("v3",48,me.default);ee.default=Ae;var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.default=void 0;var _e=Se(D),Me=Se(F);function Se(e){return e&&e.__esModule?e:{default:e}}we.default=function(e,t,r){const n=(e=e||{}).random||(e.rng||_e.default)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return(0,Me.default)(n)};var Ee={},ke={};function Ce(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function Re(e,t){return e<<t|e>>>32-t}Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=void 0;ke.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];o[t]=r}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const n=new Uint32Array(80);for(let t=0;t<16;++t)n[t]=o[e][t];for(let e=16;e<80;++e)n[e]=Re(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);let i=r[0],a=r[1],s=r[2],u=r[3],f=r[4];for(let e=0;e<80;++e){const r=Math.floor(e/20),o=Re(i,5)+Ce(r,a,s,u)+f+t[r]+n[e]>>>0;f=u,u=s,s=Re(a,30)>>>0,a=i,i=o}r[0]=r[0]+i>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+s>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+f>>>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]]},Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.default=void 0;var xe=Pe(te),Oe=Pe(ke);function Pe(e){return e&&e.__esModule?e:{default:e}}var Be=(0,xe.default)("v5",80,Oe.default);Ee.default=Be;var Ie={};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default=void 0,Ie.default="00000000-0000-0000-0000-000000000000";var Le={};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=void 0;var je=function(e){return e&&e.__esModule?e:{default:e}}(q);Le.default=function(e){if(!(0,je.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return f.default}});var t=h(T),r=h(ee),n=h(we),i=h(Ee),o=h(Ie),a=h(Le),s=h(q),u=h(F),f=h(re);function h(e){return e&&e.__esModule?e:{default:e}}}(j);const Te=Object.create(null);Te.open="0",Te.close="1",Te.ping="2",Te.pong="3",Te.message="4",Te.upgrade="5",Te.noop="6";const De=Object.create(null);Object.keys(Te).forEach((e=>{De[Te[e]]=e}));const Ne={type:"error",data:"parser error"},Ue="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Fe="function"==typeof ArrayBuffer,qe=({type:e,data:t},r,n)=>Ue&&t instanceof Blob?r?n(t):We(t,n):Fe&&(t instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer)(t))?r?n(t):We(new Blob([t]),n):n(Te[e]+(t||"")),We=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+e)},r.readAsDataURL(e)};for(var ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve="undefined"==typeof Uint8Array?[]:new Uint8Array(256),He=0;He<ze.length;He++)Ve[ze.charCodeAt(He)]=He;const Ke="function"==typeof ArrayBuffer,Ye=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Ze(e,t)};const r=e.charAt(0);return"b"===r?{type:"message",data:Ge(e.substring(1),t)}:De[r]?e.length>1?{type:De[r],data:e.substring(1)}:{type:De[r]}:Ne},Ge=(e,t)=>{if(Ke){const r=function(e){var t,r,n,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var f=new ArrayBuffer(a),h=new Uint8Array(f);for(t=0;t<s;t+=4)r=Ve[e.charCodeAt(t)],n=Ve[e.charCodeAt(t+1)],i=Ve[e.charCodeAt(t+2)],o=Ve[e.charCodeAt(t+3)],h[u++]=r<<2|n>>4,h[u++]=(15&n)<<4|i>>2,h[u++]=(3&i)<<6|63&o;return f}(e);return Ze(r,t)}return{base64:!0,data:e}},Ze=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e,Qe=String.fromCharCode(30);function Je(e){if(e)return function(e){for(var t in Je.prototype)e[t]=Je.prototype[t];return e}(e)}Je.prototype.on=Je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Je.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},Je.prototype.off=Je.prototype.removeListener=Je.prototype.removeAllListeners=Je.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},Je.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,t)}return this},Je.prototype.emitReserved=Je.prototype.emit,Je.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Je.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Xe="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function $e(e,...t){return t.reduce(((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t)),{})}const et=setTimeout,tt=clearTimeout;function rt(e,t){t.useNativeTimers?(e.setTimeoutFn=et.bind(Xe),e.clearTimeoutFn=tt.bind(Xe)):(e.setTimeoutFn=setTimeout.bind(Xe),e.clearTimeoutFn=clearTimeout.bind(Xe))}function nt(e){return"string"==typeof e?function(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))}class it extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class ot extends Je{constructor(e){super(),this.writable=!1,rt(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new it(e,t,r)),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Ye(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const at="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),st={};let ut,ft=0,ht=0;function ct(e){let t="";do{t=at[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function lt(){const e=ct(+new Date);return e!==ut?(ft=0,ut=e):e+"."+ct(ft++)}for(;ht<64;ht++)st[at[ht]]=ht;function dt(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}let pt=!1;try{pt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const gt=pt;function bt(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||gt))return new XMLHttpRequest}catch(e){}if(!t)try{return new(Xe[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function yt(){}const mt=null!=new bt({xdomain:!1}).responseType;class vt extends Je{constructor(e,t){super(),rt(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=$e(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new bt(e);try{t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=vt.requestsCount++,vt.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=yt,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete vt.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function At(){for(let e in vt.requests)vt.requests.hasOwnProperty(e)&&vt.requests[e].abort()}vt.requestsCount=0,vt.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",At):"function"==typeof addEventListener&&addEventListener("onpagehide"in Xe?"pagehide":"unload",At,!1));var wt=[],_t=[],Mt="undefined"!=typeof Uint8Array?Uint8Array:Array,St=!1;function Et(){St=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)wt[t]=e[t],_t[e.charCodeAt(t)]=t;_t["-".charCodeAt(0)]=62,_t["_".charCodeAt(0)]=63}function kt(e,t,r){for(var n,i,o=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(wt[(i=n)>>18&63]+wt[i>>12&63]+wt[i>>6&63]+wt[63&i]);return o.join("")}function Ct(e){var t;St||Et();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(kt(e,s,s+a>u?u:s+a));return 1===n?(t=e[r-1],i+=wt[t>>2],i+=wt[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=wt[t>>10],i+=wt[t>>4&63],i+=wt[t<<2&63],i+="="),o.push(i),o.join("")}function Rt(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)}function xt(e,t,r,n,i,o){var a,s,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=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=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-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,f+=i;f>0;e[r+d]=255&a,d+=p,a/=256,f-=8);e[r+d-p]|=128*g}var Ot={}.toString,Pt=Array.isArray||function(e){return"[object Array]"==Ot.call(e)};function Bt(){return Lt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function It(e,t){if(Bt()<t)throw new RangeError("Invalid typed array length");return Lt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Lt.prototype:(null===e&&(e=new Lt(t)),e.length=t),e}function Lt(e,t,r){if(!(Lt.TYPED_ARRAY_SUPPORT||this instanceof Lt))return new Lt(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 Dt(this,e)}return jt(this,e,t,r)}function jt(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");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),Lt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Lt.prototype:e=Nt(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!Lt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|qt(t,r),i=(e=It(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(Ft(t)){var r=0|Ut(t.length);return 0===(e=It(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?It(e,0):Nt(e,t);if("Buffer"===t.type&&Pt(t.data))return Nt(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Tt(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 Dt(e,t){if(Tt(t),e=It(e,t<0?0:0|Ut(t)),!Lt.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Nt(e,t){var r=t.length<0?0:0|Ut(t.length);e=It(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function Ut(e){if(e>=Bt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bt().toString(16)+" bytes");return 0|e}function Ft(e){return!(null==e||!e._isBuffer)}function qt(e,t){if(Ft(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 dr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return pr(e).length;default:if(n)return dr(e).length;t=(""+t).toLowerCase(),n=!0}}function Wt(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 rr(this,t,r);case"utf8":case"utf-8":return $t(this,t,r);case"ascii":return er(this,t,r);case"latin1":case"binary":return tr(this,t,r);case"base64":return Xt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nr(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function zt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Vt(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=Lt.from(t,n)),Ft(t))return 0===t.length?-1:Ht(e,t,r,n,i);if("number"==typeof t)return t&=255,Lt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ht(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ht(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 f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var h=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(e,o+l)!==f(t,l)){c=!1;break}if(c)return o}return-1}function Kt(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 Yt(e,t,r,n){return gr(dr(t,e.length-r),e,r,n)}function Gt(e,t,r,n){return gr(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function Zt(e,t,r,n){return Gt(e,t,r,n)}function Qt(e,t,r,n){return gr(pr(t),e,r,n)}function Jt(e,t,r,n){return gr(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 Xt(e,t,r){return 0===t&&r===e.length?Ct(e):Ct(e.slice(t,r))}function $t(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,f=e[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=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&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function er(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 tr(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 rr(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+=lr(e[o]);return i}function nr(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 ir(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 or(e,t,r,n,i,o){if(!Ft(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 ar(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 sr(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 ur(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 fr(e,t,r,n,i){return i||ur(e,0,r,4),xt(e,t,r,n,23,4),r+4}function hr(e,t,r,n,i){return i||ur(e,0,r,8),xt(e,t,r,n,52,8),r+8}Lt.TYPED_ARRAY_SUPPORT=void 0===o.TYPED_ARRAY_SUPPORT||o.TYPED_ARRAY_SUPPORT,Lt.poolSize=8192,Lt._augment=function(e){return e.__proto__=Lt.prototype,e},Lt.from=function(e,t,r){return jt(null,e,t,r)},Lt.TYPED_ARRAY_SUPPORT&&(Lt.prototype.__proto__=Uint8Array.prototype,Lt.__proto__=Uint8Array),Lt.alloc=function(e,t,r){return function(e,t,r,n){return Tt(t),t<=0?It(e,t):void 0!==r?"string"==typeof n?It(e,t).fill(r,n):It(e,t).fill(r):It(e,t)}(null,e,t,r)},Lt.allocUnsafe=function(e){return Dt(null,e)},Lt.allocUnsafeSlow=function(e){return Dt(null,e)},Lt.isBuffer=br,Lt.compare=function(e,t){if(!Ft(e)||!Ft(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},Lt.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}},Lt.concat=function(e,t){if(!Pt(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Lt.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Lt.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!Ft(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Lt.byteLength=qt,Lt.prototype._isBuffer=!0,Lt.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)zt(this,t,t+1);return this},Lt.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)zt(this,t,t+3),zt(this,t+1,t+2);return this},Lt.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)zt(this,t,t+7),zt(this,t+1,t+6),zt(this,t+2,t+5),zt(this,t+3,t+4);return this},Lt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?$t(this,0,e):Wt.apply(this,arguments)},Lt.prototype.equals=function(e){if(!Ft(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Lt.compare(this,e)},Lt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Lt.prototype.compare=function(e,t,r,n,i){if(!Ft(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),u=this.slice(n,i),f=e.slice(t,r),h=0;h<s;++h)if(u[h]!==f[h]){o=u[h],a=f[h];break}return o<a?-1:a<o?1:0},Lt.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Lt.prototype.indexOf=function(e,t,r){return Vt(this,e,t,r,!0)},Lt.prototype.lastIndexOf=function(e,t,r){return Vt(this,e,t,r,!1)},Lt.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 Kt(this,e,t,r);case"utf8":case"utf-8":return Yt(this,e,t,r);case"ascii":return Gt(this,e,t,r);case"latin1":case"binary":return Zt(this,e,t,r);case"base64":return Qt(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Jt(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Lt.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),Lt.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Lt.prototype;else{var i=t-e;r=new Lt(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},Lt.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||ir(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},Lt.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||ir(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Lt.prototype.readUInt8=function(e,t){return t||ir(e,1,this.length),this[e]},Lt.prototype.readUInt16LE=function(e,t){return t||ir(e,2,this.length),this[e]|this[e+1]<<8},Lt.prototype.readUInt16BE=function(e,t){return t||ir(e,2,this.length),this[e]<<8|this[e+1]},Lt.prototype.readUInt32LE=function(e,t){return t||ir(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Lt.prototype.readUInt32BE=function(e,t){return t||ir(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Lt.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||ir(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},Lt.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||ir(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},Lt.prototype.readInt8=function(e,t){return t||ir(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Lt.prototype.readInt16LE=function(e,t){t||ir(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Lt.prototype.readInt16BE=function(e,t){t||ir(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Lt.prototype.readInt32LE=function(e,t){return t||ir(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Lt.prototype.readInt32BE=function(e,t){return t||ir(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Lt.prototype.readFloatLE=function(e,t){return t||ir(e,4,this.length),Rt(this,e,!0,23,4)},Lt.prototype.readFloatBE=function(e,t){return t||ir(e,4,this.length),Rt(this,e,!1,23,4)},Lt.prototype.readDoubleLE=function(e,t){return t||ir(e,8,this.length),Rt(this,e,!0,52,8)},Lt.prototype.readDoubleBE=function(e,t){return t||ir(e,8,this.length),Rt(this,e,!1,52,8)},Lt.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||or(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},Lt.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||or(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},Lt.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,1,255,0),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Lt.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ar(this,e,t,!0),t+2},Lt.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ar(this,e,t,!1),t+2},Lt.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):sr(this,e,t,!0),t+4},Lt.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):sr(this,e,t,!1),t+4},Lt.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);or(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},Lt.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);or(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},Lt.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,1,127,-128),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Lt.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ar(this,e,t,!0),t+2},Lt.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ar(this,e,t,!1),t+2},Lt.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,4,2147483647,-2147483648),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):sr(this,e,t,!0),t+4},Lt.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||or(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):sr(this,e,t,!1),t+4},Lt.prototype.writeFloatLE=function(e,t,r){return fr(this,e,t,!0,r)},Lt.prototype.writeFloatBE=function(e,t,r){return fr(this,e,t,!1,r)},Lt.prototype.writeDoubleLE=function(e,t,r){return hr(this,e,t,!0,r)},Lt.prototype.writeDoubleBE=function(e,t,r){return hr(this,e,t,!1,r)},Lt.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||!Lt.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},Lt.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&&!Lt.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=Ft(e)?e:dr(new Lt(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var cr=/[^+\/0-9A-Za-z-_]/g;function lr(e){return e<16?"0"+e.toString(16):e.toString(16)}function dr(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 pr(e){return function(e){var t,r,n,i,o,a;St||Et();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Mt(3*s/4-o),n=o>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)i=_t[e.charCodeAt(t)]<<18|_t[e.charCodeAt(t+1)]<<12|_t[e.charCodeAt(t+2)]<<6|_t[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=_t[e.charCodeAt(t)]<<2|_t[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=_t[e.charCodeAt(t)]<<10|_t[e.charCodeAt(t+1)]<<4|_t[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(cr,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function gr(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}function br(e){return null!=e&&(!!e._isBuffer||yr(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&yr(e.slice(0,0))}(e))}function yr(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}const mr="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),vr=Xe.WebSocket||Xe.MozWebSocket,Ar="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),wr={websocket:class extends ot{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=Ar?{}:$e(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Ar?new vr(e,t,r):t?new vr(e,t):new vr(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;qe(r,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}n&&mr((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let r="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(r=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=lt()),this.supportsBinary||(e.b64=1);const n=dt(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}check(){return!!vr}},polling:class extends ot{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=mt&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(Qe),n=[];for(let e=0;e<r.length;e++){const i=Ye(r[e],t);if(n.push(i),"error"===i.type)break}return n})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach(((e,o)=>{qe(e,!1,(e=>{n[o]=e,++i===r&&t(n.join(Qe))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let r="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=lt()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(r=":"+this.opts.port);const n=dt(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new vt(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},_r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Mr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sr(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=_r.exec(e||""),o={},a=14;for(;a--;)o[Mr[a]]=i[a]||"";return-1!=r&&-1!=n&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.substr(0,1)&&0!==t.length||r.splice(0,1),"/"==t.substr(t.length-1,1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(r[t]=n)})),r}(0,o.query),o}class Er extends Je{constructor(e,t={}){super(),e&&"object"==typeof e&&(t=e,e=null),e?(e=Sr(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Sr(t.host).host),rt(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let e=0,n=r.length;e<n;e++){let n=r[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",(()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())}),!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new wr[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Er.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),r=!1;Er.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Er.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function i(){r||(r=!0,f(),t.close(),t=null)}const o=e=>{const r=new Error("probe error: "+e);r.transport=t.name,i(),this.emitReserved("upgradeError",r)};function a(){o("transport closed")}function s(){o("socket closed")}function u(e){t&&e.name!==t.name&&i()}const f=()=>{t.removeListener("open",n),t.removeListener("error",o),t.removeListener("close",a),this.off("close",s),this.off("upgrading",u)};t.once("open",n),t.once("error",o),t.once("close",a),this.once("close",s),this.once("upgrading",u),t.open()}onOpen(){if(this.readyState="open",Er.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const r=this.writeBuffer[t].data;if(r&&(e+=nt(r)),t>0&&e>this.maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():e()})):this.upgrading?r():e()),this}onError(e){Er.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const n=e.length;for(;r<n;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}Er.protocol=4;const kr="function"==typeof ArrayBuffer,Cr=Object.prototype.toString,Rr="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Cr.call(Blob),xr="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Cr.call(File);function Or(e){return kr&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||Rr&&e instanceof Blob||xr&&e instanceof File}function Pr(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)if(Pr(e[t]))return!0;return!1}if(Or(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return Pr(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Pr(e[t]))return!0;return!1}function Br(e){const t=[],r=e.data,n=e;return n.data=Ir(r,t),n.attachments=t.length,{packet:n,buffers:t}}function Ir(e,t){if(!e)return e;if(Or(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ir(e[n],t);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Ir(e[n],t));return r}return e}function Lr(e,t){return e.data=jr(e.data,t),e.attachments=void 0,e}function jr(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=jr(e[r],t);else if("object"==typeof e)for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=jr(e[r],t));return e}var Tr;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(Tr||(Tr={}));class Dr extends Je{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e)t=this.decodeString(e),t.type===Tr.BINARY_EVENT||t.type===Tr.BINARY_ACK?(this.reconstructor=new Nr(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t);else{if(!Or(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(void 0===Tr[r.type])throw new Error("unknown packet type "+r.type);if(r.type===Tr.BINARY_EVENT||r.type===Tr.BINARY_ACK){const n=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(n,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(t+1)){const n=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);r.nsp=e.substring(n,t)}else r.nsp="/";const n=e.charAt(t+1);if(""!==n&&Number(n)==n){const n=t+1;for(;++t;){const r=e.charAt(t);if(null==r||Number(r)!=r){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){const n=this.tryParse(e.substr(t));if(!Dr.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case Tr.CONNECT:return"object"==typeof t;case Tr.DISCONNECT:return void 0===t;case Tr.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case Tr.EVENT:case Tr.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case Tr.ACK:case Tr.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Nr{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=Lr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Ur=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Tr},Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==Tr.EVENT&&e.type!==Tr.ACK||!Pr(e)?[this.encodeAsString(e)]:(e.type=e.type===Tr.EVENT?Tr.BINARY_EVENT:Tr.BINARY_ACK,this.encodeAsBinary(e))}encodeAsString(e){let t=""+e.type;return e.type!==Tr.BINARY_EVENT&&e.type!==Tr.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Br(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}},Decoder:Dr});function Fr(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const qr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wr extends Je{constructor(e,t,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Fr(e,"open",this.onopen.bind(this)),Fr(e,"packet",this.onpacket.bind(this)),Fr(e,"error",this.onerror.bind(this)),Fr(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(qr.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');t.unshift(e);const r={type:Tr.EVENT,data:t,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),r.id=e}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){const r=this.flags.timeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,[null,...e])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this.packet({type:Tr.CONNECT,data:e})})):this.packet({type:Tr.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Tr.CONNECT:if(e.data&&e.data.sid){const t=e.data.sid;this.onconnect(t)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Tr.EVENT:case Tr.BINARY_EVENT:this.onevent(e);break;case Tr.ACK:case Tr.BINARY_ACK:this.onack(e);break;case Tr.DISCONNECT:this.ondisconnect();break;case Tr.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e)}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:Tr.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Tr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function zr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}zr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},zr.prototype.reset=function(){this.attempts=0},zr.prototype.setMin=function(e){this.ms=e},zr.prototype.setMax=function(e){this.max=e},zr.prototype.setJitter=function(e){this.jitter=e};class Vr extends Je{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,rt(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=t.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new zr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const n=t.parser||Ur;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Er(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Fr(t,"open",(function(){r.onopen(),e&&e()})),i=Fr(t,"error",(t=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",t),e?e(t):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;0===e&&n();const r=this.setTimeoutFn((()=>{n(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Fr(e,"ping",this.onping.bind(this)),Fr(e,"data",this.ondata.bind(this)),Fr(e,"error",this.onerror.bind(this)),Fr(e,"close",this.onclose.bind(this)),Fr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){this.decoder.add(e)}ondecoded(e){this.emitReserved("packet",e)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r||(r=new Wr(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Hr={};function Kr(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=Sr(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,a=Hr[i]&&o in Hr[i].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Vr(n,t):(Hr[i]||(Hr[i]=new Vr(n,t)),s=Hr[i]),r.query&&!t.query&&(t.query=r.queryKey),s.socket(r.path,t)}Object.assign(Kr,{Manager:Vr,Socket:Wr,io:Kr,connect:Kr});for(var Yr={},Gr={byteLength:function(e){var t=tn(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=tn(e),i=n[0],o=n[1],a=new Jr(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),s=0,u=o>0?i-4:i;for(r=0;r<u;r+=4)t=Qr[e.charCodeAt(r)]<<18|Qr[e.charCodeAt(r+1)]<<12|Qr[e.charCodeAt(r+2)]<<6|Qr[e.charCodeAt(r+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===o&&(t=Qr[e.charCodeAt(r)]<<2|Qr[e.charCodeAt(r+1)]>>4,a[s++]=255&t),1===o&&(t=Qr[e.charCodeAt(r)]<<10|Qr[e.charCodeAt(r+1)]<<4|Qr[e.charCodeAt(r+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(rn(e,a,a+o>s?s:a+o));return 1===n?(t=e[r-1],i.push(Zr[t>>2]+Zr[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Zr[t>>10]+Zr[t>>4&63]+Zr[t<<2&63]+"=")),i.join("")}},Zr=[],Qr=[],Jr="undefined"!=typeof Uint8Array?Uint8Array:Array,Xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$r=0,en=Xr.length;$r<en;++$r)Zr[$r]=Xr[$r],Qr[Xr.charCodeAt($r)]=$r;function tn(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 rn(e,t,r){for(var n,i,o=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(Zr[(i=n)>>18&63]+Zr[i>>12&63]+Zr[i>>6&63]+Zr[63&i]);return o.join("")}Qr["-".charCodeAt(0)]=62,Qr["_".charCodeAt(0)]=63;var nn={
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
read:function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},write:function(e,t,r,n,i,o){var a,s,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=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=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-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,f+=i;f>0;e[r+d]=255&a,d+=p,a/=256,f-=8);e[r+d-p]|=128*g}};
/*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <https://feross.org>
             * @license  MIT
             */!function(e){var t=Gr,r=nn,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=o(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t=0|l(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||F(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),o(e<0?0:0|l(e))}function h(e){for(var t=e.length<0?0:0|l(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function c(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,a.prototype),n}function l(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function p(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 R(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(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),F(r=+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=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(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 f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var h=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(e,o+l)!==f(t,l)){c=!1;break}if(c)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;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(F(s))return a;e[r+a]=s}return a}function v(e,t,r,n){return N(T(t,e.length-r),e,r,n)}function A(e,t,r,n){return N(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return N(D(t),e,r,n)}function _(e,t,r,n){return N(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 M(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,f=e[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=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&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return f(e)},a.allocUnsafeSlow=function(e){return f(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');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},a.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}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(U(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.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)g(this,t,t+1);return this},a.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)g(this,t,t+3),g(this,t+1,t+2);return this},a.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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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),s=(r>>>=0)-(t>>>=0),u=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r),c=0;c<u;++c)if(f[c]!==h[c]){o=f[c],s=h[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},a.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 v(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return w(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}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function k(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 R(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+=q[e[o]];return i}function x(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(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 P(e,t,r,n,i,o){if(!a.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,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 I(e,t,n,i,o){return t=+t,n>>>=0,o||B(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,o){return t=+t,n>>>=0,o||B(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(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},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(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},a.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(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},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(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},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(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},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(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},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));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 s=a.isBuffer(e)?e:a.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%u]}return this};var j=/[^+/0-9A-Za-z-_]/g;function T(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 D(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(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}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function F(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()}(Yr);var on={},an={},sn={},un={},fn={exports:{}},hn={exports:{}};
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */!function(e,t){var r=Yr,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(hn,hn.exports);var cn=hn.exports.Buffer,ln=P.crypto||P.msCrypto;ln&&ln.getRandomValues?fn.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=cn.allocUnsafe(e);if(e>0)if(e>65536)for(var n=0;n<e;n+=65536)ln.getRandomValues(r.slice(n,n+65536));else ln.getRandomValues(r);return"function"==typeof t?y((function(){t(null,r)})):r}:fn.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var dn={exports:{}};"function"==typeof Object.create?dn.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:dn.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var pn,gn={exports:{}},bn={exports:{}},yn="object"==typeof Reflect?Reflect:null,mn=yn&&"function"==typeof yn.apply?yn.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};pn=yn&&"function"==typeof yn.ownKeys?yn.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var vn=Number.isNaN||function(e){return e!=e};function An(){An.init.call(this)}bn.exports=An,bn.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))}On(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&On(e,"error",t,{once:!0})}(e,i)}))},An.EventEmitter=An,An.prototype._events=void 0,An.prototype._eventsCount=0,An.prototype._maxListeners=void 0;var wn=10;function _n(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Mn(e){return void 0===e._maxListeners?An.defaultMaxListeners:e._maxListeners}function Sn(e,t,r,n){var i,o,a,s;if(_n(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=Mn(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 En(){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 kn(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=En.bind(n);return i.listener=r,n.wrapFn=i,i}function Cn(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):xn(i,i.length)}function Rn(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 xn(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function On(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(An,"defaultMaxListeners",{enumerable:!0,get:function(){return wn},set:function(e){if("number"!=typeof e||e<0||vn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");wn=e}}),An.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},An.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||vn(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},An.prototype.getMaxListeners=function(){return Mn(this)},An.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 o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)mn(s,this,t);else{var u=s.length,f=xn(s,u);for(r=0;r<u;++r)mn(f[r],this,t)}return!0},An.prototype.addListener=function(e,t){return Sn(this,e,t,!1)},An.prototype.on=An.prototype.addListener,An.prototype.prependListener=function(e,t){return Sn(this,e,t,!0)},An.prototype.once=function(e,t){return _n(t),this.on(e,kn(this,e,t)),this},An.prototype.prependOnceListener=function(e,t){return _n(t),this.prependListener(e,kn(this,e,t)),this},An.prototype.removeListener=function(e,t){var r,n,i,o,a;if(_n(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},An.prototype.off=An.prototype.removeListener,An.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},An.prototype.listeners=function(e){return Cn(this,e,!0)},An.prototype.rawListeners=function(e){return Cn(this,e,!1)},An.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Rn.call(e,t)},An.prototype.listenerCount=Rn,An.prototype.eventNames=function(){return this._eventsCount>0?pn(this._events):[]};var Pn,Bn,In=bn.exports.EventEmitter,Ln=B(Object.freeze({__proto__:null,default:{}}));function jn(){if(Bn)return Pn;function e(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 t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Bn=1;var r=Yr.Buffer,n=Ln.inspect,i=n&&n.custom||"inspect";function o(e,t,n){r.prototype.copy.call(e,t,n)}return Pn=function(){function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.head=null,this.tail=null,this.length=0}var s;return s=[{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 r.alloc(0);for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)o(n.data,t,i),i+=n.data.length,n=n.next;return t}},{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=r.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i}return this.length-=i,t}},{key:i,value:function(r,i){return n(this,function(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){t(r,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}({},i,{depth:0,customInspect:!1}))}}],s&&function(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)}}(a.prototype,s),a}(),Pn}function Tn(e,t){Nn(e,t),Dn(e)}function Dn(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Nn(e,t){e.emit("error",t)}var Un={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,y(Nn,this,e)):y(Nn,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?y(Dn,r):(r._writableState.errorEmitted=!0,y(Tn,r,e)):y(Tn,r,e):t?(y(Dn,r),t(e)):y(Dn,r)})),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)}},Fn={},qn={};function Wn(e,t,r){r||(r=Error);var n=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);n.prototype.name=r.name,n.prototype.code=e,qn[e]=n}function zn(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))}Wn("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Wn("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o;if("string"==typeof t&&(i="not ",t.substr(0,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"))o="The ".concat(e," ").concat(n," ").concat(zn(t,"type"));else{var a=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(zn(t,"type"))}return o+". Received type ".concat(typeof r)}),TypeError),Wn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Wn("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Wn("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Wn("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Wn("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Wn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Wn("ERR_STREAM_WRITE_AFTER_END","write after end"),Wn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Wn("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Wn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Fn.codes=qn;var Vn,Hn,Kn,Yn,Gn=Fn.codes.ERR_INVALID_OPT_VALUE,Zn=function(e,t,r,n){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new Gn(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384},Qn=function(e,t){if(Jn("noDeprecation"))return e;var r=!1;return function(){if(!r){if(Jn("throwDeprecation"))throw new Error(t);Jn("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function Jn(e){try{if(!P.localStorage)return!1}catch(e){return!1}var t=P.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}function Xn(){if(Hn)return Vn;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Hn=1,Vn=_,_.WritableState=w;var r,n=Qn,i=In,o=Yr.Buffer,a=P.Uint8Array||function(){},s=Un,u=Zn,f=Fn.codes,h=f.ERR_INVALID_ARG_TYPE,c=f.ERR_METHOD_NOT_IMPLEMENTED,l=f.ERR_MULTIPLE_CALLBACK,d=f.ERR_STREAM_CANNOT_PIPE,p=f.ERR_STREAM_DESTROYED,g=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,m=f.ERR_UNKNOWN_ENCODING,v=s.errorOrDestroy;function A(){}function w(r,n,i){t=t||$n(),r=r||{},"boolean"!=typeof i&&(i=n instanceof t),this.objectMode=!!r.objectMode,i&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=u(this,r,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.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"!=typeof i)throw new l;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?(y(i,n),y(R,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),R(e,t))}(e,r,n,t,i);else{var o=k(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),n?y(S,e,r,o,i):S(e,r,o,i)}}(n,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!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function _(e){var n=this instanceof(t=t||$n());if(!n&&!r.call(_,this))return new _(e);this._writableState=new w(e,this,n),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)),i.call(this)}function M(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),R(e,t)}function E(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,M(t,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,h=n.encoding,c=n.callback;if(M(t,r,!1,r.objectMode?1:f.length,f,h,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var r=k(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,y(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return dn.exports(_,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n((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]?(r=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!r.call(this,e)||this===_&&e&&e._writableState instanceof w}})):r=function(e){return e instanceof this},_.prototype.pipe=function(){v(this,new d)},_.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&function(e){return o.isBuffer(e)||e instanceof a}(e);return s&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=A),n.ending?function(e,t){var r=new b;v(e,r),y(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new g:"string"==typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(v(e,i),y(n,i),!1)}(this,n,e,r))&&(n.pendingcb++,i=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,u,n,i,a);return f}(this,n,s,e,t,r)),i},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},_.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 m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,r){r(new c("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?y(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=s.destroy,_.prototype._undestroy=s.undestroy,_.prototype._destroy=function(e,t){t(e)},Vn}function $n(){if(Yn)return Kn;Yn=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Kn=a;var t=li(),r=Xn();dn.exports(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.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",s)))}function s(){this._writableState.ended||y(u,this)}function u(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),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._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)}}),Kn}var ei,ti={};function ri(){if(ei)return ti;ei=1;var e=hn.exports.Buffer,t=e.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 r(r){var n;switch(this.encoding=function(r){var n=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}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=s,this.end=u,n=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(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 o(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 a(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 s(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 u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}return ti.StringDecoder=r,r.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||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var o=n(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<r||-2===o?0:(o=n(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<r||-2===o?0:(o=n(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.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},ti}var ni=Fn.codes.ERR_STREAM_PREMATURE_CLOSE;function ii(){}var oi,ai,si,ui,fi,hi,ci=function e(t,r,n){if("function"==typeof r)return e(t,null,r);r||(r={}),n=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)}}}(n||ii);var i=r.readable||!1!==r.readable&&t.readable,o=r.writable||!1!==r.writable&&t.writable,a=function(){t.writable||u()},s=t._writableState&&t._writableState.finished,u=function(){o=!1,s=!0,i||n.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){i=!1,f=!0,o||n.call(t)},c=function(e){n.call(t,e)},l=function(){var e;return i&&!f?(t._readableState&&t._readableState.ended||(e=new ni),n.call(t,e)):o&&!s?(t._writableState&&t._writableState.ended||(e=new ni),n.call(t,e)):void 0},d=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",l),t.req?d():t.on("request",d)):o&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",h),t.on("finish",u),!1!==r.error&&t.on("error",c),t.on("close",l),function(){t.removeListener("complete",u),t.removeListener("abort",l),t.removeListener("request",d),t.req&&t.req.removeListener("finish",u),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",c),t.removeListener("close",l)}};function li(){if(hi)return fi;var e;hi=1,fi=_,_.ReadableState=w,bn.exports.EventEmitter;var t,r=function(e,t){return e.listeners(t).length},n=In,i=Yr.Buffer,o=P.Uint8Array||function(){},a=Ln;t=a&&a.debuglog?a.debuglog("stream"):function(){};var s,u,f,h=jn(),c=Un,l=Zn,d=Fn.codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_STREAM_PUSH_AFTER_EOF,b=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;dn.exports(_,n);var v=c.errorOrDestroy,A=["error","close","destroy","pause","resume"];function w(t,r,n){e=e||$n(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=l(this,t,"readableHighWaterMark",n),this.buffer=new h,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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s||(s=ri().StringDecoder),this.decoder=new s(t.encoding),this.encoding=t.encoding)}function _(t){if(e=e||$n(),!(this instanceof _))return new _(t);var r=this instanceof e;this._readableState=new w(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function M(e,r,n,a,s){t("readableAddChunk",r);var u,f=e._readableState;if(null===r)f.reading=!1,function(e,r){if(t("onEofChunk"),!r.ended){if(r.decoder){var n=r.decoder.end();n&&n.length&&(r.buffer.push(n),r.length+=r.objectMode?1:n.length)}r.ended=!0,r.sync?C(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,R(e)))}}(e,f);else if(s||(u=function(e,t){var r;return function(e){return i.isBuffer(e)||e instanceof o}(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new p("chunk",["string","Buffer","Uint8Array"],t)),r}(f,r)),u)v(e,u);else if(f.objectMode||r&&r.length>0)if("string"==typeof r||f.objectMode||Object.getPrototypeOf(r)===i.prototype||(r=function(e){return i.from(e)}(r)),a)f.endEmitted?v(e,new m):S(e,f,r,!0);else if(f.ended)v(e,new g);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!n?(r=f.decoder.write(r),f.objectMode||0!==r.length?S(e,f,r,!1):x(e,f)):S(e,f,r,!1)}else a||(f.reading=!1,x(e,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function S(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&&C(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=c.destroy,_.prototype._undestroy=c.undestroy,_.prototype._destroy=function(e,t){t(e)},_.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=i.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},_.prototype.unshift=function(e){return M(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){s||(s=ri().StringDecoder);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var E=1073741824;function k(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>=E?e=E:(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 C(e){var r=e._readableState;t("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(t("emitReadable",r.flowing),r.emittedReadable=!0,y(R,e))}function R(e){var r=e._readableState;t("emitReadable_",r.destroyed,r.length,r.ended),r.destroyed||!r.length&&!r.ended||(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,y(B,e,t))}function B(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&0===r.length);){var n=r.length;if(t("maybeReadMore read 0"),e.read(0),n===r.length)break}r.readingMore=!1}function I(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 L(e){t("readable nexttick read 0"),e.read(0)}function j(e,r){t("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),T(e),r.flowing&&!r.reading&&e.read(0)}function T(e){var r=e._readableState;for(t("flow",r.flowing);r.flowing&&null!==e.read(););}function D(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 N(e){var r=e._readableState;t("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,y(U,r,e))}function U(e,r){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var n=r._writableState;(!n||n.autoDestroy&&n.finished)&&r.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return _.prototype.read=function(e){t("read",e),e=parseInt(e,10);var r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return t("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?N(this):C(this),null;if(0===(e=k(e,r))&&r.ended)return 0===r.length&&N(this),null;var i,o=r.needReadable;return t("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&t("length less than watermark",o=!0),r.ended||r.reading?t("reading or ended",o=!1):o&&(t("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=k(n,r))),null===(i=e>0?D(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&N(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(e){v(this,new b("_read()"))},_.prototype.pipe=function(e,n){var i=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,t("pipe count=%d opts=%j",o.pipesCount,n);var a=n&&!1===n.end||e===O.stdout||e===O.stderr?p:s;function s(){t("onend"),e.end()}o.endEmitted?y(a):i.once("end",a),e.on("unpipe",(function r(n,a){t("onunpipe"),n===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,t("cleanup"),e.removeListener("close",l),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",r),i.removeListener("end",s),i.removeListener("end",p),i.removeListener("data",h),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var n=e._readableState;t("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&r(e,"data")&&(n.flowing=!0,T(e))}}(i);e.on("drain",u);var f=!1;function h(r){t("ondata");var n=e.write(r);t("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!f&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function c(n){t("onerror",n),p(),e.removeListener("error",c),0===r(e,"error")&&v(e,n)}function l(){e.removeListener("finish",d),p()}function d(){t("onfinish"),e.removeListener("close",l),p()}function p(){t("unpipe"),i.unpipe(e)}return i.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",c),e.once("close",l),e.once("finish",d),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},_.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=F(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},_.prototype.on=function(e,r){var i=n.prototype.on.call(this,e,r),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?C(this):o.reading||y(L,this))),i},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var r=n.prototype.removeListener.call(this,e,t);return"readable"===e&&y(I,this),r},_.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||y(I,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,y(j,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var r=this,n=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(o){t("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(r.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<A.length;a++)e.on(A[a],this.emit.bind(this,A[a]));return this._read=function(r){t("wrapped _read",r),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=function(){if(ai)return oi;var e;function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}ai=1;var r=ci,n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function c(e){var t=e[n];if(null!==t){var r=e[f].read();null!==r&&(e[s]=null,e[n]=null,e[i]=null,t(h(r,!1)))}}function l(e){y(c,e)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[f]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){y((function(){e[o]?r(e[o]):t(h(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[a]?r(h(void 0,!0)):t[u](r,n)}),n)}}(n,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[u])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),e),d);return oi=function(e){var c,d=Object.create(p,(t(c={},f,{value:e,writable:!0}),t(c,n,{value:null,writable:!0}),t(c,i,{value:null,writable:!0}),t(c,o,{value:null,writable:!0}),t(c,a,{value:e._readableState.endEmitted,writable:!0}),t(c,u,{value:function(e,t){var r=d[f].read();r?(d[s]=null,d[n]=null,d[i]=null,e(h(r,!1))):(d[n]=e,d[i]=t)},writable:!0}),c));return d[s]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=d[i];return null!==t&&(d[s]=null,d[n]=null,d[i]=null,t(e)),void(d[o]=e)}var r=d[n];null!==r&&(d[s]=null,d[n]=null,d[i]=null,r(h(void 0,!0))),d[a]=!0})),e.on("readable",l.bind(null,d)),d},oi}()),u(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=D,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return void 0===f&&(f=ui?si:(ui=1,si=function(){throw new Error("Readable.from is not available in the browser")})),f(_,e,t)}),fi}var di=wi,pi=Fn.codes,gi=pi.ERR_METHOD_NOT_IMPLEMENTED,bi=pi.ERR_MULTIPLE_CALLBACK,yi=pi.ERR_TRANSFORM_ALREADY_TRANSFORMING,mi=pi.ERR_TRANSFORM_WITH_LENGTH_0,vi=$n();function Ai(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new bi);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 wi(e){if(!(this instanceof wi))return new wi(e);vi.call(this,e),this._transformState={afterTransform:Ai.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",_i)}function _i(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?Mi(this,null,null):this._flush((function(t,r){Mi(e,t,r)}))}function Mi(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new mi;if(e._transformState.transforming)throw new yi;return e.push(null)}dn.exports(wi,vi),wi.prototype.push=function(e,t){return this._transformState.needTransform=!1,vi.prototype.push.call(this,e,t)},wi.prototype._transform=function(e,t,r){r(new gi("_transform()"))},wi.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)}},wi.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))},wi.prototype._destroy=function(e,t){vi.prototype._destroy.call(this,e,(function(e){t(e)}))};var Si,Ei=Ci,ki=di;function Ci(e){if(!(this instanceof Ci))return new Ci(e);ki.call(this,e)}dn.exports(Ci,ki),Ci.prototype._transform=function(e,t,r){r(null,e)};var Ri=Fn.codes,xi=Ri.ERR_MISSING_ARGS,Oi=Ri.ERR_STREAM_DESTROYED;function Pi(e){if(e)throw e}function Bi(e,t,r,n){n=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(n);var i=!1;e.on("close",(function(){i=!0})),void 0===Si&&(Si=ci),Si(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void n(t||new Oi("pipe"))}}function Ii(e){e()}function Li(e,t){return e.pipe(t)}function ji(e){return e.length?"function"!=typeof e[e.length-1]?Pi:e.pop():Pi}var Ti=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=ji(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new xi("streams");var o=t.map((function(e,r){var a=r<t.length-1;return Bi(e,a,r>0,(function(e){n||(n=e),e&&o.forEach(Ii),a||(o.forEach(Ii),i(n))}))}));return t.reduce(Li)};!function(e,t){(t=gn.exports=li()).Stream=t,t.Readable=t,t.Writable=Xn(),t.Duplex=$n(),t.Transform=di,t.PassThrough=Ei,t.finished=ci,t.pipeline=Ti}(0,gn.exports);var Di=hn.exports.Buffer,Ni=gn.exports.Transform;function Ui(e){Ni.call(this),this._block=Di.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}(0,dn.exports)(Ui,Ni),Ui.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},Ui.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},Ui.prototype.update=function(e,t){if(function(e,t){if(!Di.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");Di.isBuffer(e)||(e=Di.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var o=0,a=8*e.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},Ui.prototype._update=function(){throw new Error("_update is not implemented")},Ui.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},Ui.prototype._digest=function(){throw new Error("_digest is not implemented")};var Fi=Ui,qi=dn.exports,Wi=Fi,zi=hn.exports.Buffer,Vi=new Array(16);function Hi(){Wi.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Ki(e,t){return e<<t|e>>>32-t}function Yi(e,t,r,n,i,o,a){return Ki(e+(t&r|~t&n)+i+o|0,a)+t|0}function Gi(e,t,r,n,i,o,a){return Ki(e+(t&n|r&~n)+i+o|0,a)+t|0}function Zi(e,t,r,n,i,o,a){return Ki(e+(t^r^n)+i+o|0,a)+t|0}function Qi(e,t,r,n,i,o,a){return Ki(e+(r^(t|~n))+i+o|0,a)+t|0}qi(Hi,Wi),Hi.prototype._update=function(){for(var e=Vi,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=Yi(r,n,i,o,e[0],3614090360,7),o=Yi(o,r,n,i,e[1],3905402710,12),i=Yi(i,o,r,n,e[2],606105819,17),n=Yi(n,i,o,r,e[3],3250441966,22),r=Yi(r,n,i,o,e[4],4118548399,7),o=Yi(o,r,n,i,e[5],1200080426,12),i=Yi(i,o,r,n,e[6],2821735955,17),n=Yi(n,i,o,r,e[7],4249261313,22),r=Yi(r,n,i,o,e[8],1770035416,7),o=Yi(o,r,n,i,e[9],2336552879,12),i=Yi(i,o,r,n,e[10],4294925233,17),n=Yi(n,i,o,r,e[11],2304563134,22),r=Yi(r,n,i,o,e[12],1804603682,7),o=Yi(o,r,n,i,e[13],4254626195,12),i=Yi(i,o,r,n,e[14],2792965006,17),r=Gi(r,n=Yi(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=Gi(o,r,n,i,e[6],3225465664,9),i=Gi(i,o,r,n,e[11],643717713,14),n=Gi(n,i,o,r,e[0],3921069994,20),r=Gi(r,n,i,o,e[5],3593408605,5),o=Gi(o,r,n,i,e[10],38016083,9),i=Gi(i,o,r,n,e[15],3634488961,14),n=Gi(n,i,o,r,e[4],3889429448,20),r=Gi(r,n,i,o,e[9],568446438,5),o=Gi(o,r,n,i,e[14],3275163606,9),i=Gi(i,o,r,n,e[3],4107603335,14),n=Gi(n,i,o,r,e[8],1163531501,20),r=Gi(r,n,i,o,e[13],2850285829,5),o=Gi(o,r,n,i,e[2],4243563512,9),i=Gi(i,o,r,n,e[7],1735328473,14),r=Zi(r,n=Gi(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=Zi(o,r,n,i,e[8],2272392833,11),i=Zi(i,o,r,n,e[11],1839030562,16),n=Zi(n,i,o,r,e[14],4259657740,23),r=Zi(r,n,i,o,e[1],2763975236,4),o=Zi(o,r,n,i,e[4],1272893353,11),i=Zi(i,o,r,n,e[7],4139469664,16),n=Zi(n,i,o,r,e[10],3200236656,23),r=Zi(r,n,i,o,e[13],681279174,4),o=Zi(o,r,n,i,e[0],3936430074,11),i=Zi(i,o,r,n,e[3],3572445317,16),n=Zi(n,i,o,r,e[6],76029189,23),r=Zi(r,n,i,o,e[9],3654602809,4),o=Zi(o,r,n,i,e[12],3873151461,11),i=Zi(i,o,r,n,e[15],530742520,16),r=Qi(r,n=Zi(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=Qi(o,r,n,i,e[7],1126891415,10),i=Qi(i,o,r,n,e[14],2878612391,15),n=Qi(n,i,o,r,e[5],4237533241,21),r=Qi(r,n,i,o,e[12],1700485571,6),o=Qi(o,r,n,i,e[3],2399980690,10),i=Qi(i,o,r,n,e[10],4293915773,15),n=Qi(n,i,o,r,e[1],2240044497,21),r=Qi(r,n,i,o,e[8],1873313359,6),o=Qi(o,r,n,i,e[15],4264355552,10),i=Qi(i,o,r,n,e[6],2734768916,15),n=Qi(n,i,o,r,e[13],1309151649,21),r=Qi(r,n,i,o,e[4],4149444226,6),o=Qi(o,r,n,i,e[11],3174756917,10),i=Qi(i,o,r,n,e[2],718787259,15),n=Qi(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},Hi.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=zi.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var Ji=Hi,Xi=Yr.Buffer,$i=dn.exports,eo=Fi,to=new Array(16),ro=[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],no=[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],io=[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],oo=[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],ao=[0,1518500249,1859775393,2400959708,2840853838],so=[1352829926,1548603684,1836072691,2053994217,0];function uo(){eo.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function fo(e,t){return e<<t|e>>>32-t}function ho(e,t,r,n,i,o,a,s){return fo(e+(t^r^n)+o+a|0,s)+i|0}function co(e,t,r,n,i,o,a,s){return fo(e+(t&r|~t&n)+o+a|0,s)+i|0}function lo(e,t,r,n,i,o,a,s){return fo(e+((t|~r)^n)+o+a|0,s)+i|0}function po(e,t,r,n,i,o,a,s){return fo(e+(t&n|r&~n)+o+a|0,s)+i|0}function go(e,t,r,n,i,o,a,s){return fo(e+(t^(r|~n))+o+a|0,s)+i|0}$i(uo,eo),uo.prototype._update=function(){for(var e=to,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,a=0|this._e,s=0|this._a,u=0|this._b,f=0|this._c,h=0|this._d,c=0|this._e,l=0;l<80;l+=1){var d,p;l<16?(d=ho(r,n,i,o,a,e[ro[l]],ao[0],io[l]),p=go(s,u,f,h,c,e[no[l]],so[0],oo[l])):l<32?(d=co(r,n,i,o,a,e[ro[l]],ao[1],io[l]),p=po(s,u,f,h,c,e[no[l]],so[1],oo[l])):l<48?(d=lo(r,n,i,o,a,e[ro[l]],ao[2],io[l]),p=lo(s,u,f,h,c,e[no[l]],so[2],oo[l])):l<64?(d=po(r,n,i,o,a,e[ro[l]],ao[3],io[l]),p=co(s,u,f,h,c,e[no[l]],so[3],oo[l])):(d=go(r,n,i,o,a,e[ro[l]],ao[4],io[l]),p=ho(s,u,f,h,c,e[no[l]],so[4],oo[l])),r=a,a=o,o=fo(i,10),i=n,n=d,s=c,c=h,h=fo(f,10),f=u,u=p}var g=this._b+i+h|0;this._b=this._c+o+c|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+n+f|0,this._a=g},uo.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=Xi.alloc?Xi.alloc(20):new Xi(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};var bo=uo,yo={exports:{}},mo=hn.exports.Buffer;function vo(e,t){this._block=mo.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}vo.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=mo.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,o=this._len,a=0;a<i;){for(var s=o%n,u=Math.min(i-a,n-s),f=0;f<u;f++)r[s+f]=e[a+f];a+=u,(o+=u)%n==0&&this._update(r)}return this._len+=i,this},vo.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},vo.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ao=vo,wo=dn.exports,_o=Ao,Mo=hn.exports.Buffer,So=[1518500249,1859775393,-1894007588,-899497514],Eo=new Array(80);function ko(){this.init(),this._w=Eo,_o.call(this,64,56)}function Co(e){return e<<30|e>>>2}function Ro(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}wo(ko,_o),ko.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},ko.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=r[u-3]^r[u-8]^r[u-14]^r[u-16];for(var f=0;f<80;++f){var h=~~(f/20),c=0|((t=n)<<5|t>>>27)+Ro(h,i,o,a)+s+r[f]+So[h];s=a,a=o,o=Co(i),i=n,n=c}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},ko.prototype._hash=function(){var e=Mo.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};var xo=ko,Oo=dn.exports,Po=Ao,Bo=hn.exports.Buffer,Io=[1518500249,1859775393,-1894007588,-899497514],Lo=new Array(80);function jo(){this.init(),this._w=Lo,Po.call(this,64,56)}function To(e){return e<<5|e>>>27}function Do(e){return e<<30|e>>>2}function No(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}Oo(jo,Po),jo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},jo.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=(t=r[u-3]^r[u-8]^r[u-14]^r[u-16])<<1|t>>>31;for(var f=0;f<80;++f){var h=~~(f/20),c=To(n)+No(h,i,o,a)+s+r[f]+Io[h]|0;s=a,a=o,o=Do(i),i=n,n=c}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},jo.prototype._hash=function(){var e=Bo.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};var Uo=jo,Fo=dn.exports,qo=Ao,Wo=hn.exports.Buffer,zo=[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],Vo=new Array(64);function Ho(){this.init(),this._w=Vo,qo.call(this,64,56)}function Ko(e,t,r){return r^e&(t^r)}function Yo(e,t,r){return e&t|r&(e|t)}function Go(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Zo(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Qo(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}Fo(Ho,qo),Ho.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},Ho.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0|this._f,f=0|this._g,h=0|this._h,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<64;++c)r[c]=0|(((t=r[c-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[c-7]+Qo(r[c-15])+r[c-16];for(var l=0;l<64;++l){var d=h+Zo(s)+Ko(s,u,f)+zo[l]+r[l]|0,p=Go(n)+Yo(n,i,o)|0;h=f,f=u,u=s,s=a+d|0,a=o,o=i,i=n,n=d+p|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=f+this._g|0,this._h=h+this._h|0},Ho.prototype._hash=function(){var e=Wo.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};var Jo=Ho,Xo=dn.exports,$o=Jo,ea=Ao,ta=hn.exports.Buffer,ra=new Array(64);function na(){this.init(),this._w=ra,ea.call(this,64,56)}Xo(na,$o),na.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},na.prototype._hash=function(){var e=ta.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};var ia=na,oa=dn.exports,aa=Ao,sa=hn.exports.Buffer,ua=[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],fa=new Array(160);function ha(){this.init(),this._w=fa,aa.call(this,128,112)}function ca(e,t,r){return r^e&(t^r)}function la(e,t,r){return e&t|r&(e|t)}function da(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function pa(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function ga(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function ba(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function ya(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function ma(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function va(e,t){return e>>>0<t>>>0?1:0}oa(ha,aa),ha.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},ha.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,a=0|this._eh,s=0|this._fh,u=0|this._gh,f=0|this._hh,h=0|this._al,c=0|this._bl,l=0|this._cl,d=0|this._dl,p=0|this._el,g=0|this._fl,b=0|this._gl,y=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 v=t[m-30],A=t[m-30+1],w=ga(v,A),_=ba(A,v),M=ya(v=t[m-4],A=t[m-4+1]),S=ma(A,v),E=t[m-14],k=t[m-14+1],C=t[m-32],R=t[m-32+1],x=_+k|0,O=w+E+va(x,_)|0;O=(O=O+M+va(x=x+S|0,S)|0)+C+va(x=x+R|0,R)|0,t[m]=O,t[m+1]=x}for(var P=0;P<160;P+=2){O=t[P],x=t[P+1];var B=la(r,n,i),I=la(h,c,l),L=da(r,h),j=da(h,r),T=pa(a,p),D=pa(p,a),N=ua[P],U=ua[P+1],F=ca(a,s,u),q=ca(p,g,b),W=y+D|0,z=f+T+va(W,y)|0;z=(z=(z=z+F+va(W=W+q|0,q)|0)+N+va(W=W+U|0,U)|0)+O+va(W=W+x|0,x)|0;var V=j+I|0,H=L+B+va(V,j)|0;f=u,y=b,u=s,b=g,s=a,g=p,a=o+z+va(p=d+W|0,d)|0,o=i,d=l,i=n,l=c,n=r,c=h,r=z+H+va(h=W+V|0,W)|0}this._al=this._al+h|0,this._bl=this._bl+c|0,this._cl=this._cl+l|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+g|0,this._gl=this._gl+b|0,this._hl=this._hl+y|0,this._ah=this._ah+r+va(this._al,h)|0,this._bh=this._bh+n+va(this._bl,c)|0,this._ch=this._ch+i+va(this._cl,l)|0,this._dh=this._dh+o+va(this._dl,d)|0,this._eh=this._eh+a+va(this._el,p)|0,this._fh=this._fh+s+va(this._fl,g)|0,this._gh=this._gh+u+va(this._gl,b)|0,this._hh=this._hh+f+va(this._hl,y)|0},ha.prototype._hash=function(){var e=sa.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};var Aa=ha,wa=dn.exports,_a=Aa,Ma=Ao,Sa=hn.exports.Buffer,Ea=new Array(160);function ka(){this.init(),this._w=Ea,Ma.call(this,128,112)}wa(ka,_a),ka.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},ka.prototype._hash=function(){var e=Sa.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};var Ca=ka,Ra=yo.exports=function(e){e=e.toLowerCase();var t=Ra[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Ra.sha=xo,Ra.sha1=Uo,Ra.sha224=ia,Ra.sha256=Jo,Ra.sha384=Ca,Ra.sha512=Aa;var xa={},Oa={},Pa=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0},Ba=Pa,Ia=function(){return Ba()&&!!Symbol.toStringTag},La="undefined"!=typeof Symbol&&Symbol,ja=Pa,Ta="Function.prototype.bind called on incompatible ",Da=Array.prototype.slice,Na=Object.prototype.toString,Ua=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Na.call(t))throw new TypeError(Ta+t);for(var r,n=Da.call(arguments,1),i=function(){if(this instanceof r){var i=t.apply(this,n.concat(Da.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(Da.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s<o;s++)a.push("$"+s);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r},Fa=Ua.call(Function.call,Object.prototype.hasOwnProperty),qa=SyntaxError,Wa=Function,za=TypeError,Va=function(e){try{return Wa('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ha=Object.getOwnPropertyDescriptor;if(Ha)try{Ha({},"")}catch(t){Ha=null}var Ka=function(){throw new za},Ya=Ha?function(){try{return Ka}catch(e){try{return Ha(arguments,"callee").get}catch(e){return Ka}}}():Ka,Ga="function"==typeof La&&"function"==typeof Symbol&&"symbol"==typeof La("foo")&&"symbol"==typeof Symbol("bar")&&ja(),Za=Object.getPrototypeOf||function(e){return e.__proto__},Qa={},Ja="undefined"==typeof Uint8Array?void 0:Za(Uint8Array),Xa={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Ga?Za([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Qa,"%AsyncGenerator%":Qa,"%AsyncGeneratorFunction%":Qa,"%AsyncIteratorPrototype%":Qa,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":Wa,"%GeneratorFunction%":Qa,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ga?Za(Za([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ga?Za((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ga?Za((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ga?Za(""[Symbol.iterator]()):void 0,"%Symbol%":Ga?Symbol:void 0,"%SyntaxError%":qa,"%ThrowTypeError%":Ya,"%TypedArray%":Ja,"%TypeError%":za,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},$a=function e(t){var r;if("%AsyncFunction%"===t)r=Va("async function () {}");else if("%GeneratorFunction%"===t)r=Va("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=Va("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=Za(i.prototype))}return Xa[t]=r,r},es={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ts=Ua,rs=Fa,ns=ts.call(Function.call,Array.prototype.concat),is=ts.call(Function.apply,Array.prototype.splice),os=ts.call(Function.call,String.prototype.replace),as=ts.call(Function.call,String.prototype.slice),ss=ts.call(Function.call,RegExp.prototype.exec),us=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fs=/\\(\\)?/g,hs=function(e){var t=as(e,0,1),r=as(e,-1);if("%"===t&&"%"!==r)throw new qa("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new qa("invalid intrinsic syntax, expected opening `%`");var n=[];return os(e,us,(function(e,t,r,i){n[n.length]=r?os(i,fs,"$1"):t||e})),n},cs=function(e,t){var r,n=e;if(rs(es,n)&&(n="%"+(r=es[n])[0]+"%"),rs(Xa,n)){var i=Xa[n];if(i===Qa&&(i=$a(n)),void 0===i&&!t)throw new za("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new qa("intrinsic "+e+" does not exist!")},ls=function(e,t){if("string"!=typeof e||0===e.length)throw new za("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new za('"allowMissing" argument must be a boolean');if(null===ss(/^%?[^%]*%?$/g,e))throw new qa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=hs(e),n=r.length>0?r[0]:"",i=cs("%"+n+"%",t),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],is(r,ns([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var c=r[f],l=as(c,0,1),d=as(c,-1);if(('"'===l||"'"===l||"`"===l||'"'===d||"'"===d||"`"===d)&&l!==d)throw new qa("property names with quotes must have matching quotes");if("constructor"!==c&&h||(s=!0),rs(Xa,o="%"+(n+="."+c)+"%"))a=Xa[o];else if(null!=a){if(!(c in a)){if(!t)throw new za("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ha&&f+1>=r.length){var p=Ha(a,c);a=(h=!!p)&&"get"in p&&!("originalValue"in p.get)?p.get:a[c]}else h=rs(a,c),a=a[c];h&&!s&&(Xa[o]=a)}}return a},ds={exports:{}};!function(e){var t=Ua,r=ls,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var r=o(t,i,arguments);if(a&&s){var n=a(r,"length");n.configurable&&s(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var f=function(){return o(t,n,arguments)};s?s(e.exports,"apply",{value:f}):e.exports.apply=f}(ds);var ps=ls,gs=ds.exports,bs=gs(ps("String.prototype.indexOf")),ys=function(e,t){var r=ps(e,!!t);return"function"==typeof r&&bs(e,".prototype.")>-1?gs(r):r},ms=Ia(),vs=ys("Object.prototype.toString"),As=function(e){return!(ms&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===vs(e)},ws=function(e){return!!As(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==vs(e)&&"[object Function]"===vs(e.callee)},_s=function(){return As(arguments)}();As.isLegacyArguments=ws;var Ms,Ss,Es,ks,Cs,Rs=_s?As:ws,xs=Object.prototype.toString,Os=Function.prototype.toString,Ps=/^\s*(?:function)?\*/,Bs=Ia(),Is=Object.getPrototypeOf,Ls=function(e){if("function"!=typeof e)return!1;if(Ps.test(Os.call(e)))return!0;if(!Bs)return"[object GeneratorFunction]"===xs.call(e);if(!Is)return!1;if(void 0===Ms){var t=function(){if(!Bs)return!1;try{return Function("return function*() {}")()}catch(e){}}();Ms=!!t&&Is(t)}return Is(e)===Ms},js=Object.prototype.hasOwnProperty,Ts=Object.prototype.toString,Ds=function(e,t,r){if("[object Function]"!==Ts.call(t))throw new TypeError("iterator must be a function");var n=e.length;if(n===+n)for(var i=0;i<n;i++)t.call(r,e[i],i,e);else for(var o in e)js.call(e,o)&&t.call(r,e[o],o,e)},Ns=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Us="undefined"==typeof globalThis?P:globalThis,Fs=function(){for(var e=[],t=0;t<Ns.length;t++)"function"==typeof Us[Ns[t]]&&(e[e.length]=Ns[t]);return e},qs=Ds,Ws=Fs,zs=ys,Vs=zs("Object.prototype.toString"),Hs=Ia(),Ks="undefined"==typeof globalThis?P:globalThis,Ys=Ws(),Gs=zs("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},Zs=zs("String.prototype.slice"),Qs={},Js=function(){if(Cs)return ks;Cs=1;var e=ls("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return ks=e}(),Xs=Object.getPrototypeOf;Hs&&Js&&Xs&&qs(Ys,(function(e){var t=new Ks[e];if(Symbol.toStringTag in t){var r=Xs(t),n=Js(r,Symbol.toStringTag);if(!n){var i=Xs(r);n=Js(i,Symbol.toStringTag)}Qs[e]=n.get}}));var $s=function(e){if(!e||"object"!=typeof e)return!1;if(!Hs||!(Symbol.toStringTag in e)){var t=Zs(Vs(e),8,-1);return Gs(Ys,t)>-1}return!!Js&&function(e){var t=!1;return qs(Qs,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)},eu=Ds,tu=Fs,ru=ys,nu=ru("Object.prototype.toString"),iu=Ia(),ou="undefined"==typeof globalThis?P:globalThis,au=tu(),su=ru("String.prototype.slice"),uu={},fu=function(){if(Es)return Ss;Es=1;var e=ls("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return Ss=e}(),hu=Object.getPrototypeOf;iu&&fu&&hu&&eu(au,(function(e){if("function"==typeof ou[e]){var t=new ou[e];if(Symbol.toStringTag in t){var r=hu(t),n=fu(r,Symbol.toStringTag);if(!n){var i=hu(r);n=fu(i,Symbol.toStringTag)}uu[e]=n.get}}}));var cu=$s,lu=function(e){return!!cu(e)&&(iu&&Symbol.toStringTag in e?function(e){var t=!1;return eu(uu,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):su(nu(e),8,-1))};!function(e){var t=Rs,r=Ls,n=lu,i=$s;function o(e){return e.call.bind(e)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,u=o(Object.prototype.toString),f=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),c=o(Boolean.prototype.valueOf);if(a)var l=o(BigInt.prototype.valueOf);if(s)var d=o(Symbol.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===u(e)}function b(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function m(e){return"[object WeakSet]"===u(e)}function v(e){return"[object ArrayBuffer]"===u(e)}function A(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function w(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(w.working?w(e):e instanceof DataView)}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i,e.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||_(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},g.working="undefined"!=typeof Map&&g(new Map),e.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},m.working="undefined"!=typeof WeakSet&&m(new WeakSet),e.isWeakSet=function(e){return m(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),e.isArrayBuffer=A,w.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&w(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=_;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===u(e)}function E(e){return void 0!==M&&(void 0===S.working&&(S.working=S(new M)),S.working?S(e):e instanceof M)}function k(e){return p(e,f)}function C(e){return p(e,h)}function R(e){return p(e,c)}function x(e){return a&&p(e,l)}function O(e){return s&&p(e,d)}e.isSharedArrayBuffer=E,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=k,e.isStringObject=C,e.isBooleanObject=R,e.isBigIntObject=x,e.isSymbolObject=O,e.isBoxedPrimitive=function(e){return k(e)||C(e)||R(e)||x(e)||O(e)},e.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(A(e)||E(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}(Oa);var du=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8};function pu(){this.head=null,this.tail=null,this.length=0}!function(e){var t=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},r=/%[sdj%]/g;e.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var i=arguments,o=i.length,s=String(e).replace(r,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}})),u=i[n];n<o;u=i[++n])p(u)||!A(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(t,r){if(void 0!==O&&!0===O.noDeprecation)return t;if(void 0===O)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(O.throwDeprecation)throw new Error(r);O.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},i=/^$/;if(O.env.NODE_DEBUG){var o=O.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}function a(t,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),f(n,t,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function f(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(e,t){if(m(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")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(t,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(t.showHidden&&(a=Object.getOwnPropertyNames(r)),_(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(M(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(_(r))return h(r)}var y,A="",S=!1,E=["{","}"];return l(r)&&(S=!0,E=["[","]"]),M(r)&&(A=" [Function"+(r.name?": "+r.name:"")+"]"),v(r)&&(A=" "+RegExp.prototype.toString.call(r)),w(r)&&(A=" "+Date.prototype.toUTCString.call(r)),_(r)&&(A=" "+h(r)),0!==a.length||S&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),y=S?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)R(t,String(a))?o.push(c(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(c(e,t,r,n,i,!0))})),o}(t,r,n,s,a):a.map((function(e){return c(t,r,n,s,e,S)})),t.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(y,A,E)):E[0]+A+E[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function c(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")),R(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=p(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")),m(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 l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function m(e){return void 0===e}function v(e){return A(e)&&"[object RegExp]"===S(e)}function A(e){return"object"==typeof e&&null!==e}function w(e){return A(e)&&"[object Date]"===S(e)}function _(e){return A(e)&&("[object Error]"===S(e)||e instanceof Error)}function M(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!n[t])if(i.test(t)){var r=O.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=Oa,e.isArray=l,e.isBoolean=d,e.isNull=p,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=b,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=m,e.isRegExp=v,e.types.isRegExp=v,e.isObject=A,e.isDate=w,e.types.isDate=w,e.isError=_,e.types.isNativeError=_,e.isFunction=M,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.isBuffer=du;var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=dn.exports,e._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var r;if("function"!=typeof(r=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,x,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){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(e){r(e)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),x&&Object.defineProperty(r,x,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,t(e))},e.promisify.custom=x,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};e.apply(this,t).then((function(e){y(o.bind(null,null,e))}),(function(e){y(P.bind(null,e,o))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,t(e)),r}}(xa),pu.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},pu.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},pu.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}},pu.prototype.clear=function(){this.head=this.tail=null,this.length=0},pu.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},pu.prototype.concat=function(e){if(0===this.length)return Yr.Buffer.alloc(0);if(1===this.length)return this.head.data;for(var t=Yr.Buffer.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var gu,bu={},yu=Yr.Buffer,mu=yu.isEncoding||function(e){switch(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}},vu=gu=bu.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!mu(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=wu;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=_u;break;default:return void(this.write=Au)}this.charBuffer=new yu(6),this.charReceived=0,this.charLength=0};function Au(e){return e.toString(this.encoding)}function wu(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function _u(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}vu.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(n=t.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},vu.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},vu.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t},Eu.ReadableState=Su;var Mu=xa.debuglog("stream");function Su(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Xu&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new pu,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new gu(e.encoding),this.encoding=e.encoding)}function Eu(e){if(!(this instanceof Eu))return new Eu(e);this._readableState=new Su(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),bn.exports.call(this)}function ku(e,t,r,n,i){var o=function(e,t){var r=null;return br(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,function(e,t){if(!t.ended){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,Ru(e)}}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ru(e))),function(e,t){t.readingMore||(t.readingMore=!0,y(Ou,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}function Cu(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>=8388608?e=8388608:(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 Ru(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Mu("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y(xu,e):xu(e))}function xu(e){Mu("emit readable"),e.emit("readable"),Iu(e)}function Ou(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Mu("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function Pu(e){Mu("readable nexttick read 0"),e.read(0)}function Bu(e,t){t.reading||(Mu("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Iu(e),t.flowing&&!t.reading&&e.read(0)}function Iu(e){var t=e._readableState;for(Mu("flow",t.flowing);t.flowing&&null!==e.read(););}function Lu(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;return 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;for(e-=i.length;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=Lt.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;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),n}(e,t.buffer,t.decoder),r);var r}function ju(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y(Tu,t,e))}function Tu(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Du(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Nu(){}function Uu(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function Fu(e,t){Object.defineProperty(this,"buffer",{get:xa.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Xu&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,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?y(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,i);else{var o=Hu(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||Vu(e,r),n?y(zu,e,r,o,i):zu(e,r,o,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 Gu(this)}function qu(e){if(!(this instanceof qu||this instanceof Xu))return new qu(e);this._writableState=new Fu(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),bn.exports.EventEmitter.call(this)}function Wu(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 zu(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),Yu(e,t)}function Vu(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 a=0;r;)i[a]=r,r=r.next,a+=1;Wu(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 Gu(t)}else{for(;r;){var s=r.chunk,u=r.encoding,f=r.callback;if(Wu(e,t,!1,t.objectMode?1:s.length,s,u,f),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function Hu(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Ku(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Yu(e,t){var r=Hu(t);return r&&(0===t.pendingcb?(Ku(e,t),t.finished=!0,e.emit("finish")):Ku(e,t)),r}function Gu(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}xa.inherits(Eu,bn.exports),Eu.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=Lt.from(e,t),t=""),ku(this,r,e,t,!1)},Eu.prototype.unshift=function(e){return ku(this,this._readableState,e,"",!0)},Eu.prototype.isPaused=function(){return!1===this._readableState.flowing},Eu.prototype.setEncoding=function(e){return this._readableState.decoder=new gu(e),this._readableState.encoding=e,this},Eu.prototype.read=function(e){Mu("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 Mu("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ju(this):Ru(this),null;if(0===(e=Cu(e,t))&&t.ended)return 0===t.length&&ju(this),null;var n,i=t.needReadable;return Mu("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&Mu("length less than watermark",i=!0),t.ended||t.reading?Mu("reading or ended",i=!1):i&&(Mu("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Cu(r,t))),null===(n=e>0?Lu(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ju(this)),null!==n&&this.emit("data",n),n},Eu.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Eu.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,Mu("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end?f:a;function o(e){Mu("onunpipe"),e===r&&f()}function a(){Mu("onend"),e.end()}n.endEmitted?y(i):r.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;Mu("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Iu(e))}}(r);e.on("drain",s);var u=!1;function f(){Mu("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",f),r.removeListener("data",c),u=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var h=!1;function c(t){Mu("ondata"),h=!1,!1!==e.write(t)||h||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Du(n.pipes,e))&&!u&&(Mu("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function l(t){Mu("onerror",t),g(),e.removeListener("error",l),0===("error",e.listeners("error").length)&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){Mu("onfinish"),e.removeListener("close",d),g()}function g(){Mu("unpipe"),r.unpipe(e)}return r.on("data",c),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",l),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(Mu("pipe resume"),r.resume()),e},Eu.prototype.unpipe=function(e){var t=this._readableState;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)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var o=Du(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},Eu.prototype.on=function(e,t){var r=bn.exports.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&&Ru(this):y(Pu,this))}return r},Eu.prototype.addListener=Eu.prototype.on,Eu.prototype.resume=function(){var e=this._readableState;return e.flowing||(Mu("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,y(Bu,e,t))}(this,e)),this},Eu.prototype.pause=function(){return Mu("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Mu("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Eu.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(Mu("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){Mu("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i||(t.objectMode||i&&i.length)&&(n.push(i)||(r=!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));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r])}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){Mu("wrapped _read",t),r&&(r=!1,e.resume())},n},Eu._fromList=Lu,qu.WritableState=Fu,xa.inherits(qu,bn.exports.EventEmitter),Fu.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},qu.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},qu.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),Yr.Buffer.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=Nu),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),y(t,r)}(this,r):function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):Yr.Buffer.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),y(n,o),i=!1),i}(this,n,e,r)&&(n.pendingcb++,i=function(e,t,r,n,i){r=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Yr.Buffer.from(t,r)),t}(t,r,n),Yr.Buffer.isBuffer(r)&&(n="buffer");var o=t.objectMode?1:r.length;t.length+=o;var a=t.length<t.highWaterMark;if(a||(t.needDrain=!0),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new Uu(r,n,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Wu(e,t,!1,o,r,n,i);return a}(this,n,e,t,r)),i},qu.prototype.cork=function(){this._writableState.corked++},qu.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Vu(this,e))},qu.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},qu.prototype._write=function(e,t,r){r(new Error("not implemented"))},qu.prototype._writev=null,qu.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&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,Yu(e,t),r&&(t.finished?y(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},xa.inherits(Xu,Eu);for(var Zu=Object.keys(qu.prototype),Qu=0;Qu<Zu.length;Qu++){var Ju=Zu[Qu];Xu.prototype[Ju]||(Xu.prototype[Ju]=qu.prototype[Ju])}function Xu(e){if(!(this instanceof Xu))return new Xu(e);Eu.call(this,e),qu.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",$u)}function $u(){this.allowHalfOpen||this._writableState.ended||y(ef,this)}function ef(e){e.end()}function tf(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!=r&&e.push(r),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function rf(e){if(!(this instanceof rf))return new rf(e);Xu.call(this,e),this._transformState=new tf(this);var t=this;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.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){nf(t,e)})):nf(t)}))}function nf(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function of(e){if(!(this instanceof of))return new of(e);rf.call(this,e)}function af(){bn.exports.call(this)}xa.inherits(rf,Xu),rf.prototype.push=function(e,t){return this._transformState.needTransform=!1,Xu.prototype.push.call(this,e,t)},rf.prototype._transform=function(e,t,r){throw new Error("Not implemented")},rf.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)}},rf.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},xa.inherits(of,rf),of.prototype._transform=function(e,t,r){r(null,e)},xa.inherits(af,bn.exports),af.Readable=Eu,af.Writable=qu,af.Duplex=Xu,af.Transform=rf,af.PassThrough=of,af.Stream=af,af.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===bn.exports.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",u),e.on("error",u),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e};var sf=B(Object.freeze({__proto__:null,default:af,Readable:Eu,Writable:qu,Duplex:Xu,Transform:rf,PassThrough:of,Stream:af})),uf=hn.exports.Buffer,ff=sf.Transform,hf=bu.StringDecoder;function cf(e){ff.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}(0,dn.exports)(cf,ff),cf.prototype.update=function(e,t,r){"string"==typeof e&&(e=uf.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},cf.prototype.setAutoPadding=function(){},cf.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},cf.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},cf.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},cf.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},cf.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},cf.prototype._finalOrDigest=function(e){var t=this.__final()||uf.alloc(0);return e&&(t=this._toString(t,e,!0)),t},cf.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new hf(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};var lf=cf,df=dn.exports,pf=Ji,gf=bo,bf=yo.exports,yf=lf;function mf(e){yf.call(this,"digest"),this._hash=e}df(mf,yf),mf.prototype._update=function(e){this._hash.update(e)},mf.prototype._final=function(){return this._hash.digest()};var vf=function(e){return"md5"===(e=e.toLowerCase())?new pf:"rmd160"===e||"ripemd160"===e?new gf:new mf(bf(e))},Af=dn.exports,wf=hn.exports.Buffer,_f=lf,Mf=wf.alloc(128);function Sf(e,t){_f.call(this,"digest"),"string"==typeof t&&(t=wf.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=wf.concat([t,Mf],64));for(var r=this._ipad=wf.allocUnsafe(64),n=this._opad=wf.allocUnsafe(64),i=0;i<64;i++)r[i]=54^t[i],n[i]=92^t[i];this._hash=[r]}Af(Sf,_f),Sf.prototype._update=function(e){this._hash.push(e)},Sf.prototype._final=function(){var e=this._alg(wf.concat(this._hash));return this._alg(wf.concat([this._opad,e]))};var Ef=Sf,kf=Ji,Cf=function(e){return(new kf).update(e).digest()},Rf=dn.exports,xf=Ef,Of=lf,Pf=hn.exports.Buffer,Bf=Cf,If=bo,Lf=yo.exports,jf=Pf.alloc(128);function Tf(e,t){Of.call(this,"digest"),"string"==typeof t&&(t=Pf.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new If:Lf(e)).update(t).digest():t.length<r&&(t=Pf.concat([t,jf],r));for(var n=this._ipad=Pf.allocUnsafe(r),i=this._opad=Pf.allocUnsafe(r),o=0;o<r;o++)n[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new If:Lf(e),this._hash.update(n)}Rf(Tf,Of),Tf.prototype._update=function(e){this._hash.update(e)},Tf.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new If:Lf(this._alg)).update(this._opad).update(e).digest()};var Df=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new Tf("rmd160",t):"md5"===e?new xf(Bf,t):new Tf(e,t)},Nf={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"}},Uf=Nf,Ff={},qf=Math.pow(2,30)-1,Wf=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>qf||t!=t)throw new TypeError("Bad key length")},zf=P.process&&P.process.browser?"utf-8":P.process&&P.process.version?parseInt(O.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",Vf=hn.exports.Buffer,Hf=function(e,t,r){if(Vf.isBuffer(e))return e;if("string"==typeof e)return Vf.from(e,t);if(ArrayBuffer.isView(e))return Vf.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},Kf=Cf,Yf=bo,Gf=yo.exports,Zf=hn.exports.Buffer,Qf=Wf,Jf=zf,Xf=Hf,$f=Zf.alloc(128),eh={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function th(e,t,r){var n=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new Yf).update(e).digest()}:"md5"===e?Kf:function(t){return Gf(e).update(t).digest()}}(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=n(t):t.length<i&&(t=Zf.concat([t,$f],i));for(var o=Zf.allocUnsafe(i+eh[e]),a=Zf.allocUnsafe(i+eh[e]),s=0;s<i;s++)o[s]=54^t[s],a[s]=92^t[s];var u=Zf.allocUnsafe(i+r+4);o.copy(u,0,0,i),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=i,this.hash=n,this.size=eh[e]}th.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)};var rh,nh,ih=function(e,t,r,n,i){Qf(r,n);var o=new th(i=i||"sha1",e=Xf(e,Jf,"Password"),(t=Xf(t,Jf,"Salt")).length),a=Zf.allocUnsafe(n),s=Zf.allocUnsafe(t.length+4);t.copy(s,0,0,t.length);for(var u=0,f=eh[i],h=Math.ceil(n/f),c=1;c<=h;c++){s.writeUInt32BE(c,t.length);for(var l=o.run(s,o.ipad1),d=l,p=1;p<r;p++){d=o.run(d,o.ipad2);for(var g=0;g<f;g++)l[g]^=d[g]}l.copy(a,u),u+=f}return a},oh=hn.exports.Buffer,ah=Wf,sh=zf,uh=ih,fh=Hf,hh=P.crypto&&P.crypto.subtle,ch={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"},lh=[];function dh(){return nh||(nh=P.process&&P.process.nextTick?P.process.nextTick:P.queueMicrotask?P.queueMicrotask:P.setImmediate?P.setImmediate:P.setTimeout)}function ph(e,t,r,n,i){return hh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return hh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return oh.from(e)}))}Ff.pbkdf2=function(e,t,r,n,i,o){"function"==typeof i&&(o=i,i=void 0);var a=ch[(i=i||"sha1").toLowerCase()];if(a&&"function"==typeof P.Promise){if(ah(r,n),e=fh(e,sh,"Password"),t=fh(t,sh,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){dh()((function(){t(null,e)}))}),(function(e){dh()((function(){t(e)}))}))}(function(e){if(P.process&&!P.process.browser)return Promise.resolve(!1);if(!hh||!hh.importKey||!hh.deriveBits)return Promise.resolve(!1);if(void 0!==lh[e])return lh[e];var t=ph(rh=rh||oh.alloc(8),rh,10,128,e).then((function(){return!0})).catch((function(){return!1}));return lh[e]=t,t}(a).then((function(o){return o?ph(e,t,r,n,a):uh(e,t,r,n,i)})),o)}else dh()((function(){var a;try{a=uh(e,t,r,n,i)}catch(e){return o(e)}o(null,a)}))},Ff.pbkdf2Sync=ih;var gh={},bh={},yh={readUInt32BE:function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},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},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},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},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},r28shl:function(e,t){return e<<t&268435455|e>>>28-t}},mh=[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];yh.pc2=function(e,t,r,n){for(var i=0,o=0,a=mh.length>>>1,s=0;s<a;s++)i<<=1,i|=e>>>mh[s]&1;for(s=a;s<mh.length;s++)o<<=1,o|=t>>>mh[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},yh.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 vh=[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];yh.substitute=function(e,t){for(var r=0,n=0;n<4;n++)r<<=4,r|=vh[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=vh[256+64*n+(t>>>18-6*n&63)];return r>>>0};var Ah=[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];yh.permute=function(e){for(var t=0,r=0;r<Ah.length;r++)t<<=1,t|=e>>>Ah[r]&1;return t>>>0},yh.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(" ")};var wh=_h;function _h(e,t){if(!e)throw new Error(t||"Assertion failed")}_h.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Mh=wh;function Sh(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var Eh=Sh;Sh.prototype._init=function(){},Sh.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},Sh.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},Sh.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},Sh.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},Sh.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},Sh.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},Sh.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},Sh.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},Sh.prototype._unpad=function(e){return e},Sh.prototype._finalDecrypt=function(){Mh.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};var kh=wh,Ch=dn.exports,Rh=yh,xh=Eh;function Oh(){this.tmp=new Array(2),this.keys=null}function Ph(e){xh.call(this,e);var t=new Oh;this._desState=t,this.deriveKeys(t,e.key)}Ch(Ph,xh);var Bh=Ph;Ph.create=function(e){return new Ph(e)};var Ih=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Ph.prototype.deriveKeys=function(e,t){e.keys=new Array(32),kh.equal(t.length,this.blockSize,"Invalid key length");var r=Rh.readUInt32BE(t,0),n=Rh.readUInt32BE(t,4);Rh.pc1(r,n,e.tmp,0),r=e.tmp[0],n=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var o=Ih[i>>>1];r=Rh.r28shl(r,o),n=Rh.r28shl(n,o),Rh.pc2(r,n,e.keys,i)}},Ph.prototype._update=function(e,t,r,n){var i=this._desState,o=Rh.readUInt32BE(e,t),a=Rh.readUInt32BE(e,t+4);Rh.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],Rh.writeUInt32BE(r,o,n),Rh.writeUInt32BE(r,a,n+4)},Ph.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},Ph.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)kh.equal(e[r],t);return e.slice(0,e.length-t)},Ph.prototype._encrypt=function(e,t,r,n,i){for(var o=t,a=r,s=0;s<e.keys.length;s+=2){var u=e.keys[s],f=e.keys[s+1];Rh.expand(a,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var h=Rh.substitute(u,f),c=a;a=(o^Rh.permute(h))>>>0,o=c}Rh.rip(a,o,n,i)},Ph.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],f=e.keys[s+1];Rh.expand(o,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var h=Rh.substitute(u,f),c=o;o=(a^Rh.permute(h))>>>0,a=c}Rh.rip(o,a,n,i)};var Lh={},jh=wh,Th=dn.exports,Dh={};function Nh(e){jh.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]}Lh.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}Th(t,e);for(var r=Object.keys(Dh),n=0;n<r.length;n++){var i=r[n];t.prototype[i]=Dh[i]}return t.create=function(e){return new t(e)},t},Dh._cbcInit=function(){var e=new Nh(this.options.iv);this._cbcState=e},Dh._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];for(o._update.call(this,a,0,r,n),s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{for(o._update.call(this,e,t,r,n),s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}};var Uh=wh,Fh=dn.exports,qh=Eh,Wh=Bh;function zh(e,t){Uh.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[Wh.create({type:"encrypt",key:r}),Wh.create({type:"decrypt",key:n}),Wh.create({type:"encrypt",key:i})]:[Wh.create({type:"decrypt",key:i}),Wh.create({type:"encrypt",key:n}),Wh.create({type:"decrypt",key:r})]}function Vh(e){qh.call(this,e);var t=new zh(this.type,this.options.key);this._edeState=t}Fh(Vh,qh);var Hh=Vh;Vh.create=function(e){return new Vh(e)},Vh.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)},Vh.prototype._pad=Wh.prototype._pad,Vh.prototype._unpad=Wh.prototype._unpad,bh.utils=yh,bh.Cipher=Eh,bh.DES=Bh,bh.CBC=Lh,bh.EDE=Hh;var Kh=lf,Yh=bh,Gh=dn.exports,Zh=hn.exports.Buffer,Qh={"des-ede3-cbc":Yh.CBC.instantiate(Yh.EDE),"des-ede3":Yh.EDE,"des-ede-cbc":Yh.CBC.instantiate(Yh.EDE),"des-ede":Yh.EDE,"des-cbc":Yh.CBC.instantiate(Yh.DES),"des-ecb":Yh.DES};Qh.des=Qh["des-cbc"],Qh.des3=Qh["des-ede3-cbc"];var Jh=Xh;function Xh(e){Kh.call(this);var t,r=e.mode.toLowerCase(),n=Qh[r];t=e.decrypt?"decrypt":"encrypt";var i=e.key;Zh.isBuffer(i)||(i=Zh.from(i)),"des-ede"!==r&&"des-ede-cbc"!==r||(i=Zh.concat([i,i.slice(0,8)]));var o=e.iv;Zh.isBuffer(o)||(o=Zh.from(o)),this._des=n.create({key:i,iv:o,type:t})}Gh(Xh,Kh),Xh.prototype._update=function(e){return Zh.from(this._des.update(e))},Xh.prototype._final=function(){return Zh.from(this._des.final())};var $h={},ec={},tc={},rc=function(e,t){for(var r=Math.min(e.length,t.length),n=new Lt(r),i=0;i<r;++i)n[i]=e[i]^t[i];return n},nc=rc;tc.encrypt=function(e,t){var r=nc(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},tc.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return nc(n,r)};var ic={},oc=hn.exports.Buffer,ac=rc;function sc(e,t,r){var n=t.length,i=ac(t,e._cache);return e._cache=e._cache.slice(n),e._prev=oc.concat([e._prev,r?t:i]),i}ic.encrypt=function(e,t,r){for(var n,i=oc.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=oc.allocUnsafe(0)),!(e._cache.length<=t.length)){i=oc.concat([i,sc(e,t,r)]);break}n=e._cache.length,i=oc.concat([i,sc(e,t.slice(0,n),r)]),t=t.slice(n)}return i};var uc={},fc=hn.exports.Buffer;function hc(e,t,r){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=fc.concat([e._prev.slice(1),fc.from([r?t:n])]),n}uc.encrypt=function(e,t,r){for(var n=t.length,i=fc.allocUnsafe(n),o=-1;++o<n;)i[o]=hc(e,t[o],r);return i};var cc={},lc=hn.exports.Buffer;function dc(e,t,r){for(var n,i,o=-1,a=0;++o<8;)n=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=pc(e._prev,r?n:i);return a}function pc(e,t){var r=e.length,n=-1,i=lc.allocUnsafe(e.length);for(e=lc.concat([e,lc.from([t])]);++n<r;)i[n]=e[n]<<1|e[n+1]>>7;return i}cc.encrypt=function(e,t,r){for(var n=t.length,i=lc.allocUnsafe(n),o=-1;++o<n;)i[o]=dc(e,t[o],r);return i};var gc={},bc=rc;function yc(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}gc.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=Lt.concat([e._cache,yc(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),bc(t,r)};var mc={},vc=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)}},Ac=rc,wc=hn.exports.Buffer,_c=vc;function Mc(e){var t=e._cipher.encryptBlockRaw(e._prev);return _c(e._prev),t}mc.encrypt=function(e,t){var r=Math.ceil(t.length/16),n=e._cache.length;e._cache=wc.concat([e._cache,wc.allocUnsafe(16*r)]);for(var i=0;i<r;i++){var o=Mc(e),a=n+16*i;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),Ac(t,s)};var Sc={"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"}},Ec={ECB:{encrypt:function(e,t){return e._cipher.encryptBlock(t)},decrypt:function(e,t){return e._cipher.decryptBlock(t)}},CBC:tc,CFB:ic,CFB8:uc,CFB1:cc,OFB:gc,CTR:mc,GCM:mc},kc=Sc;for(var Cc in kc)kc[Cc].module=Ec[kc[Cc].mode];var Rc=kc,xc={},Oc=hn.exports.Buffer;function Pc(e){Oc.isBuffer(e)||(e=Oc.from(e));for(var t=e.length/4|0,r=new Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function Bc(e){for(;0<e.length;e++)e[0]=0}function Ic(e,t,r,n,i){for(var o,a,s,u,f=r[0],h=r[1],c=r[2],l=r[3],d=e[0]^t[0],p=e[1]^t[1],g=e[2]^t[2],b=e[3]^t[3],y=4,m=1;m<i;m++)o=f[d>>>24]^h[p>>>16&255]^c[g>>>8&255]^l[255&b]^t[y++],a=f[p>>>24]^h[g>>>16&255]^c[b>>>8&255]^l[255&d]^t[y++],s=f[g>>>24]^h[b>>>16&255]^c[d>>>8&255]^l[255&p]^t[y++],u=f[b>>>24]^h[d>>>16&255]^c[p>>>8&255]^l[255&g]^t[y++],d=o,p=a,g=s,b=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&b])^t[y++],a=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[b>>>8&255]<<8|n[255&d])^t[y++],s=(n[g>>>24]<<24|n[b>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[y++],u=(n[b>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[y++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var Lc=[0,1,2,4,8,16,32,64,128,27,54],jc=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 f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[a]=f,n[f]=a;var h=e[a],c=e[h],l=e[c],d=257*e[f]^16843008*f;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*c^257*h^16843008*a,o[0][f]=d<<24|d>>>8,o[1][f]=d<<16|d>>>16,o[2][f]=d<<8|d>>>24,o[3][f]=d,0===a?a=s=1:(a=h^e[e[e[l^h]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function Tc(e){this._key=Pc(e),this._reset()}Tc.blockSize=16,Tc.keySize=32,Tc.prototype.blockSize=Tc.blockSize,Tc.prototype.keySize=Tc.keySize,Tc.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=jc.SBOX[a>>>24]<<24|jc.SBOX[a>>>16&255]<<16|jc.SBOX[a>>>8&255]<<8|jc.SBOX[255&a],a^=Lc[o/t|0]<<24):t>6&&o%t==4&&(a=jc.SBOX[a>>>24]<<24|jc.SBOX[a>>>16&255]<<16|jc.SBOX[a>>>8&255]<<8|jc.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],u=0;u<n;u++){var f=n-u,h=i[f-(u%4?0:4)];s[u]=u<4||f<=4?h:jc.INV_SUB_MIX[0][jc.SBOX[h>>>24]]^jc.INV_SUB_MIX[1][jc.SBOX[h>>>16&255]]^jc.INV_SUB_MIX[2][jc.SBOX[h>>>8&255]]^jc.INV_SUB_MIX[3][jc.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},Tc.prototype.encryptBlockRaw=function(e){return Ic(e=Pc(e),this._keySchedule,jc.SUB_MIX,jc.SBOX,this._nRounds)},Tc.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=Oc.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},Tc.prototype.decryptBlock=function(e){var t=(e=Pc(e))[1];e[1]=e[3],e[3]=t;var r=Ic(e,this._invKeySchedule,jc.INV_SUB_MIX,jc.INV_SBOX,this._nRounds),n=Oc.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},Tc.prototype.scrub=function(){Bc(this._keySchedule),Bc(this._invKeySchedule),Bc(this._key)},xc.AES=Tc;var Dc=hn.exports.Buffer,Nc=Dc.alloc(16,0);function Uc(e){var t=Dc.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 Fc(e){this.h=e,this.state=Dc.alloc(16,0),this.cache=Dc.allocUnsafe(0)}Fc.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},Fc.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],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%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=Uc(i)},Fc.prototype.update=function(e){var t;for(this.cache=Dc.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},Fc.prototype.final=function(e,t){return this.cache.length&&this.ghash(Dc.concat([this.cache,Nc],16)),this.ghash(Uc([0,e,0,t])),this.state};var qc=Fc,Wc=xc,zc=hn.exports.Buffer,Vc=lf,Hc=dn.exports,Kc=qc,Yc=rc,Gc=vc;function Zc(e,t,r,n){Vc.call(this);var i=zc.alloc(4,0);this._cipher=new Wc.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new Kc(o),r=function(e,t,r){if(12===t.length)return e._finID=zc.concat([t,zc.from([0,0,0,1])]),zc.concat([t,zc.from([0,0,0,2])]);var n=new Kc(r),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(zc.alloc(o,0))),n.update(zc.alloc(8,0));var a=8*i,s=zc.alloc(8);s.writeUIntBE(a,0,8),n.update(s),e._finID=n.state;var u=zc.from(e._finID);return Gc(u),u}(this,r,o),this._prev=zc.from(r),this._cache=zc.allocUnsafe(0),this._secCache=zc.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}Hc(Zc,Vc),Zc.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=zc.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},Zc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=Yc(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()},Zc.prototype.getAuthTag=function(){if(this._decrypt||!zc.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},Zc.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},Zc.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};var Qc=Zc,Jc=xc,Xc=hn.exports.Buffer,$c=lf;function el(e,t,r,n){$c.call(this),this._cipher=new Jc.AES(t),this._prev=Xc.from(r),this._cache=Xc.allocUnsafe(0),this._secCache=Xc.allocUnsafe(0),this._decrypt=n,this._mode=e}(0,dn.exports)(el,$c),el.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},el.prototype._final=function(){this._cipher.scrub()};var tl=el,rl=hn.exports.Buffer,nl=Ji,il=function(e,t,r,n){if(rl.isBuffer(e)||(e=rl.from(e,"binary")),t&&(rl.isBuffer(t)||(t=rl.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=rl.alloc(i),a=rl.alloc(n||0),s=rl.alloc(0);i>0||n>0;){var u=new nl;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var f=0;if(i>0){var h=o.length-i;f=Math.min(i,s.length),s.copy(o,h,0,f),i-=f}if(f<s.length&&n>0){var c=a.length-n,l=Math.min(n,s.length-f);s.copy(a,c,f,f+l),n-=l}}return s.fill(0),{key:o,iv:a}},ol=Rc,al=Qc,sl=hn.exports.Buffer,ul=tl,fl=lf,hl=xc,cl=il;function ll(e,t,r){fl.call(this),this._cache=new pl,this._cipher=new hl.AES(t),this._prev=sl.from(r),this._mode=e,this._autopadding=!0}(0,dn.exports)(ll,fl),ll.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 sl.concat(n)};var dl=sl.alloc(16,16);function pl(){this.cache=sl.allocUnsafe(0)}function gl(e,t,r){var n=ol[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=sl.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=sl.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new ul(n.module,t,r):"auth"===n.type?new al(n.module,t,r):new ll(n.module,t,r)}ll.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(dl))throw this._cipher.scrub(),new Error("data not multiple of block length")},ll.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},pl.prototype.add=function(e){this.cache=sl.concat([this.cache,e])},pl.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},pl.prototype.flush=function(){for(var e=16-this.cache.length,t=sl.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return sl.concat([this.cache,t])},ec.createCipheriv=gl,ec.createCipher=function(e,t){var r=ol[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=cl(t,!1,r.key,r.iv);return gl(e,n.key,n.iv)};var bl={},yl=Qc,ml=hn.exports.Buffer,vl=Rc,Al=tl,wl=lf,_l=xc,Ml=il;function Sl(e,t,r){wl.call(this),this._cache=new El,this._last=void 0,this._cipher=new _l.AES(t),this._prev=ml.from(r),this._mode=e,this._autopadding=!0}function El(){this.cache=ml.allocUnsafe(0)}function kl(e,t,r){var n=vl[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=ml.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=ml.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===n.type?new Al(n.module,t,r,!0):"auth"===n.type?new yl(n.module,t,r,!0):new Sl(n.module,t,r)}(0,dn.exports)(Sl,wl),Sl.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 ml.concat(n)},Sl.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");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},Sl.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},El.prototype.add=function(e){this.cache=ml.concat([this.cache,e])},El.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},El.prototype.flush=function(){if(this.cache.length)return this.cache},bl.createDecipher=function(e,t){var r=vl[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=Ml(t,!1,r.key,r.iv);return kl(e,n.key,n.iv)},bl.createDecipheriv=kl;var Cl=ec,Rl=bl,xl=Sc;$h.createCipher=$h.Cipher=Cl.createCipher,$h.createCipheriv=$h.Cipheriv=Cl.createCipheriv,$h.createDecipher=$h.Decipher=Rl.createDecipher,$h.createDecipheriv=$h.Decipheriv=Rl.createDecipheriv,$h.listCiphers=$h.getCiphers=function(){return Object.keys(xl)};var Ol={};!function(e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}}(Ol);var Pl=Jh,Bl=$h,Il=Rc,Ll=Ol,jl=il;function Tl(e,t,r){if(e=e.toLowerCase(),Il[e])return Bl.createCipheriv(e,t,r);if(Ll[e])return new Pl({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function Dl(e,t,r){if(e=e.toLowerCase(),Il[e])return Bl.createDecipheriv(e,t,r);if(Ll[e])return new Pl({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}gh.createCipher=gh.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),Il[e])r=Il[e].key,n=Il[e].iv;else{if(!Ll[e])throw new TypeError("invalid suite type");r=8*Ll[e].key,n=Ll[e].iv}var i=jl(t,!1,r,n);return Tl(e,i.key,i.iv)},gh.createCipheriv=gh.Cipheriv=Tl,gh.createDecipher=gh.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),Il[e])r=Il[e].key,n=Il[e].iv;else{if(!Ll[e])throw new TypeError("invalid suite type");r=8*Ll[e].key,n=Ll[e].iv}var i=jl(t,!1,r,n);return Dl(e,i.key,i.iv)},gh.createDecipheriv=gh.Decipheriv=Dl,gh.listCiphers=gh.getCiphers=function(){return Object.keys(Ll).concat(Bl.getCiphers())};var Nl={},Ul={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Ln.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(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}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(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,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("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"===n)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"===n)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()},i.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=s(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=s(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.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,f=0,h=r;h<s;h+=n)f=u(e,h,h+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var c=1;for(f=u(e,h,e.length,t),h=0;h<a;h++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},i.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},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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 f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=l;d++){var p=f-d|0;h+=(a=(i=0|e.words[p])*(o=0|t.words[d])+c)/67108864|0,c=67108863&a}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],d=c[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(e);n=(p=p.idivn(d)).isZero()?g+n:f[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,f=new e(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),f[s]=a;for(;s<o;s++)f[s]=0}else{for(s=0;s<o-i;s++)f[s]=0;for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),f[o-s-1]=a}return f},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,f=0,h=0|a[0],c=8191&h,l=h>>>13,d=0|a[1],p=8191&d,g=d>>>13,b=0|a[2],y=8191&b,m=b>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],M=8191&_,S=_>>>13,E=0|a[5],k=8191&E,C=E>>>13,R=0|a[6],x=8191&R,O=R>>>13,P=0|a[7],B=8191&P,I=P>>>13,L=0|a[8],j=8191&L,T=L>>>13,D=0|a[9],N=8191&D,U=D>>>13,F=0|s[0],q=8191&F,W=F>>>13,z=0|s[1],V=8191&z,H=z>>>13,K=0|s[2],Y=8191&K,G=K>>>13,Z=0|s[3],Q=8191&Z,J=Z>>>13,X=0|s[4],$=8191&X,ee=X>>>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,fe=se>>>13,he=0|s[8],ce=8191&he,le=he>>>13,de=0|s[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,W))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,W))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,W))+Math.imul(g,q)|0,o=Math.imul(g,W);var ye=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,W))+Math.imul(m,q)|0,o=Math.imul(m,W),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,H)|0;var me=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,W))+Math.imul(w,q)|0,o=Math.imul(w,W),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0;var ve=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,J)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,W))+Math.imul(S,q)|0,o=Math.imul(S,W),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0;var Ae=(f+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,W))+Math.imul(C,q)|0,o=Math.imul(C,W),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,J)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(f+(n=n+Math.imul(c,re)|0)|0)+((8191&(i=(i=i+Math.imul(c,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,W))+Math.imul(O,q)|0,o=Math.imul(O,W),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(f+(n=n+Math.imul(c,oe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ae)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,W))+Math.imul(I,q)|0,o=Math.imul(I,W),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Me=(f+(n=n+Math.imul(c,ue)|0)|0)+((8191&(i=(i=i+Math.imul(c,fe)|0)+Math.imul(l,ue)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,W))+Math.imul(T,q)|0,o=Math.imul(T,W),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,J)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,fe)|0;var Se=(f+(n=n+Math.imul(c,ce)|0)|0)+((8191&(i=(i=i+Math.imul(c,le)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,W))+Math.imul(U,q)|0,o=Math.imul(U,W),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,H)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ee=(f+(n=n+Math.imul(c,pe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ge)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,V),i=(i=Math.imul(N,H))+Math.imul(U,V)|0,o=Math.imul(U,H),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,fe)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;f=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,G))+Math.imul(U,Y)|0,o=Math.imul(U,G),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,fe)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,le)|0;var Ce=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;f=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,J))+Math.imul(U,Q)|0,o=Math.imul(U,J),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,fe)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,le)|0;var Re=(f+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(w,pe)|0))<<13)|0;f=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,fe)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,le)|0;var xe=(f+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(S,pe)|0))<<13)|0;f=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,fe)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,le)|0;var Oe=(f+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(C,pe)|0))<<13)|0;f=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,oe),i=(i=Math.imul(N,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(j,ue)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,le)|0;var Pe=(f+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(O,pe)|0))<<13)|0;f=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,ue),i=(i=Math.imul(N,fe))+Math.imul(U,ue)|0,o=Math.imul(U,fe),n=n+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0;var Be=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(I,pe)|0))<<13)|0;f=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(N,ce),i=(i=Math.imul(N,le))+Math.imul(U,ce)|0,o=Math.imul(U,le);var Ie=(f+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,ge)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Le=(f+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,ge))+Math.imul(U,pe)|0))<<13)|0;return f=((o=Math.imul(U,ge))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=Ae,u[5]=we,u[6]=_e,u[7]=Me,u[8]=Se,u[9]=Ee,u[10]=ke,u[11]=Ce,u[12]=Re,u[13]=xe,u[14]=Oe,u[15]=Pe,u[16]=Be,u[17]=Ie,u[18]=Le,0!==f&&(u[19]=f,r.length++),r};function p(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(d=l),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):n<63?l(this,e,t):n<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),f=Math.max(0,o-e.length+1);f<=u;f++){var h=o-f,c=(0|e.words[h])*(0|t.words[f]),l=67108863&c;s=67108863&(l=l+s|0),i+=(a=(a=a+(c/67108864|0)|0)+(l>>>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):p(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.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},g.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]]},g.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),f=Math.sin(2*Math.PI/s),h=0;h<i;h+=s)for(var c=u,l=f,d=0;d<a;d++){var p=r[h+d],g=n[h+d],b=r[h+d+a],y=n[h+d+a],m=c*b-l*y;y=c*y+l*b,b=m,r[h+d]=p+b,n[h+d]=g+y,r[h+d+a]=p-b,n[h+d+a]=g-y,d!==s&&(m=u*c-f*l,l=u*l+f*c,c=m)}},g.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},g.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}},g.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},g.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.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),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,f,n),this.transform(a,o,s,u,n,i),this.transform(f,o,h,c,n,i);for(var d=0;d<n;d++){var p=s[d]*h[d]-u[d]*c[d];u[d]=s[d]*c[d]+u[d]*h[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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 i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<n;this.words[t]=u|a,a=s>>>26-n}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()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("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=n;if(i-=a,i=Math.max(0,i),u){for(var f=0;f<a;f++)u.words[f]=this.words[f];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(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)},i.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},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-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()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,u=n.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var h=n.clone()._ishlnsubmul(o,1,u);0===h.negative&&(n=h,s&&(s.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[o.length+c])+(0|n.words[o.length+c-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,c),n.isZero()||(n.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),f=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++f;for(var h=n.clone(),c=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(h),a.isub(c)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(u)):(n.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:n.iushln(f)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0==(n.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(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 y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.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},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(m,y),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},n(v,y),n(A,y),n(w,y),w.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},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new m;else if("p224"===e)t=new v;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return b[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.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)},_.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},_.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)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,o),l=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=a;0!==d.cmp(s);){for(var g=d,b=0;0!==g.cmp(s);b++)g=g.redSqr();r(b<p);var y=this.pow(c,new i(1).iushln(p-b-1));l=l.redMul(y),c=y.redSqr(),d=d.redMul(c),p=b}return l},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var o=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],h=u-1;h>=0;h--){var c=f>>h&1;o!==r[0]&&(o=this.sqr(o)),0!==c||0!==a?(a<<=1,a|=c,(4==++s||0===n&&0===h)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}u=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new M(e)},n(M,_),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.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)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ul,P);var Fl,ql={exports:{}};function Wl(e){this.rand=e}if(ql.exports=function(e){return Fl||(Fl=new Wl(null)),Fl.generate(e)},ql.exports.Rand=Wl,Wl.prototype.generate=function(e){return this._rand(e)},Wl.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?Wl.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Wl.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Wl.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var zl=Ln;if("function"!=typeof zl.randomBytes)throw new Error("Not supported");Wl.prototype._rand=function(e){return zl.randomBytes(e)}}catch(t){}var Vl=Ul.exports,Hl=ql.exports;function Kl(e){this.rand=e||new Hl.Rand}var Yl=Kl;Kl.create=function(e){return new Kl(e)},Kl.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var n=new Vl(this.rand.generate(r))}while(n.cmp(e)>=0);return n},Kl.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},Kl.prototype.test=function(e,t,r){var n=e.bitLength(),i=Vl.mont(e),o=new Vl(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var u=e.shrn(s),f=a.toRed(i);t>0;t--){var h=this._randrange(new Vl(2),a);r&&r(h);var c=h.toRed(i).redPow(u);if(0!==c.cmp(o)&&0!==c.cmp(f)){for(var l=1;l<s;l++){if(0===(c=c.redSqr()).cmp(o))return!1;if(0===c.cmp(f))break}if(l===s)return!1}}return!0},Kl.prototype.getDivisor=function(e,t){var r=e.bitLength(),n=Vl.mont(e),i=new Vl(1).toRed(n);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),a=0;!o.testn(a);a++);for(var s=e.shrn(a),u=o.toRed(n);t>0;t--){var f=this._randrange(new Vl(2),o),h=e.gcd(f);if(0!==h.cmpn(1))return h;var c=f.toRed(n).redPow(s);if(0!==c.cmp(i)&&0!==c.cmp(u)){for(var l=1;l<a;l++){if(0===(c=c.redSqr()).cmp(i))return c.fromRed().subn(1).gcd(e);if(0===c.cmp(u))break}if(l===a)return(c=c.redSqr()).fromRed().subn(1).gcd(e)}}return!1};var Gl=fn.exports,Zl=fd;fd.simpleSieve=sd,fd.fermatTest=ud;var Ql=Ul.exports,Jl=new Ql(24),Xl=new Yl,$l=new Ql(1),ed=new Ql(2),td=new Ql(5);new Ql(16),new Ql(8);var rd=new Ql(10),nd=new Ql(3);new Ql(7);var id=new Ql(11),od=new Ql(4);new Ql(12);var ad=null;function sd(e){for(var t=function(){if(null!==ad)return ad;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 ad=e,e}(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function ud(e){var t=Ql.mont(e);return 0===ed.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function fd(e,t){if(e<16)return new Ql(2===t||5===t?[140,123]:[140,39]);var r,n;for(t=new Ql(t);;){for(r=new Ql(Gl(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd($l),r.testn(1)||r.iadd(ed),t.cmp(ed)){if(!t.cmp(td))for(;r.mod(rd).cmp(nd);)r.iadd(od)}else for(;r.mod(Jl).cmp(id);)r.iadd(od);if(sd(n=r.shrn(1))&&sd(r)&&ud(n)&&ud(r)&&Xl.test(n)&&Xl.test(r))return r}}var hd=Ul.exports,cd=new Yl,ld=new hd(24),dd=new hd(11),pd=new hd(10),gd=new hd(3),bd=new hd(7),yd=Zl,md=fn.exports,vd=Md;function Ad(e,t){return t=t||"utf8",br(e)||(e=new Lt(e,t)),this._pub=new hd(e),this}function wd(e,t){return t=t||"utf8",br(e)||(e=new Lt(e,t)),this._priv=new hd(e),this}var _d={};function Md(e,t,r){this.setGenerator(t),this.__prime=new hd(e),this._prime=hd.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=Ad,this.setPrivateKey=wd):this._primeCode=8}function Sd(e,t){var r=new Lt(e.toArray());return t?r.toString(t):r}Object.defineProperty(Md.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 _d)return _d[n];var i,o=0;if(e.isEven()||!yd.simpleSieve||!yd.fermatTest(e)||!cd.test(e))return o+=1,o+="02"===r||"05"===r?8:4,_d[n]=o,o;switch(cd.test(e.shrn(1))||(o+=2),r){case"02":e.mod(ld).cmp(dd)&&(o+=8);break;case"05":(i=e.mod(pd)).cmp(gd)&&i.cmp(bd)&&(o+=8);break;default:o+=4}return _d[n]=o,o}(this.__prime,this.__gen)),this._primeCode}}),Md.prototype.generateKeys=function(){return this._priv||(this._priv=new hd(md(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},Md.prototype.computeSecret=function(e){var t=new Lt((e=(e=new hd(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(t.length<r.length){var n=new Lt(r.length-t.length);n.fill(0),t=Lt.concat([n,t])}return t},Md.prototype.getPublicKey=function(e){return Sd(this._pub,e)},Md.prototype.getPrivateKey=function(e){return Sd(this._priv,e)},Md.prototype.getPrime=function(e){return Sd(this.__prime,e)},Md.prototype.getGenerator=function(e){return Sd(this._gen,e)},Md.prototype.setGenerator=function(e,t){return t=t||"utf8",br(e)||(e=new Lt(e,t)),this.__gen=e,this._gen=new hd(e),this};var Ed=Zl,kd={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"}},Cd=vd,Rd={binary:!0,hex:!0,base64:!0};Nl.DiffieHellmanGroup=Nl.createDiffieHellmanGroup=Nl.getDiffieHellman=function(e){var t=new Lt(kd[e].prime,"hex"),r=new Lt(kd[e].gen,"hex");return new Cd(t,r)},Nl.createDiffieHellman=Nl.DiffieHellman=function e(t,r,n,i){return br(r)||void 0===Rd[r]?e(t,"binary",r,n):(r=r||"binary",i=i||"binary",br(n=n||new Lt([2]))||(n=new Lt(n,i)),"number"==typeof t?new Cd(Ed(t,n),n,!0):(br(t)||(t=new Lt(t,r)),new Cd(t,n,!0)))};var xd,Od,Pd={exports:{}},Bd=bn.exports.EventEmitter;function Id(){if(Od)return xd;function e(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 t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Od=1;var r=Yr.Buffer,n=Ln.inspect,i=n&&n.custom||"inspect";function o(e,t,n){r.prototype.copy.call(e,t,n)}return xd=function(){function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.head=null,this.tail=null,this.length=0}var s;return s=[{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 r.alloc(0);for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)o(n.data,t,i),i+=n.data.length,n=n.next;return t}},{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=r.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i}return this.length-=i,t}},{key:i,value:function(r,i){return n(this,function(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){t(r,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}({},i,{depth:0,customInspect:!1}))}}],s&&function(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)}}(a.prototype,s),a}(),xd}function Ld(e,t){Td(e,t),jd(e)}function jd(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Td(e,t){e.emit("error",t)}var Dd={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,y(Td,this,e)):y(Td,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?y(jd,r):(r._writableState.errorEmitted=!0,y(Ld,r,e)):y(Ld,r,e):t?(y(jd,r),t(e)):y(jd,r)})),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)}},Nd={},Ud={};function Fd(e,t,r){r||(r=Error);var n=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);n.prototype.name=r.name,n.prototype.code=e,Ud[e]=n}function qd(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))}Fd("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Fd("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o;if("string"==typeof t&&(i="not ",t.substr(0,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"))o="The ".concat(e," ").concat(n," ").concat(qd(t,"type"));else{var a=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(qd(t,"type"))}return o+". Received type ".concat(typeof r)}),TypeError),Fd("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Fd("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Fd("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Fd("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Fd("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Fd("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Fd("ERR_STREAM_WRITE_AFTER_END","write after end"),Fd("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Fd("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Fd("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Nd.codes=Ud;var Wd,zd,Vd,Hd,Kd=Nd.codes.ERR_INVALID_OPT_VALUE,Yd=function(e,t,r,n){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new Kd(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384};function Gd(){if(zd)return Wd;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;zd=1,Wd=_,_.WritableState=w;var r,n=Qn,i=Bd,o=Yr.Buffer,a=P.Uint8Array||function(){},s=Dd,u=Yd,f=Nd.codes,h=f.ERR_INVALID_ARG_TYPE,c=f.ERR_METHOD_NOT_IMPLEMENTED,l=f.ERR_MULTIPLE_CALLBACK,d=f.ERR_STREAM_CANNOT_PIPE,p=f.ERR_STREAM_DESTROYED,g=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,m=f.ERR_UNKNOWN_ENCODING,v=s.errorOrDestroy;function A(){}function w(r,n,i){t=t||Zd(),r=r||{},"boolean"!=typeof i&&(i=n instanceof t),this.objectMode=!!r.objectMode,i&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=u(this,r,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.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"!=typeof i)throw new l;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?(y(i,n),y(R,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),R(e,t))}(e,r,n,t,i);else{var o=k(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),n?y(S,e,r,o,i):S(e,r,o,i)}}(n,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!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function _(e){var n=this instanceof(t=t||Zd());if(!n&&!r.call(_,this))return new _(e);this._writableState=new w(e,this,n),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)),i.call(this)}function M(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),R(e,t)}function E(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,M(t,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,h=n.encoding,c=n.callback;if(M(t,r,!1,r.objectMode?1:f.length,f,h,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var r=k(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,y(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return dn.exports(_,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n((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]?(r=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!r.call(this,e)||this===_&&e&&e._writableState instanceof w}})):r=function(e){return e instanceof this},_.prototype.pipe=function(){v(this,new d)},_.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&function(e){return o.isBuffer(e)||e instanceof a}(e);return s&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=A),n.ending?function(e,t){var r=new b;v(e,r),y(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new g:"string"==typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(v(e,i),y(n,i),!1)}(this,n,e,r))&&(n.pendingcb++,i=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,u,n,i,a);return f}(this,n,s,e,t,r)),i},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},_.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 m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,r){r(new c("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?y(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=s.destroy,_.prototype._undestroy=s.undestroy,_.prototype._destroy=function(e,t){t(e)},Wd}function Zd(){if(Hd)return Vd;Hd=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Vd=a;var t=up(),r=Gd();dn.exports(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.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",s)))}function s(){this._writableState.ended||y(u,this)}function u(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),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._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)}}),Vd}var Qd,Jd={};function Xd(){if(Qd)return Jd;Qd=1;var e=hn.exports.Buffer,t=e.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 r(r){var n;switch(this.encoding=function(r){var n=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}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=s,this.end=u,n=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(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 o(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 a(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 s(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 u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}return Jd.StringDecoder=r,r.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||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var o=n(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<r||-2===o?0:(o=n(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<r||-2===o?0:(o=n(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.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},Jd}var $d=Nd.codes.ERR_STREAM_PREMATURE_CLOSE;function ep(){}var tp,rp,np,ip,op,ap,sp=function e(t,r,n){if("function"==typeof r)return e(t,null,r);r||(r={}),n=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)}}}(n||ep);var i=r.readable||!1!==r.readable&&t.readable,o=r.writable||!1!==r.writable&&t.writable,a=function(){t.writable||u()},s=t._writableState&&t._writableState.finished,u=function(){o=!1,s=!0,i||n.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){i=!1,f=!0,o||n.call(t)},c=function(e){n.call(t,e)},l=function(){var e;return i&&!f?(t._readableState&&t._readableState.ended||(e=new $d),n.call(t,e)):o&&!s?(t._writableState&&t._writableState.ended||(e=new $d),n.call(t,e)):void 0},d=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",l),t.req?d():t.on("request",d)):o&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",h),t.on("finish",u),!1!==r.error&&t.on("error",c),t.on("close",l),function(){t.removeListener("complete",u),t.removeListener("abort",l),t.removeListener("request",d),t.req&&t.req.removeListener("finish",u),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",c),t.removeListener("close",l)}};function up(){if(ap)return op;var e;ap=1,op=_,_.ReadableState=w,bn.exports.EventEmitter;var t,r=function(e,t){return e.listeners(t).length},n=Bd,i=Yr.Buffer,o=P.Uint8Array||function(){},a=Ln;t=a&&a.debuglog?a.debuglog("stream"):function(){};var s,u,f,h=Id(),c=Dd,l=Yd,d=Nd.codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_STREAM_PUSH_AFTER_EOF,b=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;dn.exports(_,n);var v=c.errorOrDestroy,A=["error","close","destroy","pause","resume"];function w(t,r,n){e=e||Zd(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=l(this,t,"readableHighWaterMark",n),this.buffer=new h,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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s||(s=Xd().StringDecoder),this.decoder=new s(t.encoding),this.encoding=t.encoding)}function _(t){if(e=e||Zd(),!(this instanceof _))return new _(t);var r=this instanceof e;this._readableState=new w(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function M(e,r,n,a,s){t("readableAddChunk",r);var u,f=e._readableState;if(null===r)f.reading=!1,function(e,r){if(t("onEofChunk"),!r.ended){if(r.decoder){var n=r.decoder.end();n&&n.length&&(r.buffer.push(n),r.length+=r.objectMode?1:n.length)}r.ended=!0,r.sync?C(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,R(e)))}}(e,f);else if(s||(u=function(e,t){var r;return function(e){return i.isBuffer(e)||e instanceof o}(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new p("chunk",["string","Buffer","Uint8Array"],t)),r}(f,r)),u)v(e,u);else if(f.objectMode||r&&r.length>0)if("string"==typeof r||f.objectMode||Object.getPrototypeOf(r)===i.prototype||(r=function(e){return i.from(e)}(r)),a)f.endEmitted?v(e,new m):S(e,f,r,!0);else if(f.ended)v(e,new g);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!n?(r=f.decoder.write(r),f.objectMode||0!==r.length?S(e,f,r,!1):x(e,f)):S(e,f,r,!1)}else a||(f.reading=!1,x(e,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function S(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&&C(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=c.destroy,_.prototype._undestroy=c.undestroy,_.prototype._destroy=function(e,t){t(e)},_.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=i.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},_.prototype.unshift=function(e){return M(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){s||(s=Xd().StringDecoder);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var E=1073741824;function k(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>=E?e=E:(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 C(e){var r=e._readableState;t("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(t("emitReadable",r.flowing),r.emittedReadable=!0,y(R,e))}function R(e){var r=e._readableState;t("emitReadable_",r.destroyed,r.length,r.ended),r.destroyed||!r.length&&!r.ended||(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,y(B,e,t))}function B(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&0===r.length);){var n=r.length;if(t("maybeReadMore read 0"),e.read(0),n===r.length)break}r.readingMore=!1}function I(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 L(e){t("readable nexttick read 0"),e.read(0)}function j(e,r){t("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),T(e),r.flowing&&!r.reading&&e.read(0)}function T(e){var r=e._readableState;for(t("flow",r.flowing);r.flowing&&null!==e.read(););}function D(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 N(e){var r=e._readableState;t("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,y(U,r,e))}function U(e,r){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var n=r._writableState;(!n||n.autoDestroy&&n.finished)&&r.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return _.prototype.read=function(e){t("read",e),e=parseInt(e,10);var r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return t("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?N(this):C(this),null;if(0===(e=k(e,r))&&r.ended)return 0===r.length&&N(this),null;var i,o=r.needReadable;return t("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&t("length less than watermark",o=!0),r.ended||r.reading?t("reading or ended",o=!1):o&&(t("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=k(n,r))),null===(i=e>0?D(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&N(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(e){v(this,new b("_read()"))},_.prototype.pipe=function(e,n){var i=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,t("pipe count=%d opts=%j",o.pipesCount,n);var a=n&&!1===n.end||e===O.stdout||e===O.stderr?p:s;function s(){t("onend"),e.end()}o.endEmitted?y(a):i.once("end",a),e.on("unpipe",(function r(n,a){t("onunpipe"),n===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,t("cleanup"),e.removeListener("close",l),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",r),i.removeListener("end",s),i.removeListener("end",p),i.removeListener("data",h),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var n=e._readableState;t("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&r(e,"data")&&(n.flowing=!0,T(e))}}(i);e.on("drain",u);var f=!1;function h(r){t("ondata");var n=e.write(r);t("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!f&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function c(n){t("onerror",n),p(),e.removeListener("error",c),0===r(e,"error")&&v(e,n)}function l(){e.removeListener("finish",d),p()}function d(){t("onfinish"),e.removeListener("close",l),p()}function p(){t("unpipe"),i.unpipe(e)}return i.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",c),e.once("close",l),e.once("finish",d),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},_.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=F(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},_.prototype.on=function(e,r){var i=n.prototype.on.call(this,e,r),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?C(this):o.reading||y(L,this))),i},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var r=n.prototype.removeListener.call(this,e,t);return"readable"===e&&y(I,this),r},_.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||y(I,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,y(j,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var r=this,n=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(o){t("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(r.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<A.length;a++)e.on(A[a],this.emit.bind(this,A[a]));return this._read=function(r){t("wrapped _read",r),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=function(){if(rp)return tp;var e;function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}rp=1;var r=sp,n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function c(e){var t=e[n];if(null!==t){var r=e[f].read();null!==r&&(e[s]=null,e[n]=null,e[i]=null,t(h(r,!1)))}}function l(e){y(c,e)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[f]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){y((function(){e[o]?r(e[o]):t(h(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[a]?r(h(void 0,!0)):t[u](r,n)}),n)}}(n,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[u])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),e),d);return tp=function(e){var c,d=Object.create(p,(t(c={},f,{value:e,writable:!0}),t(c,n,{value:null,writable:!0}),t(c,i,{value:null,writable:!0}),t(c,o,{value:null,writable:!0}),t(c,a,{value:e._readableState.endEmitted,writable:!0}),t(c,u,{value:function(e,t){var r=d[f].read();r?(d[s]=null,d[n]=null,d[i]=null,e(h(r,!1))):(d[n]=e,d[i]=t)},writable:!0}),c));return d[s]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=d[i];return null!==t&&(d[s]=null,d[n]=null,d[i]=null,t(e)),void(d[o]=e)}var r=d[n];null!==r&&(d[s]=null,d[n]=null,d[i]=null,r(h(void 0,!0))),d[a]=!0})),e.on("readable",l.bind(null,d)),d},tp}()),u(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=D,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return void 0===f&&(f=ip?np:(ip=1,np=function(){throw new Error("Readable.from is not available in the browser")})),f(_,e,t)}),op}var fp=yp,hp=Nd.codes,cp=hp.ERR_METHOD_NOT_IMPLEMENTED,lp=hp.ERR_MULTIPLE_CALLBACK,dp=hp.ERR_TRANSFORM_ALREADY_TRANSFORMING,pp=hp.ERR_TRANSFORM_WITH_LENGTH_0,gp=Zd();function bp(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new lp);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 yp(e){if(!(this instanceof yp))return new yp(e);gp.call(this,e),this._transformState={afterTransform:bp.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",mp)}function mp(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?vp(this,null,null):this._flush((function(t,r){vp(e,t,r)}))}function vp(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new pp;if(e._transformState.transforming)throw new dp;return e.push(null)}dn.exports(yp,gp),yp.prototype.push=function(e,t){return this._transformState.needTransform=!1,gp.prototype.push.call(this,e,t)},yp.prototype._transform=function(e,t,r){r(new cp("_transform()"))},yp.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)}},yp.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))},yp.prototype._destroy=function(e,t){gp.prototype._destroy.call(this,e,(function(e){t(e)}))};var Ap,wp=Mp,_p=fp;function Mp(e){if(!(this instanceof Mp))return new Mp(e);_p.call(this,e)}dn.exports(Mp,_p),Mp.prototype._transform=function(e,t,r){r(null,e)};var Sp=Nd.codes,Ep=Sp.ERR_MISSING_ARGS,kp=Sp.ERR_STREAM_DESTROYED;function Cp(e){if(e)throw e}function Rp(e,t,r,n){n=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(n);var i=!1;e.on("close",(function(){i=!0})),void 0===Ap&&(Ap=sp),Ap(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void n(t||new kp("pipe"))}}function xp(e){e()}function Op(e,t){return e.pipe(t)}function Pp(e){return e.length?"function"!=typeof e[e.length-1]?Cp:e.pop():Cp}var Bp=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=Pp(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Ep("streams");var o=t.map((function(e,r){var a=r<t.length-1;return Rp(e,a,r>0,(function(e){n||(n=e),e&&o.forEach(xp),a||(o.forEach(xp),i(n))}))}));return t.reduce(Op)};!function(e,t){(t=Pd.exports=up()).Stream=t,t.Readable=t,t.Writable=Gd(),t.Duplex=Zd(),t.Transform=fp,t.PassThrough=wp,t.finished=sp,t.pipeline=Bp}(0,Pd.exports);var Ip={exports:{}},Lp={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Ln.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u<s;u++){var f=e.charCodeAt(u)-48;o*=i,a=f>=49?f-49+10:f>=17?f-17+10:f,r(f>=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(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(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,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("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"===n)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"===n)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()},i.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=s(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=s(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.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,f=0,h=r;h<s;h+=n)f=u(e,h,h+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var c=1;for(f=u(e,h,e.length,t),h=0;h<a;h++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},i.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},i.prototype._move=function(e){f(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){i.prototype.inspect=h}else i.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[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 p(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 f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=l;d++){var p=f-d|0;h+=(a=(i=0|e.words[p])*(o=0|t.words[d])+c)/67108864|0,c=67108863&a}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:c[f-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");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},i.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},i.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?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,f=0,h=0|a[0],c=8191&h,l=h>>>13,d=0|a[1],p=8191&d,g=d>>>13,b=0|a[2],y=8191&b,m=b>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],M=8191&_,S=_>>>13,E=0|a[5],k=8191&E,C=E>>>13,R=0|a[6],x=8191&R,O=R>>>13,P=0|a[7],B=8191&P,I=P>>>13,L=0|a[8],j=8191&L,T=L>>>13,D=0|a[9],N=8191&D,U=D>>>13,F=0|s[0],q=8191&F,W=F>>>13,z=0|s[1],V=8191&z,H=z>>>13,K=0|s[2],Y=8191&K,G=K>>>13,Z=0|s[3],Q=8191&Z,J=Z>>>13,X=0|s[4],$=8191&X,ee=X>>>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,fe=se>>>13,he=0|s[8],ce=8191&he,le=he>>>13,de=0|s[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,W))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,W))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,W))+Math.imul(g,q)|0,o=Math.imul(g,W);var ye=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,W))+Math.imul(m,q)|0,o=Math.imul(m,W),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,H)|0;var me=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,W))+Math.imul(w,q)|0,o=Math.imul(w,W),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0;var ve=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,J)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,W))+Math.imul(S,q)|0,o=Math.imul(S,W),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0;var Ae=(f+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,W))+Math.imul(C,q)|0,o=Math.imul(C,W),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,J)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(f+(n=n+Math.imul(c,re)|0)|0)+((8191&(i=(i=i+Math.imul(c,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,W))+Math.imul(O,q)|0,o=Math.imul(O,W),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(f+(n=n+Math.imul(c,oe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ae)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,W))+Math.imul(I,q)|0,o=Math.imul(I,W),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Me=(f+(n=n+Math.imul(c,ue)|0)|0)+((8191&(i=(i=i+Math.imul(c,fe)|0)+Math.imul(l,ue)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,W))+Math.imul(T,q)|0,o=Math.imul(T,W),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,J)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,fe)|0;var Se=(f+(n=n+Math.imul(c,ce)|0)|0)+((8191&(i=(i=i+Math.imul(c,le)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,W))+Math.imul(U,q)|0,o=Math.imul(U,W),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,H)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ee=(f+(n=n+Math.imul(c,pe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ge)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,V),i=(i=Math.imul(N,H))+Math.imul(U,V)|0,o=Math.imul(U,H),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,fe)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;f=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,G))+Math.imul(U,Y)|0,o=Math.imul(U,G),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,fe)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,le)|0;var Ce=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;f=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,J))+Math.imul(U,Q)|0,o=Math.imul(U,J),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,fe)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,le)|0;var Re=(f+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(w,pe)|0))<<13)|0;f=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,fe)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,le)|0;var xe=(f+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(S,pe)|0))<<13)|0;f=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,fe)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,le)|0;var Oe=(f+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(C,pe)|0))<<13)|0;f=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,oe),i=(i=Math.imul(N,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(j,ue)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,le)|0;var Pe=(f+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(O,pe)|0))<<13)|0;f=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,ue),i=(i=Math.imul(N,fe))+Math.imul(U,ue)|0,o=Math.imul(U,fe),n=n+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0;var Be=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(I,pe)|0))<<13)|0;f=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(N,ce),i=(i=Math.imul(N,le))+Math.imul(U,ce)|0,o=Math.imul(U,le);var Ie=(f+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,ge)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Le=(f+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,ge))+Math.imul(U,pe)|0))<<13)|0;return f=((o=Math.imul(U,ge))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=Ae,u[5]=we,u[6]=_e,u[7]=Me,u[8]=Se,u[9]=Ee,u[10]=ke,u[11]=Ce,u[12]=Re,u[13]=xe,u[14]=Oe,u[15]=Pe,u[16]=Be,u[17]=Ie,u[18]=Le,0!==f&&(u[19]=f,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),f=Math.max(0,o-e.length+1);f<=u;f++){var h=o-f,c=(0|e.words[h])*(0|t.words[f]),l=67108863&c;s=67108863&(l=l+s|0),i+=(a=(a=a+(c/67108864|0)|0)+(l>>>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 y(e,t,r){return b(e,t,r)}Math.imul||(g=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?p(this,e,t):r<1024?b(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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 i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<n;this.words[t]=u|a,a=s>>>26-n}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()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("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=n;if(i-=a,i=Math.max(0,i),u){for(var f=0;f<a;f++)u.words[f]=this.words[f];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(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)},i.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},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-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()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,u=n.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var h=n.clone()._ishlnsubmul(o,1,u);0===h.negative&&(n=h,s&&(s.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[o.length+c])+(0|n.words[o.length+c-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,c),n.isZero()||(n.negative^=1);s&&(s.words[c]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),f=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++f;for(var h=n.clone(),c=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(h),a.isub(c)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(u)):(n.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:n.iushln(f)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0==(n.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.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},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(A,v),A.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},A.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},n(w,v),n(_,v),n(M,v),M.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},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return m[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,o),l=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=a;0!==d.cmp(s);){for(var g=d,b=0;0!==g.cmp(s);b++)g=g.redSqr();r(b<p);var y=this.pow(c,new i(1).iushln(p-b-1));l=l.redMul(y),c=y.redSqr(),d=d.redMul(c),p=b}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var o=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],h=u-1;h>=0;h--){var c=f>>h&1;o!==r[0]&&(o=this.sqr(o)),0!==c||0!==a?(a<<=1,a|=c,(4==++s||0===n&&0===h)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}u=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},n(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.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)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Lp,P);var jp=Lp.exports,Tp=fn.exports;function Dp(e){var t,r=e.modulus.byteLength();do{t=new jp(Tp(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function Np(e,t){var r=function(e){var t=Dp(e);return{blinder:t.toRed(jp.mont(e.modulus)).redPow(new jp(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),n=t.modulus.byteLength(),i=new jp(e).mul(r.blinder).umod(t.modulus),o=i.toRed(jp.mont(t.prime1)),a=i.toRed(jp.mont(t.prime2)),s=t.coefficient,u=t.prime1,f=t.prime2,h=o.redPow(t.exponent1).fromRed(),c=a.redPow(t.exponent2).fromRed(),l=h.isub(c).imul(s).umod(u).imul(f);return c.iadd(l).imul(r.unblinder).umod(t.modulus).toArrayLike(Lt,"be",n)}Np.getr=Dp;var Up=Np,Fp={},qp={},Wp={};!function(e){var t=Wp;function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}t.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)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),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},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}}(),function(e){var t=qp,r=Ul.exports,n=wh,i=Wp;t.assert=n,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.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},t.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,f=t.andln(3)+o&3;3===u&&(u=-1),3===f&&(f=-1),a=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==f?u:-u,r[0].push(a),s=0==(1&f)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?f:-f,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},t.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new r(e,"hex","le")}}();var zp={},Vp=Ul.exports,Hp=qp,Kp=Hp.getNAF,Yp=Hp.getJSF,Gp=Hp.assert;function Zp(e,t){this.type=e,this.p=new Vp(t.p,16),this.red=t.prime?Vp.red(t.prime):Vp.mont(this.p),this.zero=new Vp(0).toRed(this.red),this.one=new Vp(1).toRed(this.red),this.two=new Vp(2).toRed(this.red),this.n=t.n&&new Vp(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 Qp=Zp;function Jp(e,t){this.curve=e,this.type=t,this.precomputed=null}Zp.prototype.point=function(){throw new Error("Not implemented")},Zp.prototype.validate=function(){throw new Error("Not implemented")},Zp.prototype._fixedNafMul=function(e,t){Gp(e.precomputed);var r=e._getDoubles(),n=Kp(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 f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=i;c>0;c--){for(o=0;o<s.length;o++)(a=s[o])===c?h=h.mixedAdd(r.points[o]):a===-c&&(h=h.mixedAdd(r.points[o].neg()));f=f.add(h)}return f.toP()},Zp.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=Kp(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 f=o[s];Gp(0!==f),a="affine"===e.type?f>0?a.mixedAdd(i[f-1>>1]):a.mixedAdd(i[-f-1>>1].neg()):f>0?a.add(i[f-1>>1]):a.add(i[-f-1>>1].neg())}return"affine"===e.type?a.toP():a},Zp.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,f=this._wnafT2,h=this._wnafT3,c=0;for(o=0;o<n;o++){var l=(s=t[o])._getNAFPoints(e);u[o]=l.wnd,f[o]=l.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===u[d]&&1===u[p]){var g=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(g[1]=t[d].add(t[p]),g[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(g[1]=t[d].toJ().mixedAdd(t[p]),g[2]=t[d].add(t[p].neg())):(g[1]=t[d].toJ().mixedAdd(t[p]),g[2]=t[d].toJ().mixedAdd(t[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=Yp(r[d],r[p]);for(c=Math.max(y[0].length,c),h[d]=new Array(c),h[p]=new Array(c),a=0;a<c;a++){var m=0|y[0][a],v=0|y[1][a];h[d][a]=b[3*(m+1)+(v+1)],h[p][a]=0,f[d]=g}}else h[d]=Kp(r[d],u[d],this._bitLength),h[p]=Kp(r[p],u[p],this._bitLength),c=Math.max(h[d].length,c),c=Math.max(h[p].length,c)}var A=this.jpoint(null,null,null),w=this._wnafT4;for(o=c;o>=0;o--){for(var _=0;o>=0;){var M=!0;for(a=0;a<n;a++)w[a]=0|h[a][o],0!==w[a]&&(M=!1);if(!M)break;_++,o--}if(o>=0&&_++,A=A.dblp(_),o<0)break;for(a=0;a<n;a++){var S=w[a];0!==S&&(S>0?s=f[a][S-1>>1]:S<0&&(s=f[a][-S-1>>1].neg()),A="affine"===s.type?A.mixedAdd(s):A.add(s))}}for(o=0;o<n;o++)f[o]=null;return i?A:A.toP()},Zp.BasePoint=Jp,Jp.prototype.eq=function(){throw new Error("Not implemented")},Jp.prototype.validate=function(){return this.curve.validate(this)},Zp.prototype.decodePoint=function(e,t){e=Hp.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]?Gp(e[e.length-1]%2==0):7===e[0]&&Gp(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")},Jp.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Jp.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))},Jp.prototype.encode=function(e,t){return Hp.encode(this._encode(t),e)},Jp.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},Jp.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)},Jp.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}},Jp.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}},Jp.prototype._getBeta=function(){return null},Jp.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Xp=qp,$p=Ul.exports,eg=dn.exports,tg=Qp,rg=Xp.assert;function ng(e){tg.call(this,"short",e),this.a=new $p(e.a,16).toRed(this.red),this.b=new $p(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)}eg(ng,tg);var ig=ng;function og(e,t,r,n){tg.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new $p(t,16),this.y=new $p(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 ag(e,t,r,n){tg.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new $p(0)):(this.x=new $p(t,16),this.y=new $p(r,16),this.z=new $p(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}ng.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new $p(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 $p(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],rg(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 $p(e.a,16),b:new $p(e.b,16)}})):this._getEndoBasis(r)}}},ng.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:$p.mont(e),r=new $p(2).toRed(t).redInvm(),n=r.redNeg(),i=new $p(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},ng.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,a,s,u,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=e,l=this.n.clone(),d=new $p(1),p=new $p(0),g=new $p(0),b=new $p(1),y=0;0!==c.cmpn(0);){var m=l.div(c);u=l.sub(m.mul(c)),f=g.sub(m.mul(d));var v=b.sub(m.mul(p));if(!n&&u.cmp(h)<0)t=s.neg(),r=d,n=u.neg(),i=f;else if(n&&2==++y)break;s=u,l=c,c=u,g=d,d=f,b=p,p=v}o=u.neg(),a=f;var A=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(A)>=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},ng.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),f=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(f).neg()}},ng.prototype.pointFromX=function(e,t){(e=new $p(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 i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},ng.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)},ng.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 f=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return f},eg(og,tg.BasePoint),ng.prototype.point=function(e,t,r){return new og(this,e,t,r)},ng.prototype.pointFromJSON=function(e,t){return og.fromJSON(this,e,t)},og.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}},og.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]},og.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},og.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)+">"},og.prototype.isInfinity=function(){return this.inf},og.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)},og.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)},og.prototype.getX=function(){return this.x.fromRed()},og.prototype.getY=function(){return this.y.fromRed()},og.prototype.mul=function(e){return e=new $p(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)},og.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)},og.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)},og.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))},og.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},og.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},eg(ag,tg.BasePoint),ng.prototype.jpoint=function(e,t,r){return new ag(this,e,t,r)},ag.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)},ag.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ag.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 f=s.redSqr(),h=f.redMul(s),c=n.redMul(f),l=u.redSqr().redIAdd(h).redISub(c).redISub(c),d=u.redMul(c.redISub(l)).redISub(o.redMul(h)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,d,p)},ag.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(),f=u.redMul(a),h=r.redMul(u),c=s.redSqr().redIAdd(f).redISub(h).redISub(h),l=s.redMul(h.redISub(c)).redISub(i.redMul(f)),d=this.z.redMul(a);return this.curve.jpoint(c,l,d)},ag.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(),f=a.redAdd(a);for(t=0;t<e;t++){var h=o.redSqr(),c=f.redSqr(),l=c.redSqr(),d=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(u)),p=o.redMul(c),g=d.redSqr().redISub(p.redAdd(p)),b=p.redISub(g),y=d.redMul(b);y=y.redIAdd(y).redISub(l);var m=f.redMul(s);t+1<e&&(u=u.redMul(l)),o=g,s=m,f=y}return this.curve.jpoint(o,f.redMul(i),s)},ag.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ag.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),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=u,t=s.redMul(a.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),c=this.y.redSqr(),l=c.redSqr(),d=this.x.redAdd(c).redSqr().redISub(h).redISub(l);d=d.redIAdd(d);var p=h.redAdd(h).redIAdd(h),g=p.redSqr(),b=l.redIAdd(l);b=(b=b.redIAdd(b)).redIAdd(b),e=g.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},ag.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 f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=s.redMul(a.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),c=this.y.redSqr(),l=this.x.redMul(c),d=this.x.redSub(h).redMul(this.x.redAdd(h));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),g=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(c).redISub(h);var b=c.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=d.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},ag.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),f=(u=u.redIAdd(u)).redMul(a),h=s.redSqr().redISub(f.redAdd(f)),c=f.redISub(h),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=s.redMul(c).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(h,d,p)},ag.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 f=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),h=t.redMul(f);h=(h=h.redIAdd(h)).redIAdd(h);var c=this.x.redMul(s).redISub(h);c=(c=c.redIAdd(c)).redIAdd(c);var l=this.y.redMul(f.redMul(u.redISub(f)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(c,l,d)},ag.prototype.mul=function(e,t){return e=new $p(e,t),this.curve._wnafMul(this,e)},ag.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)},ag.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}},ag.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)+">"},ag.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var sg=Ul.exports,ug=dn.exports,fg=Qp,hg=qp;function cg(e){fg.call(this,"mont",e),this.a=new sg(e.a,16).toRed(this.red),this.b=new sg(e.b,16).toRed(this.red),this.i4=new sg(4).toRed(this.red).redInvm(),this.two=new sg(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}ug(cg,fg);var lg=cg;function dg(e,t,r){fg.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new sg(t,16),this.z=new sg(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}cg.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)},ug(dg,fg.BasePoint),cg.prototype.decodePoint=function(e,t){return this.point(hg.toArray(e,t),1)},cg.prototype.point=function(e,t){return new dg(this,e,t)},cg.prototype.pointFromJSON=function(e){return dg.fromJSON(this,e)},dg.prototype.precompute=function(){},dg.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},dg.fromJSON=function(e,t){return new dg(e,t[0],t[1]||e.one)},dg.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)+">"},dg.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},dg.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)},dg.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},dg.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)},dg.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},dg.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},dg.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},dg.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},dg.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},dg.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var pg=qp,gg=Ul.exports,bg=dn.exports,yg=Qp,mg=pg.assert;function vg(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,yg.call(this,"edwards",e),this.a=new gg(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new gg(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new gg(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),mg(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}bg(vg,yg);var Ag=vg;function wg(e,t,r,n,i){yg.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 gg(t,16),this.y=new gg(r,16),this.z=n?new gg(n,16):this.curve.one,this.t=i&&new gg(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}vg.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},vg.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},vg.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},vg.prototype.pointFromX=function(e,t){(e=new gg(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},vg.prototype.pointFromY=function(e,t){(e=new gg(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},vg.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)},bg(wg,yg.BasePoint),vg.prototype.pointFromJSON=function(e){return wg.fromJSON(this,e)},vg.prototype.point=function(e,t,r,n){return new wg(this,e,t,r,n)},wg.fromJSON=function(e,t){return new wg(e,t[0],t[1],t[2])},wg.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)+">"},wg.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},wg.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),f=o.redMul(s),h=i.redMul(s),c=a.redMul(o);return this.curve.point(u,f,c,h)},wg.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 f=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(f.redSub(this.curve.two)),t=f.redMul(n.redSub(u)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=f.redMul(n.redSub(u)),r=f.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)},wg.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},wg.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),f=o.redMul(a),h=s.redMul(u),c=o.redMul(u),l=a.redMul(s);return this.curve.point(f,h,l,c)},wg.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),f=i.redAdd(s),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),c=n.redMul(u).redMul(h);return this.curve.twisted?(t=n.redMul(f).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(f)):(t=n.redMul(f).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(c,t,r)},wg.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},wg.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},wg.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},wg.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},wg.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},wg.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},wg.prototype.getX=function(){return this.normalize(),this.x.fromRed()},wg.prototype.getY=function(){return this.normalize(),this.y.fromRed()},wg.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},wg.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}},wg.prototype.toP=wg.prototype.normalize,wg.prototype.mixedAdd=wg.prototype.add,function(e){var t=e;t.base=Qp,t.short=ig,t.mont=lg,t.edwards=Ag}(zp);var _g={},Mg={},Sg={},Eg=wh,kg=dn.exports;function Cg(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function Rg(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function xg(e){return 1===e.length?"0"+e:e}function Og(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}Sg.inherits=kg,Sg.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 o=e.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):Cg(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},Sg.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=xg(e[r].toString(16));return t},Sg.htonl=Rg,Sg.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=Rg(i)),r+=Og(i.toString(16))}return r},Sg.zero2=xg,Sg.zero8=Og,Sg.join32=function(e,t,r,n){var i=r-t;Eg(i%4==0);for(var o=new Array(i/4),a=0,s=t;a<o.length;a++,s+=4){var u;u="big"===n?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o},Sg.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},Sg.rotr32=function(e,t){return e>>>t|e<<32-t},Sg.rotl32=function(e,t){return e<<t|e>>>32-t},Sg.sum32=function(e,t){return e+t>>>0},Sg.sum32_3=function(e,t,r){return e+t+r>>>0},Sg.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},Sg.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},Sg.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},Sg.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},Sg.sum64_lo=function(e,t,r,n){return t+n>>>0},Sg.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,f=t;return u+=(f=f+n>>>0)<t?1:0,u+=(f=f+o>>>0)<o?1:0,e+r+i+a+(u+=(f=f+s>>>0)<s?1:0)>>>0},Sg.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},Sg.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,f){var h=0,c=t;return h+=(c=c+n>>>0)<t?1:0,h+=(c=c+o>>>0)<o?1:0,h+=(c=c+s>>>0)<s?1:0,e+r+i+a+u+(h+=(c=c+f>>>0)<f?1:0)>>>0},Sg.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,f){return t+n+o+s+f>>>0},Sg.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},Sg.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},Sg.shr64_hi=function(e,t,r){return e>>>r},Sg.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var Pg={},Bg=Sg,Ig=wh;function Lg(){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}Pg.BlockHash=Lg,Lg.prototype.update=function(e,t){if(e=Bg.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=Bg.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},Lg.prototype.digest=function(e){return this.update(this._pad()),Ig(null===this.pending),this._digest(e)},Lg.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};var jg={},Tg={},Dg=Sg.rotr32;function Ng(e,t,r){return e&t^~e&r}function Ug(e,t,r){return e&t^e&r^t&r}function Fg(e,t,r){return e^t^r}Tg.ft_1=function(e,t,r,n){return 0===e?Ng(t,r,n):1===e||3===e?Fg(t,r,n):2===e?Ug(t,r,n):void 0},Tg.ch32=Ng,Tg.maj32=Ug,Tg.p32=Fg,Tg.s0_256=function(e){return Dg(e,2)^Dg(e,13)^Dg(e,22)},Tg.s1_256=function(e){return Dg(e,6)^Dg(e,11)^Dg(e,25)},Tg.g0_256=function(e){return Dg(e,7)^Dg(e,18)^e>>>3},Tg.g1_256=function(e){return Dg(e,17)^Dg(e,19)^e>>>10};var qg=Sg,Wg=Pg,zg=Tg,Vg=qg.rotl32,Hg=qg.sum32,Kg=qg.sum32_5,Yg=zg.ft_1,Gg=Wg.BlockHash,Zg=[1518500249,1859775393,2400959708,3395469782];function Qg(){if(!(this instanceof Qg))return new Qg;Gg.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}qg.inherits(Qg,Gg);var Jg=Qg;Qg.blockSize=512,Qg.outSize=160,Qg.hmacStrength=80,Qg.padLength=64,Qg.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]=Vg(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4];for(n=0;n<r.length;n++){var f=~~(n/20),h=Kg(Vg(i,5),Yg(f,o,a,s),u,r[n],Zg[f]);u=s,s=a,a=Vg(o,30),o=i,i=h}this.h[0]=Hg(this.h[0],i),this.h[1]=Hg(this.h[1],o),this.h[2]=Hg(this.h[2],a),this.h[3]=Hg(this.h[3],s),this.h[4]=Hg(this.h[4],u)},Qg.prototype._digest=function(e){return"hex"===e?qg.toHex32(this.h,"big"):qg.split32(this.h,"big")};var Xg=Sg,$g=Pg,eb=Tg,tb=wh,rb=Xg.sum32,nb=Xg.sum32_4,ib=Xg.sum32_5,ob=eb.ch32,ab=eb.maj32,sb=eb.s0_256,ub=eb.s1_256,fb=eb.g0_256,hb=eb.g1_256,cb=$g.BlockHash,lb=[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 db(){if(!(this instanceof db))return new db;cb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=lb,this.W=new Array(64)}Xg.inherits(db,cb);var pb=db;db.blockSize=512,db.outSize=256,db.hmacStrength=192,db.padLength=64,db.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]=nb(hb(r[n-2]),r[n-7],fb(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],f=this.h[5],h=this.h[6],c=this.h[7];for(tb(this.k.length===r.length),n=0;n<r.length;n++){var l=ib(c,ub(u),ob(u,f,h),this.k[n],r[n]),d=rb(sb(i),ab(i,o,a));c=h,h=f,f=u,u=rb(s,l),s=a,a=o,o=i,i=rb(l,d)}this.h[0]=rb(this.h[0],i),this.h[1]=rb(this.h[1],o),this.h[2]=rb(this.h[2],a),this.h[3]=rb(this.h[3],s),this.h[4]=rb(this.h[4],u),this.h[5]=rb(this.h[5],f),this.h[6]=rb(this.h[6],h),this.h[7]=rb(this.h[7],c)},db.prototype._digest=function(e){return"hex"===e?Xg.toHex32(this.h,"big"):Xg.split32(this.h,"big")};var gb=Sg,bb=pb;function yb(){if(!(this instanceof yb))return new yb;bb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}gb.inherits(yb,bb);var mb=yb;yb.blockSize=512,yb.outSize=224,yb.hmacStrength=192,yb.padLength=64,yb.prototype._digest=function(e){return"hex"===e?gb.toHex32(this.h.slice(0,7),"big"):gb.split32(this.h.slice(0,7),"big")};var vb=Sg,Ab=Pg,wb=wh,_b=vb.rotr64_hi,Mb=vb.rotr64_lo,Sb=vb.shr64_hi,Eb=vb.shr64_lo,kb=vb.sum64,Cb=vb.sum64_hi,Rb=vb.sum64_lo,xb=vb.sum64_4_hi,Ob=vb.sum64_4_lo,Pb=vb.sum64_5_hi,Bb=vb.sum64_5_lo,Ib=Ab.BlockHash,Lb=[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 jb(){if(!(this instanceof jb))return new jb;Ib.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Lb,this.W=new Array(160)}vb.inherits(jb,Ib);var Tb=jb;function Db(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function Nb(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function Ub(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function Fb(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function qb(e,t){var r=_b(e,t,28)^_b(t,e,2)^_b(t,e,7);return r<0&&(r+=4294967296),r}function Wb(e,t){var r=Mb(e,t,28)^Mb(t,e,2)^Mb(t,e,7);return r<0&&(r+=4294967296),r}function zb(e,t){var r=_b(e,t,14)^_b(e,t,18)^_b(t,e,9);return r<0&&(r+=4294967296),r}function Vb(e,t){var r=Mb(e,t,14)^Mb(e,t,18)^Mb(t,e,9);return r<0&&(r+=4294967296),r}function Hb(e,t){var r=_b(e,t,1)^_b(e,t,8)^Sb(e,t,7);return r<0&&(r+=4294967296),r}function Kb(e,t){var r=Mb(e,t,1)^Mb(e,t,8)^Eb(e,t,7);return r<0&&(r+=4294967296),r}function Yb(e,t){var r=_b(e,t,19)^_b(t,e,29)^Sb(e,t,6);return r<0&&(r+=4294967296),r}function Gb(e,t){var r=Mb(e,t,19)^Mb(t,e,29)^Eb(e,t,6);return r<0&&(r+=4294967296),r}jb.blockSize=1024,jb.outSize=512,jb.hmacStrength=192,jb.padLength=128,jb.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=Yb(r[n-4],r[n-3]),o=Gb(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=Hb(r[n-30],r[n-29]),f=Kb(r[n-30],r[n-29]),h=r[n-32],c=r[n-31];r[n]=xb(i,o,a,s,u,f,h,c),r[n+1]=Ob(i,o,a,s,u,f,h,c)}},jb.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=this.h[5],f=this.h[6],h=this.h[7],c=this.h[8],l=this.h[9],d=this.h[10],p=this.h[11],g=this.h[12],b=this.h[13],y=this.h[14],m=this.h[15];wb(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var A=y,w=m,_=zb(c,l),M=Vb(c,l),S=Db(c,0,d,0,g),E=Nb(0,l,0,p,0,b),k=this.k[v],C=this.k[v+1],R=r[v],x=r[v+1],O=Pb(A,w,_,M,S,E,k,C,R,x),P=Bb(A,w,_,M,S,E,k,C,R,x);A=qb(n,i),w=Wb(n,i),_=Ub(n,0,o,0,s),M=Fb(0,i,0,a,0,u);var B=Cb(A,w,_,M),I=Rb(A,w,_,M);y=g,m=b,g=d,b=p,d=c,p=l,c=Cb(f,h,O,P),l=Rb(h,h,O,P),f=s,h=u,s=o,u=a,o=n,a=i,n=Cb(O,P,B,I),i=Rb(O,P,B,I)}kb(this.h,0,n,i),kb(this.h,2,o,a),kb(this.h,4,s,u),kb(this.h,6,f,h),kb(this.h,8,c,l),kb(this.h,10,d,p),kb(this.h,12,g,b),kb(this.h,14,y,m)},jb.prototype._digest=function(e){return"hex"===e?vb.toHex32(this.h,"big"):vb.split32(this.h,"big")};var Zb=Sg,Qb=Tb;function Jb(){if(!(this instanceof Jb))return new Jb;Qb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Zb.inherits(Jb,Qb);var Xb=Jb;Jb.blockSize=1024,Jb.outSize=384,Jb.hmacStrength=192,Jb.padLength=128,Jb.prototype._digest=function(e){return"hex"===e?Zb.toHex32(this.h.slice(0,12),"big"):Zb.split32(this.h.slice(0,12),"big")},jg.sha1=Jg,jg.sha224=mb,jg.sha256=pb,jg.sha384=Xb,jg.sha512=Tb;var $b={},ey=Sg,ty=Pg,ry=ey.rotl32,ny=ey.sum32,iy=ey.sum32_3,oy=ey.sum32_4,ay=ty.BlockHash;function sy(){if(!(this instanceof sy))return new sy;ay.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function uy(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 fy(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function hy(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}ey.inherits(sy,ay),$b.ripemd160=sy,sy.blockSize=512,sy.outSize=160,sy.hmacStrength=192,sy.padLength=64,sy.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=r,u=n,f=i,h=o,c=a,l=0;l<80;l++){var d=ny(ry(oy(r,uy(l,n,i,o),e[cy[l]+t],fy(l)),dy[l]),a);r=a,a=o,o=ry(i,10),i=n,n=d,d=ny(ry(oy(s,uy(79-l,u,f,h),e[ly[l]+t],hy(l)),py[l]),c),s=c,c=h,h=ry(f,10),f=u,u=d}d=iy(this.h[1],i,h),this.h[1]=iy(this.h[2],o,c),this.h[2]=iy(this.h[3],a,s),this.h[3]=iy(this.h[4],r,u),this.h[4]=iy(this.h[0],n,f),this.h[0]=d},sy.prototype._digest=function(e){return"hex"===e?ey.toHex32(this.h,"little"):ey.split32(this.h,"little")};var cy=[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],ly=[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],dy=[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],py=[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],gy=Sg,by=wh;function yy(e,t,r){if(!(this instanceof yy))return new yy(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(gy.toArray(t,r))}var my,vy,Ay=yy;yy.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),by(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)},yy.prototype.update=function(e,t){return this.inner.update(e,t),this},yy.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=Mg;t.utils=Sg,t.common=Pg,t.sha=jg,t.ripemd=$b,t.hmac=Ay,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(),function(e){var t,r=_g,n=Mg,i=zp,o=qp.assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new a(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=a,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:n.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:n.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:n.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:n.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:n.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:n.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:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=vy?my:(vy=1,my={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"]]}})}catch(e){t=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:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}();var wy=Mg,_y=Wp,My=wh;function Sy(e){if(!(this instanceof Sy))return new Sy(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=_y.toArray(e.entropy,e.entropyEnc||"hex"),r=_y.toArray(e.nonce,e.nonceEnc||"hex"),n=_y.toArray(e.pers,e.persEnc||"hex");My(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Ey=Sy;Sy.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},Sy.prototype._hmac=function(){return new wy.hmac(this.hash,this.K)},Sy.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())},Sy.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=_y.toArray(e,t),r=_y.toArray(r,n),My(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Sy.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=_y.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++,_y.encode(o,t)};var ky=Ul.exports,Cy=qp.assert;function Ry(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 xy=Ry;Ry.fromPublic=function(e,t,r){return t instanceof Ry?t:new Ry(e,{pub:t,pubEnc:r})},Ry.fromPrivate=function(e,t,r){return t instanceof Ry?t:new Ry(e,{priv:t,privEnc:r})},Ry.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"}},Ry.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},Ry.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Ry.prototype._importPrivate=function(e,t){this.priv=new ky(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Ry.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Cy(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Cy(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)},Ry.prototype.derive=function(e){return e.validate()||Cy(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Ry.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Ry.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Ry.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Oy=Ul.exports,Py=qp,By=Py.assert;function Iy(e,t){if(e instanceof Iy)return e;this._importDER(e,t)||(By(e.r&&e.s,"Signature without r or s"),this.r=new Oy(e.r,16),this.s=new Oy(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Ly=Iy;function jy(){this.place=0}function Ty(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 Dy(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 Ny(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)}}Iy.prototype._importDER=function(e,t){e=Py.toArray(e,t);var r=new jy;if(48!==e[r.place++])return!1;var n=Ty(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=Ty(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=Ty(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new Oy(o),this.s=new Oy(s),this.recoveryParam=null,!0},Iy.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=Dy(t),r=Dy(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Ny(n,t.length),(n=n.concat(t)).push(2),Ny(n,r.length);var i=n.concat(r),o=[48];return Ny(o,i.length),o=o.concat(i),Py.encode(o,e)};var Uy=Ul.exports,Fy=Ey,qy=qp,Wy=_g,zy=ql.exports,Vy=qy.assert,Hy=xy,Ky=Ly;function Yy(e){if(!(this instanceof Yy))return new Yy(e);"string"==typeof e&&(Vy(Object.prototype.hasOwnProperty.call(Wy,e),"Unknown curve "+e),e=Wy[e]),e instanceof Wy.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 Gy=Yy;Yy.prototype.keyPair=function(e){return new Hy(this,e)},Yy.prototype.keyFromPrivate=function(e,t){return Hy.fromPrivate(this,e,t)},Yy.prototype.keyFromPublic=function(e,t){return Hy.fromPublic(this,e,t)},Yy.prototype.genKeyPair=function(e){e||(e={});for(var t=new Fy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||zy(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new Uy(2));;){var i=new Uy(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Yy.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},Yy.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 Uy(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new Fy({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new Uy(1)),f=0;;f++){var h=n.k?n.k(f):new Uy(s.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(u)>=0)){var c=this.g.mul(h);if(!c.isInfinity()){var l=c.getX(),d=l.umod(this.n);if(0!==d.cmpn(0)){var p=h.invm(this.n).mul(d.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var g=(c.getY().isOdd()?1:0)|(0!==l.cmp(d)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),g^=1),new Ky({r:d,s:p,recoveryParam:g})}}}}}},Yy.prototype.verify=function(e,t,r,n){e=this._truncateToN(new Uy(e,16)),r=this.keyFromPublic(r,n);var i=(t=new Ky(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),f=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Yy.prototype.recoverPubKey=function(e,t,r,n){Vy((3&r)===r,"The recovery param is more than two bits"),t=new Ky(t,n);var i=this.n,o=new Uy(e),a=t.r,s=t.s,u=1&r,f=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");a=f?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var h=t.r.invm(i),c=i.sub(o).mul(h).umod(i),l=s.mul(h).umod(i);return this.g.mulAdd(c,a,l)},Yy.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Ky(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 Zy=qp,Qy=Zy.assert,Jy=Zy.parseBytes,Xy=Zy.cachedProperty;function $y(e,t){this.eddsa=e,this._secret=Jy(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Jy(t.pub)}$y.fromPublic=function(e,t){return t instanceof $y?t:new $y(e,{pub:t})},$y.fromSecret=function(e,t){return t instanceof $y?t:new $y(e,{secret:t})},$y.prototype.secret=function(){return this._secret},Xy($y,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Xy($y,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Xy($y,"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})),Xy($y,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Xy($y,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Xy($y,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),$y.prototype.sign=function(e){return Qy(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},$y.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},$y.prototype.getSecret=function(e){return Qy(this._secret,"KeyPair is public only"),Zy.encode(this.secret(),e)},$y.prototype.getPublic=function(e){return Zy.encode(this.pubBytes(),e)};var em=$y,tm=Ul.exports,rm=qp,nm=rm.assert,im=rm.cachedProperty,om=rm.parseBytes;function am(e,t){this.eddsa=e,"object"!=typeof t&&(t=om(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),nm(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof tm&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}im(am,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),im(am,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),im(am,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),im(am,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),am.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},am.prototype.toHex=function(){return rm.encode(this.toBytes(),"hex").toUpperCase()};var sm=am,um=Mg,fm=_g,hm=qp,cm=hm.assert,lm=hm.parseBytes,dm=em,pm=sm;function gm(e){if(cm("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof gm))return new gm(e);e=fm[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=um.sha512}var bm=gm;gm.prototype.sign=function(e,t){e=lm(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()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},gm.prototype.verify=function(e,t,r){e=lm(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)},gm.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return hm.intFromLE(e.digest()).umod(this.curve.n)},gm.prototype.keyFromPublic=function(e){return dm.fromPublic(this,e)},gm.prototype.keyFromSecret=function(e){return dm.fromSecret(this,e)},gm.prototype.makeSignature=function(e){return e instanceof pm?e:new pm(this,e)},gm.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},gm.prototype.decodePoint=function(e){var t=(e=hm.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=hm.intFromLE(r);return this.curve.pointFromY(i,n)},gm.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},gm.prototype.decodeInt=function(e){return hm.intFromLE(e)},gm.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=Fp;t.version="6.5.4",t.utils=qp,t.rand=ql.exports,t.curve=zp,t.curves=_g,t.ec=Gy,t.eddsa=bm}();var ym={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.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 o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Ln.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u<s;u++){var f=e.charCodeAt(u)-48;o*=i,a=f>=49?f-49+10:f>=17?f-17+10:f,r(f>=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(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(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,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("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"===n)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"===n)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()},i.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=s(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=s(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.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,f=0,h=r;h<s;h+=n)f=u(e,h,h+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var c=1;for(f=u(e,h,e.length,t),h=0;h<a;h++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},i.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},i.prototype._move=function(e){f(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){i.prototype.inspect=h}else i.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[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 p(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 f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=l;d++){var p=f-d|0;h+=(a=(i=0|e.words[p])*(o=0|t.words[d])+c)/67108864|0,c=67108863&a}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:c[f-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");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},i.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},i.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?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.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},i.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},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.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},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.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()},i.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.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()},i.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.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()},i.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.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},i.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)},i.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()},i.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,f=0,h=0|a[0],c=8191&h,l=h>>>13,d=0|a[1],p=8191&d,g=d>>>13,b=0|a[2],y=8191&b,m=b>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],M=8191&_,S=_>>>13,E=0|a[5],k=8191&E,C=E>>>13,R=0|a[6],x=8191&R,O=R>>>13,P=0|a[7],B=8191&P,I=P>>>13,L=0|a[8],j=8191&L,T=L>>>13,D=0|a[9],N=8191&D,U=D>>>13,F=0|s[0],q=8191&F,W=F>>>13,z=0|s[1],V=8191&z,H=z>>>13,K=0|s[2],Y=8191&K,G=K>>>13,Z=0|s[3],Q=8191&Z,J=Z>>>13,X=0|s[4],$=8191&X,ee=X>>>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,fe=se>>>13,he=0|s[8],ce=8191&he,le=he>>>13,de=0|s[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,W))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,W))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,W))+Math.imul(g,q)|0,o=Math.imul(g,W);var ye=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,W))+Math.imul(m,q)|0,o=Math.imul(m,W),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,H)|0;var me=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,W))+Math.imul(w,q)|0,o=Math.imul(w,W),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0;var ve=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,J)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,W))+Math.imul(S,q)|0,o=Math.imul(S,W),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0;var Ae=(f+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,W))+Math.imul(C,q)|0,o=Math.imul(C,W),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,J)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(f+(n=n+Math.imul(c,re)|0)|0)+((8191&(i=(i=i+Math.imul(c,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,W))+Math.imul(O,q)|0,o=Math.imul(O,W),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(f+(n=n+Math.imul(c,oe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ae)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,W))+Math.imul(I,q)|0,o=Math.imul(I,W),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Me=(f+(n=n+Math.imul(c,ue)|0)|0)+((8191&(i=(i=i+Math.imul(c,fe)|0)+Math.imul(l,ue)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,W))+Math.imul(T,q)|0,o=Math.imul(T,W),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,J)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,fe)|0;var Se=(f+(n=n+Math.imul(c,ce)|0)|0)+((8191&(i=(i=i+Math.imul(c,le)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,W))+Math.imul(U,q)|0,o=Math.imul(U,W),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,H)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ee=(f+(n=n+Math.imul(c,pe)|0)|0)+((8191&(i=(i=i+Math.imul(c,ge)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,V),i=(i=Math.imul(N,H))+Math.imul(U,V)|0,o=Math.imul(U,H),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,fe)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;f=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,G))+Math.imul(U,Y)|0,o=Math.imul(U,G),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,fe)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,le)|0;var Ce=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;f=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,J))+Math.imul(U,Q)|0,o=Math.imul(U,J),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,fe)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,le)|0;var Re=(f+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(w,pe)|0))<<13)|0;f=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,fe)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,le)|0;var xe=(f+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(S,pe)|0))<<13)|0;f=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,fe)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,le)|0;var Oe=(f+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(C,pe)|0))<<13)|0;f=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,oe),i=(i=Math.imul(N,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(j,ue)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,le)|0;var Pe=(f+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(O,pe)|0))<<13)|0;f=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,ue),i=(i=Math.imul(N,fe))+Math.imul(U,ue)|0,o=Math.imul(U,fe),n=n+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0;var Be=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(I,pe)|0))<<13)|0;f=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(N,ce),i=(i=Math.imul(N,le))+Math.imul(U,ce)|0,o=Math.imul(U,le);var Ie=(f+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,ge)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Le=(f+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,ge))+Math.imul(U,pe)|0))<<13)|0;return f=((o=Math.imul(U,ge))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=Ae,u[5]=we,u[6]=_e,u[7]=Me,u[8]=Se,u[9]=Ee,u[10]=ke,u[11]=Ce,u[12]=Re,u[13]=xe,u[14]=Oe,u[15]=Pe,u[16]=Be,u[17]=Ie,u[18]=Le,0!==f&&(u[19]=f,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),f=Math.max(0,o-e.length+1);f<=u;f++){var h=o-f,c=(0|e.words[h])*(0|t.words[f]),l=67108863&c;s=67108863&(l=l+s|0),i+=(a=(a=a+(c/67108864|0)|0)+(l>>>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 y(e,t,r){return b(e,t,r)}Math.imul||(g=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?p(this,e,t):r<1024?b(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.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 i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<n;this.words[t]=u|a,a=s>>>26-n}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()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("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=n;if(i-=a,i=Math.max(0,i),u){for(var f=0;f<a;f++)u.words[f]=this.words[f];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(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)},i.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},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-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()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,u=n.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var h=n.clone()._ishlnsubmul(o,1,u);0===h.negative&&(n=h,s&&(s.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[o.length+c])+(0|n.words[o.length+c-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,c),n.isZero()||(n.negative^=1);s&&(s.words[c]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.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)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),f=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++f;for(var h=n.clone(),c=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(h),a.isub(c)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(u)):(n.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:n.iushln(f)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0==(n.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.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)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;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},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(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},i.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},i.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},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.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},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(A,v),A.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},A.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},n(w,v),n(_,v),n(M,v),M.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},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return m[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,o),l=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=a;0!==d.cmp(s);){for(var g=d,b=0;0!==g.cmp(s);b++)g=g.redSqr();r(b<p);var y=this.pow(c,new i(1).iushln(p-b-1));l=l.redMul(y),c=y.redSqr(),d=d.redMul(c),p=b}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var o=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],h=u-1;h>=0;h--){var c=f>>h&1;o!==r[0]&&(o=this.sqr(o)),0!==c||0!==a?(a<<=1,a|=c,(4==++s||0===n&&0===h)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}u=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},n(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.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)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(ym,P);var mm,vm={},Am={},wm={},_m={},Mm=Yr,Sm=Mm.Buffer,Em={};for(mm in Mm)Mm.hasOwnProperty(mm)&&"SlowBuffer"!==mm&&"Buffer"!==mm&&(Em[mm]=Mm[mm]);var km=Em.Buffer={};for(mm in Sm)Sm.hasOwnProperty(mm)&&"allocUnsafe"!==mm&&"allocUnsafeSlow"!==mm&&(km[mm]=Sm[mm]);if(Em.Buffer.prototype=Sm.prototype,km.from&&km.from!==Uint8Array.from||(km.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&&void 0===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 Sm(e,t,r)}),km.alloc||(km.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=Sm(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!Em.kStringMaxLength)try{Em.kStringMaxLength=O.binding("buffer").kStringMaxLength}catch(t){}Em.constants||(Em.constants={MAX_LENGTH:Em.kMaxLength},Em.kStringMaxLength&&(Em.constants.MAX_STRING_LENGTH=Em.kStringMaxLength));var Cm=Em,Rm={};const xm=dn.exports;function Om(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function Pm(e,t){this.path=e,this.rethrow(t)}Rm.Reporter=Om,Om.prototype.isError=function(e){return e instanceof Pm},Om.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},Om.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},Om.prototype.enterKey=function(e){return this._reporterState.path.push(e)},Om.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},Om.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},Om.prototype.path=function(){return this._reporterState.path.join("/")},Om.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},Om.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},Om.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof Pm;if(t=n?e:new Pm(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},Om.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},xm(Pm,Error),Pm.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Pm),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this};var Bm={};const Im=dn.exports,Lm=Rm.Reporter,jm=Cm.Buffer;function Tm(e,t){Lm.call(this,t),jm.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function Dm(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return Dm.isEncoderBuffer(e)||(e=new Dm(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=jm.byteLength(e);else{if(!jm.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}Im(Tm,Lm),Bm.DecoderBuffer=Tm,Tm.isDecoderBuffer=function(e){return e instanceof Tm||"object"==typeof e&&jm.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},Tm.prototype.save=function(){return{offset:this.offset,reporter:Lm.prototype.save.call(this)}},Tm.prototype.restore=function(e){const t=new Tm(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,Lm.prototype.restore.call(this,e.reporter),t},Tm.prototype.isEmpty=function(){return this.offset===this.length},Tm.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},Tm.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new Tm(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},Tm.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},Bm.EncoderBuffer=Dm,Dm.isEncoderBuffer=function(e){return e instanceof Dm||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},Dm.prototype.join=function(e,t){return e||(e=jm.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):jm.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e};const Nm=Rm.Reporter,Um=Bm.EncoderBuffer,Fm=Bm.DecoderBuffer,qm=wh,Wm=["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"],zm=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Wm);function Vm(e,t,r){const 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())}var Hm=Vm;const Km=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Vm.prototype.clone=function(){const e=this._baseState,t={};Km.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},Vm.prototype._wrap=function(){const e=this._baseState;zm.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},Vm.prototype._init=function(e){const t=this._baseState;qm(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),qm.equal(t.children.length,1,"Root node can have only one child")},Vm.prototype._useArgs=function(e){const 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&&(qm(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(qm(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const 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){Vm.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),Wm.forEach((function(e){Vm.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return qm(null===t.tag),t.tag=e,this._useArgs(r),this}})),Vm.prototype.use=function(e){qm(e);const t=this._baseState;return qm(null===t.use),t.use=e,this},Vm.prototype.optional=function(){return this._baseState.optional=!0,this},Vm.prototype.def=function(e){const t=this._baseState;return qm(null===t.default),t.default=e,t.optional=!0,this},Vm.prototype.explicit=function(e){const t=this._baseState;return qm(null===t.explicit&&null===t.implicit),t.explicit=e,this},Vm.prototype.implicit=function(e){const t=this._baseState;return qm(null===t.explicit&&null===t.implicit),t.implicit=e,this},Vm.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},Vm.prototype.key=function(e){const t=this._baseState;return qm(null===t.key),t.key=e,this},Vm.prototype.any=function(){return this._baseState.any=!0,this},Vm.prototype.choice=function(e){const t=this._baseState;return qm(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},Vm.prototype.contains=function(e){const t=this._baseState;return qm(null===t.use),t.contains=e,this},Vm.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,o=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(o=this._peekTag(e,n,r.any),e.isError(o))return o}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(n)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,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)){const n=new Fm(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},Vm.prototype._decodeGeneric=function(e,t,r){const 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)},Vm.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),qm(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},Vm.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},Vm.prototype._createEncoderBuffer=function(e){return new Um(e,this.reporter)},Vm.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},Vm.prototype._encodeValue=function(e,t,r){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new Nm);let i=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let o=null,a=!1;if(n.any)i=this._createEncoderBuffer(e);else if(n.choice)i=this._encodeChoice(e,t);else if(n.contains)o=this._getUse(n.contains,r)._encode(e,t),a=!0;else if(n.children)o=n.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");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==n.use?i=this._getUse(n.use,r)._encode(e,t):(o=this._encodePrimitive(n.tag,e),a=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,r=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(i=this._encodeComposite(e,a,r,o))}return null!==n.explicit&&(i=this._encodeComposite(n.explicit,!1,"context",i)),i},Vm.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||qm(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},Vm.prototype._encodePrimitive=function(e,t){const 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)},Vm.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},Vm.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Ym={};!function(e){function t(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t(e.tag)}(Ym);const Gm=dn.exports,Zm=Cm.Buffer,Qm=Hm,Jm=Ym;function Xm(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new ev,this.tree._init(e.body)}var $m=Xm;function ev(e){Qm.call(this,"der",e)}function tv(e){return e<10?"0"+e:e}Xm.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},Gm(ev,Qm),ev.prototype._encodeComposite=function(e,t,r,n){const i=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),Jm.tagByName.hasOwnProperty(e))i=Jm.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=Jm.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=Zm.alloc(2);return e[0]=i,e[1]=n.length,this._createEncoderBuffer([e,n])}let o=1;for(let e=n.length;e>=256;e>>=8)o++;const a=Zm.alloc(2+o);a[0]=i,a[1]=128|o;for(let e=1+o,t=n.length;t>0;e--,t>>=8)a[e]=255&t;return this._createEncoderBuffer([a,n])},ev.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=Zm.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}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")},ev.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(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=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])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const i=Zm.alloc(n);let o=i.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(i[o--]=127&r;(r>>=7)>0;)i[o--]=128|127&r}return this._createEncoderBuffer(i)},ev.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[tv(n.getUTCFullYear()),tv(n.getUTCMonth()+1),tv(n.getUTCDate()),tv(n.getUTCHours()),tv(n.getUTCMinutes()),tv(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[tv(n.getUTCFullYear()%100),tv(n.getUTCMonth()+1),tv(n.getUTCDate()),tv(n.getUTCHours()),tv(n.getUTCMinutes()),tv(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},ev.prototype._encodeNull=function(){return this._createEncoderBuffer("")},ev.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&&!Zm.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=Zm.from(t)}if(Zm.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=Zm.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(Zm.from(n))},ev.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},ev.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},ev.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0};const rv=dn.exports,nv=$m;function iv(e){nv.call(this,e),this.enc="pem"}rv(iv,nv);var ov=iv;iv.prototype.encode=function(e,t){const r=nv.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")},function(e){const t=e;t.der=$m,t.pem=ov}(_m);var av={};const sv=dn.exports,uv=Ul.exports,fv=Bm.DecoderBuffer,hv=Hm,cv=Ym;function lv(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new pv,this.tree._init(e.body)}var dv=lv;function pv(e){hv.call(this,"der",e)}function gv(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=cv.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:cv.tag[r]}}function bv(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}lv.prototype.decode=function(e,t){return fv.isDecoderBuffer(e)||(e=new fv(e,t)),this.tree._decode(e,t)},sv(pv,hv),pv.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=gv(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)},pv.prototype._decodeTag=function(e,t,r){const n=gv(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=bv(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+'"');const 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+'"'))},pv.prototype._skipUntilEnd=function(e,t){for(;;){const r=gv(e,t);if(e.isError(r))return r;const n=bv(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},pv.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},pv.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},pv.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,u=i[0]%40;if(n=r?i:[s,u].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},pv.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,a,s,u;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,u,0)},pv.prototype._decodeNull=function(){return null},pv.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},pv.prototype._decodeInt=function(e,t){const r=e.raw();let n=new uv(r);return t&&(n=t[n.toString(10)]||n),n},pv.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree};const yv=dn.exports,mv=Cm.Buffer,vv=dv;function Av(e){vv.call(this,e),this.enc="pem"}yv(Av,vv);var wv=Av;Av.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,a=-1;for(let e=0;e<r.length;e++){const t=r[e].match(i);if(null!==t&&t[2]===n){if(-1!==o){if("END"!==t[1])break;a=e;break}if("BEGIN"!==t[1])break;o=e}}if(-1===o||-1===a)throw new Error("PEM section not found for: "+n);const s=r.slice(o+1,a).join("");s.replace(/[^a-z0-9+/=]+/gi,"");const u=mv.from(s,"base64");return vv.prototype.decode.call(this,u,t)},function(e){const t=e;t.der=dv,t.pem=wv}(av),function(e){const t=_m,r=av,n=dn.exports;function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return n(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r[e])),this.decoders[e]},i.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(t[e])),this.encoders[e]},i.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}}(wm);var _v={};!function(e){const t=e;t.Reporter=Rm.Reporter,t.DecoderBuffer=Bm.DecoderBuffer,t.EncoderBuffer=Bm.EncoderBuffer,t.Node=Hm}(_v);var Mv={};!function(e){const t=e;t._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},t.der=Ym}(Mv),function(e){const t=Am;t.bignum=Ul.exports,t.define=wm.define,t.base=_v,t.constants=Mv,t.decoders=av,t.encoders=_m}();var Sv=Am,Ev=Sv.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),kv=Sv.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),Cv=Sv.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),Rv=Sv.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Cv),this.key("subjectPublicKey").bitstr())})),xv=Sv.define("RelativeDistinguishedName",(function(){this.setof(kv)})),Ov=Sv.define("RDNSequence",(function(){this.seqof(xv)})),Pv=Sv.define("Name",(function(){this.choice({rdnSequence:this.use(Ov)})})),Bv=Sv.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(Ev),this.key("notAfter").use(Ev))})),Iv=Sv.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),Lv=Sv.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Cv),this.key("issuer").use(Pv),this.key("validity").use(Bv),this.key("subject").use(Pv),this.key("subjectPublicKeyInfo").use(Rv),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Iv).optional())})),jv=Sv.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(Lv),this.key("signatureAlgorithm").use(Cv),this.key("signatureValue").bitstr())})),Tv=Am;vm.certificate=jv;var Dv=Tv.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())}));vm.RSAPrivateKey=Dv;var Nv=Tv.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));vm.RSAPublicKey=Nv;var Uv=Tv.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Fv),this.key("subjectPublicKey").bitstr())}));vm.PublicKey=Uv;var Fv=Tv.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())})),qv=Tv.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(Fv),this.key("subjectPrivateKey").octstr())}));vm.PrivateKey=qv;var Wv=Tv.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())}));vm.EncryptedPrivateKey=Wv;var zv=Tv.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())}));vm.DSAPrivateKey=zv,vm.DSAparam=Tv.define("DSAparam",(function(){this.int()}));var Vv=Tv.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Hv),this.key("publicKey").optional().explicit(1).bitstr())}));vm.ECPrivateKey=Vv;var Hv=Tv.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));vm.signature=Tv.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var Kv=/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,Yv=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Gv=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Zv=il,Qv=$h,Jv=hn.exports.Buffer,Xv=vm,$v={"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"},eA=$h,tA=Ff,rA=hn.exports.Buffer,nA=iA;function iA(e){var t;"object"!=typeof e||rA.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=rA.from(e));var r,n,i=function(e,t){var r,n=e.toString(),i=n.match(Kv);if(i){var o="aes"+i[1],a=Jv.from(i[2],"hex"),s=Jv.from(i[3].replace(/[\r\n]/g,""),"base64"),u=Zv(t,a.slice(0,8),parseInt(i[1],10)).key,f=[],h=Qv.createDecipheriv(o,u,a);f.push(h.update(s)),f.push(h.final()),r=Jv.concat(f)}else{var c=n.match(Gv);r=Jv.from(c[2].replace(/[\r\n]/g,""),"base64")}return{tag:n.match(Yv)[1],data:r}}(e,t),o=i.tag,a=i.data;switch(o){case"CERTIFICATE":n=Xv.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(n||(n=Xv.PublicKey.decode(a,"der")),r=n.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Xv.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=Xv.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":a=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=$v[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(i.split("-")[1],10)/8,u=tA.pbkdf2Sync(t,r,n,s,"sha1"),f=eA.createDecipheriv(i,u,o),h=[];return h.push(f.update(a)),h.push(f.final()),rA.concat(h)}(a=Xv.EncryptedPrivateKey.decode(a,"der"),t);case"PRIVATE KEY":switch(r=(n=Xv.PrivateKey.decode(a,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Xv.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:Xv.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=Xv.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return Xv.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Xv.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Xv.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return{curve:(a=Xv.ECPrivateKey.decode(a,"der")).parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+o)}}iA.signature=Xv.signature;var oA={"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"},aA=hn.exports.Buffer,sA=Df,uA=Up,fA=Fp.ec,hA=ym.exports,cA=nA,lA=oA;function dA(e,t,r,n){if((e=aA.from(e.toArray())).length<t.byteLength()){var i=aA.alloc(t.byteLength()-e.length);e=aA.concat([i,e])}var o=r.length,a=function(e,t){e=(e=pA(e,t)).mod(t);var r=aA.from(e.toArray());if(r.length<t.byteLength()){var n=aA.alloc(t.byteLength()-r.length);r=aA.concat([n,r])}return r}(r,t),s=aA.alloc(o);s.fill(1);var u=aA.alloc(o);return u=sA(n,u).update(s).update(aA.from([0])).update(e).update(a).digest(),s=sA(n,u).update(s).digest(),{k:u=sA(n,u).update(s).update(aA.from([1])).update(e).update(a).digest(),v:s=sA(n,u).update(s).digest()}}function pA(e,t){var r=new hA(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function gA(e,t,r){var n,i;do{for(n=aA.alloc(0);8*n.length<e.bitLength();)t.v=sA(r,t.k).update(t.v).digest(),n=aA.concat([n,t.v]);i=pA(n,e),t.k=sA(r,t.k).update(t.v).update(aA.from([0])).digest(),t.v=sA(r,t.k).update(t.v).digest()}while(-1!==i.cmp(e));return i}function bA(e,t,r,n){return e.toRed(hA.mont(r)).redPow(t).fromRed().mod(n)}Ip.exports=function(e,t,r,n,i){var o=cA(t);if(o.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(e,t){var r=lA[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var n=new fA(r).keyFromPrivate(t.privateKey).sign(e);return aA.from(n.toDER())}(e,o)}if("dsa"===o.type){if("dsa"!==n)throw new Error("wrong private key type");return function(e,t,r){for(var n,i=t.params.priv_key,o=t.params.p,a=t.params.q,s=t.params.g,u=new hA(0),f=pA(e,a).mod(a),h=!1,c=dA(i,a,e,r);!1===h;)u=bA(s,n=gA(a,c,r),o,a),0===(h=n.invm(a).imul(f.add(i.mul(u))).mod(a)).cmpn(0)&&(h=!1,u=new hA(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),aA.from(r)}(u,h)}(e,o,r)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");e=aA.concat([i,e]);for(var a=o.modulus.byteLength(),s=[0,1];e.length+s.length+1<a;)s.push(255);s.push(0);for(var u=-1;++u<e.length;)s.push(e[u]);return uA(s,o)},Ip.exports.getKey=dA,Ip.exports.makeKey=gA;var yA=hn.exports.Buffer,mA=ym.exports,vA=Fp.ec,AA=nA,wA=oA;function _A(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var MA=hn.exports.Buffer,SA=vf,EA=Pd.exports,kA=dn.exports,CA=Ip.exports,RA=function(e,t,r,n,i){var o=AA(r);if("ec"===o.type){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong public key type");return function(e,t,r){var n=wA[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new vA(n),o=r.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,o)}if("dsa"===o.type){if("dsa"!==n)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,i=r.data.q,o=r.data.g,a=r.data.pub_key,s=AA.signature.decode(e,"der"),u=s.s,f=s.r;_A(u,i),_A(f,i);var h=mA.mont(n),c=u.invm(i);return 0===o.toRed(h).redPow(new mA(t).mul(c).mod(i)).fromRed().mul(a.toRed(h).redPow(f.mul(c).mod(i)).fromRed()).mod(n).mod(i).cmp(f)}(e,t,o)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong public key type");t=yA.concat([i,t]);for(var a=o.modulus.byteLength(),s=[1],u=0;t.length+s.length+2<a;)s.push(255),u++;s.push(0);for(var f=-1;++f<t.length;)s.push(t[f]);s=yA.from(s);var h=mA.mont(o.modulus);e=(e=new mA(e).toRed(h)).redPow(new mA(o.publicExponent)),e=yA.from(e.fromRed().toArray());var c=u<8?1:0;for(a=Math.min(e.length,s.length),e.length!==s.length&&(c=1),f=-1;++f<a;)c|=e[f]^s[f];return 0===c},xA=Nf;function OA(e){EA.Writable.call(this);var t=xA[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=SA(t.hash),this._tag=t.id,this._signType=t.sign}function PA(e){EA.Writable.call(this);var t=xA[e];if(!t)throw new Error("Unknown message digest");this._hash=SA(t.hash),this._tag=t.id,this._signType=t.sign}function BA(e){return new OA(e)}function IA(e){return new PA(e)}Object.keys(xA).forEach((function(e){xA[e].id=MA.from(xA[e].id,"hex"),xA[e.toLowerCase()]=xA[e]})),kA(OA,EA.Writable),OA.prototype._write=function(e,t,r){this._hash.update(e),r()},OA.prototype.update=function(e,t){return"string"==typeof e&&(e=MA.from(e,t)),this._hash.update(e),this},OA.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=CA(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},kA(PA,EA.Writable),PA.prototype._write=function(e,t,r){this._hash.update(e),r()},PA.prototype.update=function(e,t){return"string"==typeof e&&(e=MA.from(e,t)),this._hash.update(e),this},PA.prototype.verify=function(e,t,r){"string"==typeof t&&(t=MA.from(t,r)),this.end();var n=this._hash.digest();return RA(t,n,e,this._signType,this._tag)};var LA={Sign:BA,Verify:IA,createSign:BA,createVerify:IA},jA=Fp,TA=Ul.exports,DA={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 NA(e){this.curveType=DA[e],this.curveType||(this.curveType={name:e}),this.curve=new jA.ec(this.curveType.name),this.keys=void 0}function UA(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new Lt(e);if(r&&n.length<r){var i=new Lt(r-n.length);i.fill(0),n=Lt.concat([i,n])}return t?n.toString(t):n}DA.p224=DA.secp224r1,DA.p256=DA.secp256r1=DA.prime256v1,DA.p192=DA.secp192r1=DA.prime192v1,DA.p384=DA.secp384r1,DA.p521=DA.secp521r1,NA.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},NA.prototype.computeSecret=function(e,t,r){return t=t||"utf8",br(e)||(e=new Lt(e,t)),UA(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},NA.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),UA(r,e)},NA.prototype.getPrivateKey=function(e){return UA(this.keys.getPrivate(),e)},NA.prototype.setPublicKey=function(e,t){return t=t||"utf8",br(e)||(e=new Lt(e,t)),this.keys._importPublic(e),this},NA.prototype.setPrivateKey=function(e,t){t=t||"utf8",br(e)||(e=new Lt(e,t));var r=new TA(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this};var FA={},qA=vf,WA=hn.exports.Buffer,zA=function(e,t){for(var r,n=WA.alloc(0),i=0;n.length<t;)r=VA(i++),n=WA.concat([n,qA("sha1").update(e).update(r).digest()]);return n.slice(0,t)};function VA(e){var t=WA.allocUnsafe(4);return t.writeUInt32BE(e,0),t}var HA=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e},KA=Ul.exports,YA=hn.exports.Buffer,GA=function(e,t){return YA.from(e.toRed(KA.mont(t.modulus)).redPow(new KA(t.publicExponent)).fromRed().toArray())},ZA=nA,QA=fn.exports,JA=vf,XA=zA,$A=HA,ew=Ul.exports,tw=GA,rw=Up,nw=hn.exports.Buffer,iw=function(e,t,r){var n;n=e.padding?e.padding:r?1:4;var i,o=ZA(e);if(4===n)i=function(e,t){var r=e.modulus.byteLength(),n=t.length,i=JA("sha1").update(nw.alloc(0)).digest(),o=i.length,a=2*o;if(n>r-a-2)throw new Error("message too long");var s=nw.alloc(r-n-a-2),u=r-o-1,f=QA(o),h=$A(nw.concat([i,s,nw.alloc(1,1),t],u),XA(f,u)),c=$A(f,XA(h,o));return new ew(nw.concat([nw.alloc(1),c,h],r))}(o,t);else if(1===n)i=function(e,t,r){var n,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return n=r?nw.alloc(o-i-3,255):function(e){for(var t,r=nw.allocUnsafe(e),n=0,i=QA(2*e),o=0;n<e;)o===i.length&&(i=QA(2*e),o=0),(t=i[o++])&&(r[n++]=t);return r}(o-i-3),new ew(nw.concat([nw.from([0,r?1:2]),n,nw.alloc(1),t],o))}(o,t,r);else{if(3!==n)throw new Error("unknown padding");if((i=new ew(t)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return r?rw(i,o):tw(i,o)},ow=nA,aw=zA,sw=HA,uw=Ul.exports,fw=Up,hw=vf,cw=GA,lw=hn.exports.Buffer,dw=function(e,t,r){var n;n=e.padding?e.padding:r?1:4;var i,o=ow(e),a=o.modulus.byteLength();if(t.length>a||new uw(t).cmp(o.modulus)>=0)throw new Error("decryption error");i=r?cw(new uw(t),o):fw(t,o);var s=lw.alloc(a-i.length);if(i=lw.concat([s,i],a),4===n)return function(e,t){var r=e.modulus.byteLength(),n=hw("sha1").update(lw.alloc(0)).digest(),i=n.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,i+1),a=t.slice(i+1),s=sw(o,aw(a,i)),u=sw(a,aw(s,r-i-1));if(function(e,t){e=lw.from(e),t=lw.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,u.slice(0,i)))throw new Error("decryption error");for(var f=i;0===u[f];)f++;if(1!==u[f++])throw new Error("decryption error");return u.slice(f)}(o,i);if(1===n)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,i,r);if(3===n)return i;throw new Error("unknown padding")};!function(e){e.publicEncrypt=iw,e.privateDecrypt=dw,e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}}(FA);var pw={};function gw(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var bw=hn.exports,yw=bw.Buffer,mw=bw.kMaxLength,vw=P.crypto||P.msCrypto,Aw=Math.pow(2,32)-1;function ww(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>Aw||e<0)throw new TypeError("offset must be a uint32");if(e>mw||e>t)throw new RangeError("offset out of range")}function _w(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>Aw||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>mw)throw new RangeError("buffer too small")}function Mw(e,t,r,n){var i=e.buffer,o=new Uint8Array(i,t,r);return vw.getRandomValues(o),n?void y((function(){n(null,e)})):e}vw&&vw.getRandomValues?(pw.randomFill=function(e,t,r,n){if(!(yw.isBuffer(e)||e instanceof P.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return ww(t,e.length),_w(r,t,e.length),Mw(e,t,r,n)},pw.randomFillSync=function(e,t,r){if(void 0===t&&(t=0),!(yw.isBuffer(e)||e instanceof P.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return ww(t,e.length),void 0===r&&(r=e.length-t),_w(r,t,e.length),Mw(e,t,r)}):(pw.randomFill=gw,pw.randomFillSync=gw),un.randomBytes=un.rng=un.pseudoRandomBytes=un.prng=fn.exports,un.createHash=un.Hash=vf,un.createHmac=un.Hmac=Df;var Sw=Uf,Ew=Object.keys(Sw),kw=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Ew);un.getHashes=function(){return kw};var Cw=Ff;un.pbkdf2=Cw.pbkdf2,un.pbkdf2Sync=Cw.pbkdf2Sync;var Rw=gh;un.Cipher=Rw.Cipher,un.createCipher=Rw.createCipher,un.Cipheriv=Rw.Cipheriv,un.createCipheriv=Rw.createCipheriv,un.Decipher=Rw.Decipher,un.createDecipher=Rw.createDecipher,un.Decipheriv=Rw.Decipheriv,un.createDecipheriv=Rw.createDecipheriv,un.getCiphers=Rw.getCiphers,un.listCiphers=Rw.listCiphers;var xw=Nl;un.DiffieHellmanGroup=xw.DiffieHellmanGroup,un.createDiffieHellmanGroup=xw.createDiffieHellmanGroup,un.getDiffieHellman=xw.getDiffieHellman,un.createDiffieHellman=xw.createDiffieHellman,un.DiffieHellman=xw.DiffieHellman;var Ow=LA;un.createSign=Ow.createSign,un.Sign=Ow.Sign,un.createVerify=Ow.createVerify,un.Verify=Ow.Verify,un.createECDH=function(e){return new NA(e)};var Pw=FA;un.publicEncrypt=Pw.publicEncrypt,un.privateEncrypt=Pw.privateEncrypt,un.publicDecrypt=Pw.publicDecrypt,un.privateDecrypt=Pw.privateDecrypt;var Bw=pw;un.randomFill=Bw.randomFill,un.randomFillSync=Bw.randomFillSync,un.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},un.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};const{Buffer:Iw}=Yr,{createHash:Lw,createHmac:jw}=un,Tw={},Dw=e=>{switch(e){case"sha256":case"sha3-256":case"blake2s256":return 32;case"sha512":case"sha3-512":case"blake2b512":return 64;case"sha224":case"sha3-224":return 28;case"sha384":case"sha3-384":return 48;case"sha1":return 20;case"md5":return 16;default:{let t=Tw[e];return void 0===t&&(t=Lw(e).digest().length,Tw[e]=t),t}}},Nw=(e,t,r,n)=>{const i=Iw.isBuffer(r)?r:Iw.from(r),o=n&&n.length?Iw.from(n):Iw.alloc(t,0);return jw(e,o).update(i).digest()},Uw=(e,t,r,n,i)=>{const o=Iw.isBuffer(i)?i:Iw.from(i||""),a=o.length,s=Math.ceil(n/t);if(s>255)throw new Error(`OKM length ${n} is too long for ${e} hash`);const u=Iw.alloc(t*s+a+1);for(let n=1,i=0,f=0;n<=s;++n)o.copy(u,f),u[f+a]=n,jw(e,r).update(u.slice(i,f+a+1)).digest().copy(u,f),i=f,f+=t;return u.slice(0,n)};function Fw(e,t,{salt:r="",info:n="",hash:i="SHA-256"}={}){i=i.toLowerCase().replace("-","");const o=Dw(i),a=Nw(i,o,e,r);return Uw(i,o,a,t,n)}Object.defineProperties(Fw,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:Dw},extract:{configurable:!1,enumerable:!1,writable:!1,value:Nw},expand:{configurable:!1,enumerable:!1,writable:!1,value:Uw}});var qw=Fw;const Ww="Impossible case. Please create issue.",zw="The tweak was out of range or the resulted private key is invalid",Vw="The tweak was out of range or equal to zero",Hw="Public Key could not be parsed",Kw="Public Key serialization error",Yw="Signature could not be parsed";function Gw(e,t){if(!e)throw new Error(t)}function Zw(e,t,r){if(Gw(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${e} to be an Uint8Array with length [${r.join(", ")}]`;Gw(r.includes(t.length),n)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;Gw(t.length===r,n)}}function Qw(e){Gw("Boolean"===Xw(e),"Expected compressed to be a Boolean")}function Jw(e=(e=>new Uint8Array(e)),t){return"function"==typeof e&&(e=e(t)),Zw("output",e,t),e}function Xw(e){return Object.prototype.toString.call(e).slice(8,-1)}const $w=new Fp.ec("secp256k1"),e_=$w.curve,t_=e_.n.constructor;function r_(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let r=new t_(t);if(r.cmp(e_.p)>=0)return null;r=r.toRed(e_.red);let n=r.redSqr().redIMul(r).redIAdd(e_.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),$w.keyPair({pub:{x:r,y:n}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){let n=new t_(t),i=new t_(r);if(n.cmp(e_.p)>=0||i.cmp(e_.p)>=0)return null;if(n=n.toRed(e_.red),i=i.toRed(e_.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;const o=n.redSqr().redIMul(n);return i.redSqr().redISub(o.redIAdd(e_.b)).isZero()?$w.keyPair({pub:{x:n,y:i}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function n_(e,t){const r=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=r[t]}var i_={contextRandomize:()=>0,privateKeyVerify(e){const t=new t_(e);return t.cmp(e_.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new t_(e),r=e_.n.sub(t).umod(e_.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd(e,t){const r=new t_(t);if(r.cmp(e_.n)>=0)return 1;if(r.iadd(new t_(e)),r.cmp(e_.n)>=0&&r.isub(e_.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new t_(t);if(r.cmp(e_.n)>=0||r.isZero())return 1;r.imul(new t_(e)),r.cmp(e_.n)>=0&&(r=r.umod(e_.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:e=>null===r_(e)?1:0,publicKeyCreate(e,t){const r=new t_(t);return r.cmp(e_.n)>=0||r.isZero()?1:(n_(e,$w.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const r=r_(t);return null===r?1:(n_(e,r.getPublic()),0)},publicKeyNegate(e,t){const r=r_(t);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),n_(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let e=0;e<t.length;++e)if(r[e]=r_(t[e]),null===r[e])return 1;let n=r[0].getPublic();for(let e=1;e<r.length;++e)n=n.add(r[e].pub);return n.isInfinity()?2:(n_(e,n),0)},publicKeyTweakAdd(e,t,r){const n=r_(t);if(null===n)return 1;if((r=new t_(r)).cmp(e_.n)>=0)return 2;const i=n.getPublic().add(e_.g.mul(r));return i.isInfinity()?2:(n_(e,i),0)},publicKeyTweakMul(e,t,r){const n=r_(t);return null===n?1:(r=new t_(r)).cmp(e_.n)>=0||r.isZero()?2:(n_(e,n.getPublic().mul(r)),0)},signatureNormalize(e){const t=new t_(e.subarray(0,32)),r=new t_(e.subarray(32,64));return t.cmp(e_.n)>=0||r.cmp(e_.n)>=0?1:(1===r.cmp($w.nh)&&e.set(e_.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new t_(r).cmp(e_.n)>=0)return 1;if(new t_(n).cmp(e_.n)>=0)return 1;const{output:i}=e;let o=i.subarray(4,37);o[0]=0,o.set(r,1);let a=33,s=0;for(;a>1&&0===o[s]&&!(128&o[s+1]);--a,++s);if(o=o.subarray(s),128&o[0])return 1;if(a>1&&0===o[0]&&!(128&o[1]))return 1;let u=i.subarray(39,72);u[0]=0,u.set(n,1);let f=33,h=0;for(;f>1&&0===u[h]&&!(128&u[h+1]);--f,++h);return u=u.subarray(h),128&u[0]||f>1&&0===u[0]&&!(128&u[1])?1:(e.outputlen=6+a+f,i[0]=48,i[1]=e.outputlen-2,i[2]=2,i[3]=o.length,i.set(o,4),i[4+a]=2,i[5+a]=u.length,i.set(u,6+a),0)},signatureImport(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;const r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;const 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;let i=t.subarray(4,4+r);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;let o=t.subarray(6+r);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let a=new t_(i);a.cmp(e_.n)>=0&&(a=new t_(0));let s=new t_(t.subarray(6+r));return s.cmp(e_.n)>=0&&(s=new t_(0)),e.set(a.toArrayLike(Uint8Array,"be",32),0),e.set(s.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,i){if(i){const e=i;i=i=>{const o=e(t,r,null,n,i);if(!(o instanceof Uint8Array&&32===o.length))throw new Error("This is the way");return new t_(o)}}const o=new t_(r);if(o.cmp(e_.n)>=0||o.isZero())return 1;let a;try{a=$w.sign(t,r,{canonical:!0,k:i,pers:n})}catch(e){return 1}return e.signature.set(a.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(a.s.toArrayLike(Uint8Array,"be",32),32),e.recid=a.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},i=new t_(n.r),o=new t_(n.s);if(i.cmp(e_.n)>=0||o.cmp(e_.n)>=0)return 1;if(1===o.cmp($w.nh)||i.isZero()||o.isZero())return 3;const a=r_(r);if(null===a)return 2;const s=a.getPublic();return $w.verify(t,n,s)?0:3},ecdsaRecover(e,t,r,n){const i={r:t.slice(0,32),s:t.slice(32,64)},o=new t_(i.r),a=new t_(i.s);if(o.cmp(e_.n)>=0||a.cmp(e_.n)>=0)return 1;if(o.isZero()||a.isZero())return 2;let s;try{s=$w.recoverPubKey(n,i,r)}catch(e){return 2}return n_(e,s),0},ecdh(e,t,r,n,i,o,a){const s=r_(t);if(null===s)return 1;const u=new t_(r);if(u.cmp(e_.n)>=0||u.isZero())return 2;const f=s.getPublic().mul(u);if(void 0===i){const t=f.encode(null,!0),r=$w.hash().update(t).digest();for(let t=0;t<32;++t)e[t]=r[t]}else{o||(o=new Uint8Array(32));const t=f.getX().toArray("be",32);for(let e=0;e<32;++e)o[e]=t[e];a||(a=new Uint8Array(32));const r=f.getY().toArray("be",32);for(let e=0;e<32;++e)a[e]=r[e];const s=i(o,a,n);if(!(s instanceof Uint8Array&&s.length===e.length))return 2;e.set(s)}return 0}},o_=(e=>({contextRandomize(t){if(Gw(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&Zw("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:t=>(Zw("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(t){switch(Zw("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(Ww)}},privateKeyTweakAdd(t,r){switch(Zw("private key",t,32),Zw("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(zw)}},privateKeyTweakMul(t,r){switch(Zw("private key",t,32),Zw("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(Vw)}},publicKeyVerify:t=>(Zw("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,r=!0,n){switch(Zw("private key",t,32),Qw(r),n=Jw(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(Kw)}},publicKeyConvert(t,r=!0,n){switch(Zw("public key",t,[33,65]),Qw(r),n=Jw(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(Hw);case 2:throw new Error(Kw)}},publicKeyNegate(t,r=!0,n){switch(Zw("public key",t,[33,65]),Qw(r),n=Jw(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(Hw);case 2:throw new Error(Ww);case 3:throw new Error(Kw)}},publicKeyCombine(t,r=!0,n){Gw(Array.isArray(t),"Expected public keys to be an Array"),Gw(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)Zw("public key",e,[33,65]);switch(Qw(r),n=Jw(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(Hw);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(Kw)}},publicKeyTweakAdd(t,r,n=!0,i){switch(Zw("public key",t,[33,65]),Zw("tweak",r,32),Qw(n),i=Jw(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(Hw);case 2:throw new Error(zw)}},publicKeyTweakMul(t,r,n=!0,i){switch(Zw("public key",t,[33,65]),Zw("tweak",r,32),Qw(n),i=Jw(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(Hw);case 2:throw new Error(Vw)}},signatureNormalize(t){switch(Zw("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(Yw)}},signatureExport(t,r){Zw("signature",t,64);const n={output:r=Jw(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(Yw);case 2:throw new Error(Ww)}},signatureImport(t,r){switch(Zw("signature",t),r=Jw(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(Yw);case 2:throw new Error(Ww)}},ecdsaSign(t,r,n={},i){Zw("message",t,32),Zw("private key",r,32),Gw("Object"===Xw(n),"Expected options to be an Object"),void 0!==n.data&&Zw("options.data",n.data),void 0!==n.noncefn&&Gw("Function"===Xw(n.noncefn),"Expected options.noncefn to be a Function");const o={signature:i=Jw(i,64),recid:null};switch(e.ecdsaSign(o,t,r,n.data,n.noncefn)){case 0:return o;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(Ww)}},ecdsaVerify(t,r,n){switch(Zw("signature",t,64),Zw("message",r,32),Zw("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(Yw);case 2:throw new Error(Hw)}},ecdsaRecover(t,r,n,i=!0,o){switch(Zw("signature",t,64),Gw("Number"===Xw(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Zw("message",n,32),Qw(i),o=Jw(o,i?33:65),e.ecdsaRecover(o,t,r,n)){case 0:return o;case 1:throw new Error(Yw);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(Ww)}},ecdh(t,r,n={},i){switch(Zw("public key",t,[33,65]),Zw("private key",r,32),Gw("Object"===Xw(n),"Expected options to be an Object"),void 0!==n.data&&Zw("options.data",n.data),void 0!==n.hashfn?(Gw("Function"===Xw(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&Zw("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&Zw("options.ybuf",n.ybuf,32),Zw("output",i)):i=Jw(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(Hw);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}))(i_),a_={},s_={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SECRET_KEY_LENGTH=e.AES_IV_PLUS_TAG_LENGTH=e.AES_TAG_LENGTH=e.AES_IV_LENGTH=e.UNCOMPRESSED_PUBLIC_KEY_SIZE=void 0,e.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,e.AES_IV_LENGTH=16,e.AES_TAG_LENGTH=16,e.AES_IV_PLUS_TAG_LENGTH=e.AES_IV_LENGTH+e.AES_TAG_LENGTH,e.SECRET_KEY_LENGTH=32}(s_);var u_=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0}),a_.aesDecrypt=a_.aesEncrypt=a_.getValidSecret=a_.decodeHex=a_.remove0x=void 0;var f_=un,h_=u_(o_),c_=s_;function l_(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}a_.remove0x=l_,a_.decodeHex=function(e){return Lt.from(l_(e),"hex")},a_.getValidSecret=function(){var e;do{e=(0,f_.randomBytes)(c_.SECRET_KEY_LENGTH)}while(!h_.default.privateKeyVerify(e));return e},a_.aesEncrypt=function(e,t){var r=(0,f_.randomBytes)(c_.AES_IV_LENGTH),n=(0,f_.createCipheriv)("aes-256-gcm",e,r),i=Lt.concat([n.update(t),n.final()]),o=n.getAuthTag();return Lt.concat([r,o,i])},a_.aesDecrypt=function(e,t){var r=t.slice(0,c_.AES_IV_LENGTH),n=t.slice(c_.AES_IV_LENGTH,c_.AES_IV_PLUS_TAG_LENGTH),i=t.slice(c_.AES_IV_PLUS_TAG_LENGTH),o=(0,f_.createDecipheriv)("aes-256-gcm",e,r);return o.setAuthTag(n),Lt.concat([o.update(i),o.final()])};var d_={},p_=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d_,"__esModule",{value:!0});var g_=p_(qw),b_=p_(o_),y_=a_,m_=s_,v_=function(){function e(e){this.uncompressed=Lt.from(b_.default.publicKeyConvert(e,!1)),this.compressed=Lt.from(b_.default.publicKeyConvert(e,!0))}return e.fromHex=function(t){var r=(0,y_.decodeHex)(t);if(r.length===m_.UNCOMPRESSED_PUBLIC_KEY_SIZE-1){var n=Lt.from([4]);return new e(Lt.concat([n,r]))}return new e(r)},e.prototype.toHex=function(e){return void 0===e&&(e=!0),e?this.compressed.toString("hex"):this.uncompressed.toString("hex")},e.prototype.decapsulate=function(e){var t=Lt.concat([this.uncompressed,e.multiply(this)]);return(0,g_.default)(t,32,{hash:"SHA-256"})},e.prototype.equals=function(e){return this.uncompressed.equals(e.uncompressed)},e}();d_.default=v_;var A_=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sn,"__esModule",{value:!0});var w_=A_(qw),__=A_(o_),M_=a_,S_=A_(d_),E_=function(){function e(e){if(this.secret=e||(0,M_.getValidSecret)(),!__.default.privateKeyVerify(this.secret))throw new Error("Invalid private key");this.publicKey=new S_.default(Lt.from(__.default.publicKeyCreate(this.secret)))}return e.fromHex=function(t){return new e((0,M_.decodeHex)(t))},e.prototype.toHex=function(){return"0x".concat(this.secret.toString("hex"))},e.prototype.encapsulate=function(e){var t=Lt.concat([this.publicKey.uncompressed,this.multiply(e)]);return(0,w_.default)(t,32,{hash:"SHA-256"})},e.prototype.multiply=function(e){return Lt.from(__.default.publicKeyTweakMul(e.compressed,this.secret,!1))},e.prototype.equals=function(e){return this.secret.equals(e.secret)},e}();sn.default=E_,function(e){var t=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.PrivateKey=void 0;var r=sn;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return t(r).default}});var n=d_;Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return t(n).default}})}(an),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.PublicKey=e.PrivateKey=e.decrypt=e.encrypt=void 0;var t=an,r=a_,n=s_;e.encrypt=function(e,n){var i=new t.PrivateKey,o=e instanceof Lt?new t.PublicKey(e):t.PublicKey.fromHex(e),a=i.encapsulate(o),s=(0,r.aesEncrypt)(a,n);return Lt.concat([i.publicKey.uncompressed,s])},e.decrypt=function(e,i){var o=e instanceof Lt?new t.PrivateKey(e):t.PrivateKey.fromHex(e),a=new t.PublicKey(i.slice(0,n.UNCOMPRESSED_PUBLIC_KEY_SIZE)),s=i.slice(n.UNCOMPRESSED_PUBLIC_KEY_SIZE),u=a.decapsulate(o);return(0,r.aesDecrypt)(u,s)};var i=an;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return i.PrivateKey}}),Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return i.PublicKey}}),e.utils={aesDecrypt:r.aesDecrypt,aesEncrypt:r.aesEncrypt,decodeHex:r.decodeHex,getValidSecret:r.getValidSecret,remove0x:r.remove0x}}(on);var k_,C_=function(){function e(){this.ecies=null}return e.prototype.generateECIES=function(){this.ecies=new on.PrivateKey},e.prototype.getPublicKey=function(){return this.ecies.publicKey.toHex()},e.prototype.encrypt=function(e,t){var r=on.encrypt(t,Yr.Buffer.from(e));return Yr.Buffer.from(r).toString("base64")},e.prototype.decrypt=function(e){var t=Yr.Buffer.from(e,"base64");try{return on.decrypt(this.ecies.toHex(),t).toString()}catch(e){return e.message}},e}();!function(e){e.NONE="none",e.SYN="key_handshake_SYN",e.SYNACK="key_handshake_SYNACK",e.ACK="key_handshake_ACK"}(k_||(k_={}));var R_,x_=function(e){function t(t){var r=t.CommLayer,n=t.otherPublicKey,i=t.sendPublicKey,o=e.call(this)||this;return o.keysExchanged=!1,o.myECIES=null,o.otherPublicKey="",o.step=k_.NONE,o.myECIES=new C_,o.myECIES.generateECIES(),o.CommLayer=r,o.myPublicKey=o.myECIES.getPublicKey(),n&&o.onOtherPublicKey(n),o.sendPublicKey=i,o.CommLayer.on("key_exchange",(function(e){var t=e.message;o.keysExchanged||(t.type===k_.SYN?(o.checkStep(k_.NONE),o.step=k_.ACK,o.sendPublicKey&&t.pubkey&&!o.otherPublicKey&&o.onOtherPublicKey(t.pubkey),o.CommLayer.sendMessage({type:k_.SYNACK,pubkey:o.myPublicKey})):t.type===k_.SYNACK?(o.checkStep(k_.SYNACK),o.onOtherPublicKey(t.pubkey),o.CommLayer.sendMessage({type:k_.ACK}),o.keysExchanged=!0,o.emit("keys_exchanged")):t.type===k_.ACK&&(o.checkStep(k_.ACK),o.keysExchanged=!0,o.emit("keys_exchanged")))})),o}return r(t,e),t.prototype.clean=function(){this.step=k_.NONE,this.keysExchanged=!1,this.otherPublicKey=""},t.prototype.start=function(e){e&&this.clean(),this.checkStep(k_.NONE),this.step=k_.SYNACK,this.CommLayer.sendMessage({type:k_.SYN,pubkey:this.sendPublicKey?this.myPublicKey:void 0})},t.prototype.checkStep=function(e){if(this.step!==e)throw new Error("Wrong Step ".concat(this.step," ").concat(e))},t.prototype.onOtherPublicKey=function(e){this.otherPublicKey=e},t.prototype.encryptMessage=function(e){if(!this.otherPublicKey)throw new Error("Keys not exchanged");return this.myECIES.encrypt(e,this.otherPublicKey)},t.prototype.decryptMessage=function(e){if(!this.otherPublicKey)throw new Error("Keys not exchanged");return this.myECIES.decrypt(e)},t}(L.exports.EventEmitter2),O_=function(e){function t(t){var r=t.otherPublicKey,n=t.reconnect,i=t.commLayer,o=t.transports,a=e.call(this)||this;a.socket=null,a.clientsConnected=!1,a.clientsReady=!1,a.channelId=null,a.manualDisconnect=!1,a.reconnect=n,a.commLayer=i;var s={autoConnect:!1};o&&(s.transports=o),a.socket=Kr("https://socket.codefi.network/",s);var u=function(){window.removeEventListener("focus",u),a.reconnect=!0,a.socket.connect(),a.socket.emit("join_channel",a.channelId)},f=function(){"undefined"!=typeof window&&(a.socket.disconnect(),document.hasFocus()?u():window.addEventListener("focus",u))};a.socket.on("error",(function(){f()})),a.socket.on("disconnect",(function(){f()}));var h={CommLayer:a,otherPublicKey:r,sendPublicKey:!1};return a.keyExchange=new x_(h),a.keyExchange.on("keys_exchanged",(function(){a.emit("clients_ready",{isOriginator:a.isOriginator})})),a}return r(t,e),t.prototype.receiveMessages=function(e){var t=this;this.socket.on("clients_connected-".concat(e),(function(e){t.channelId=e,t.clientsConnected=!0,t.isOriginator&&(t.keyExchange.keysExchanged||t.keyExchange.start(t.isOriginator)),t.reconnect&&(t.keyExchange.keysExchanged?(t.sendMessage({type:"ready"}),t.commLayer===R_.WEBRTC&&t.emit("clients_ready",{isOriginator:t.isOriginator})):t.isOriginator||t.sendMessage({type:"key_handshake_start"}),t.reconnect=!1)})),this.socket.on("channel_created-".concat(e),(function(e){t.emit("channel_created",e)})),this.socket.on("clients_disconnected-".concat(e),(function(){t.clientsConnected=!1,t.emit("clients_disconnected")})),this.socket.on("message-".concat(e),(function(e){var r=e.id,n=e.message,i=e.error;if(i)throw new Error(i);if(t.checkSameId(r),t.isOriginator&&t.keyExchange.keysExchanged&&"key_handshake_start"===(null==n?void 0:n.type))return t.keyExchange.start(t.isOriginator);if(!t.keyExchange.keysExchanged){var o=n;if(null==o?void 0:o.type.startsWith("key_handshake"))return t.emit("key_exchange",{message:o});throw new Error("Keys not exchanged")}var a=t.keyExchange.decryptMessage(n),s=JSON.parse(a);return t.emit("message",{message:s})})),this.socket.on("clients_waiting_to_join-".concat(e),(function(e){t.emit("clients_waiting_to_join",e)}))},t.prototype.checkSameId=function(e){if(e!==this.channelId)throw new Error("Wrong id")},t.prototype.send=function(e,t){this.socket.emit(e,t)},t.prototype.sendMessage=function(e){if(!this.channelId)throw new Error("Create a channel first");if(!this.keyExchange.keysExchanged){if(null==e?void 0:e.type.startsWith("key_handshake"))return this.socket.emit("message",{id:this.channelId,message:e});throw new Error("Keys not exchanged")}var t=this.keyExchange.encryptMessage(JSON.stringify(e));return this.socket.emit("message",{id:this.channelId,message:t})},t.prototype.connectToChannel=function(e){this.socket.connect(),this.channelId=e,this.receiveMessages(this.channelId),this.socket.emit("join_channel",e)},t.prototype.createChannel=function(){this.socket.connect(),this.isOriginator=!0;var e=j.v4();return this.receiveMessages(e),this.socket.emit("join_channel",e),{channelId:e,pubKey:this.keyExchange.myPublicKey}},t.prototype.pause=function(){this.manualDisconnect=!0,this.keyExchange.keysExchanged&&this.sendMessage({type:"pause"}),this.socket.disconnect()},t.prototype.resume=function(){this.manualDisconnect=!1,this.keyExchange.keysExchanged&&(this.reconnect=!0,this.socket.connect(),this.socket.emit("join_channel",this.channelId))},t.prototype.disconnect=function(){this.socket.disconnect()},t}(L.exports.EventEmitter2),P_=function(e){function t(t){var r=t.otherPublicKey,o=t.webRTCLib,a=t.commLayer,s=t.reconnect,u=t.transports,f=e.call(this)||this;f.handshakeDone=!1,f.isOriginator=!1,f.clientsConnected=!1,f.clientsReady=!1,f.socket=null,f.webrtc=null,f.dataChannel=null,f.reconnect=s,o?(f.RTCPeerConnection=o.RTCPeerConnection,f.RTCSessionDescription=o.RTCSessionDescription,f.RTCIceCandidate=o.RTCIceCandidate):(f.RTCPeerConnection=RTCPeerConnection,f.RTCSessionDescription=RTCSessionDescription,f.RTCIceCandidate=RTCIceCandidate),f.socket=new O_({otherPublicKey:r,commLayer:a,reconnect:s,transports:u});var h={CommLayer:f,otherPublicKey:null,sendPublicKey:!0};return f.keyExchange=new x_(h),f.keyExchange.on("keys_exchanged",(function(){f.clientsReady=!0,f.emit("clients_ready",{isOriginator:f.isOriginator})})),f.socket.on("clients_disconnected",(function(){return f.clientsConnected?f.clientsConnected:(f.socket.removeAllListeners(),f.emit("clients_disconnected"))})),f.socket.on("message",(function(e){var t=e.message;return n(f,void 0,void 0,(function(){var e,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:return e=t.offer,r=t.answer,n=t.candidate,"offer"!==(o=t.type)?[3,4]:[4,this.webrtc.setRemoteDescription(new this.RTCSessionDescription(e))];case 1:return i.sent(),[4,this.webrtc.createAnswer()];case 2:return a=i.sent(),[4,this.webrtc.setLocalDescription(a)];case 3:return i.sent(),this.socket.sendMessage({type:"answer",answer:a}),[3,7];case 4:return"answer"!==o?[3,6]:[4,this.webrtc.setRemoteDescription(new this.RTCSessionDescription(r))];case 5:return i.sent(),this.handshakeDone=!0,[3,7];case 6:"candidate"===o&&this.webrtc.addIceCandidate(new this.RTCIceCandidate(n)),i.label=7;case 7:return[2]}}))}))})),f.socket.on("clients_ready",(function(e){var t=e.isOriginator;return n(f,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return this.setupWebrtc(),t?[4,this.webrtc.createOffer()]:[2];case 1:return e=r.sent(),[4,this.webrtc.setLocalDescription(e)];case 2:return r.sent(),this.isOriginator=t,this.socket.sendMessage({type:"offer",offer:e}),[2]}}))}))})),f.socket.on("channel_created",(function(e){f.emit("channel_created",e)})),f.socket.on("clients_waiting_to_join",(function(e){f.emit("clients_waiting_to_join",e)})),f}return r(t,e),t.prototype.setupWebrtc=function(){var e=this;this.webrtc=new this.RTCPeerConnection({iceServers:[{urls:"stun:15.237.115.65"}]}),this.webrtc.ondatachannel=function(t){console.log("Data channel is created!");var r=t.channel;r.onopen=function(){console.log("Data channel is open and ready to be used."),e.clientsConnected=!0,e.isOriginator&&(e.keyExchange.keysExchanged||e.keyExchange.start(e.isOriginator)),e.reconnect&&(e.keyExchange.keysExchanged?(e.sendMessage({type:"ready"}),e.emit("clients_ready",{isOriginator:e.isOriginator})):e.isOriginator||e.sendMessage({type:"key_handshake_start"}),e.reconnect=!1)},e.onMessage=e.onMessage.bind(e),r.onmessage=e.onMessage},this.webrtc.onconnectionstatechange=function(){var t=e.webrtc.connectionState;return console.log("connectionStatus",t),["disconnected","failed","closed"].includes(t)?e.emit("clients_disconnected"):t},this.webrtc.onicecandidate=function(t){var r=t.candidate;r&&e.socket.sendMessage({type:"candidate",candidate:r})},this.webrtc.onicecandidateerror=function(e){return console.log("ICE ERROR",e)},this.dataChannel=this.webrtc.createDataChannel("messenger"),this.dataChannel.onerror=function(t){return 0===t.error.code?e.emit("clients_disconnected"):(console.log("ERROR: datachannel",t),t)}},t.prototype.connectToChannel=function(e){this.socket.connectToChannel(e)},t.prototype.onMessage=function(e){if(!this.keyExchange.keysExchanged){var t=JSON.parse(e.data);if(null==t?void 0:t.type.startsWith("key_handshake"))return this.emit("key_exchange",{message:t});throw new Error("Keys not exchanged")}var r=this.keyExchange.decryptMessage(e.data),n=JSON.parse(r);return this.emit("message",{message:n})},t.prototype.sendMessage=function(e){if(!this.clientsConnected)throw new Error("Clients not connected");if(!this.keyExchange.keysExchanged){if(null==e?void 0:e.type.startsWith("key_handshake"))return this.dataChannel.send(JSON.stringify(e));throw new Error("Keys not exchanged")}var t=this.keyExchange.encryptMessage(JSON.stringify(e));return this.dataChannel.send(t)},t.prototype.createChannel=function(){return this.socket.createChannel()},t.prototype.pause=function(){var e;this.keyExchange.keysExchanged&&this.sendMessage({type:"pause"}),null===(e=this.webrtc)||void 0===e||e.close(),this.socket.pause()},t.prototype.resume=function(){this.reconnect=!0,this.socket.resume()},t.prototype.disconnect=function(){var e;this.socket.disconnect(),null===(e=this.webrtc)||void 0===e||e.close()},t}(L.exports.EventEmitter2);!function(e){e.WEBRTC="webrtc",e.SOCKET="socket",e.WALLETCONNECT="wc"}(R_||(R_={}));var B_=function(e){function t(t){var r=t.platform,n=t.commLayer,i=void 0===n?"socket":n,o=t.otherPublicKey,a=t.webRTCLib,s=t.reconnect,u=t.dappMetadata,f=t.transports,h=e.call(this)||this;h.commLayer=null,h.channelId=null,h.connected=!1;var c=i===R_.WEBRTC?P_:O_;return h.CommLayer=c,h.otherPublicKey=o,h.webRTCLib=a,h.dappMetadata=u,h.transports=f,h.platform=r,h.setupCommLayer({CommLayer:c,otherPublicKey:o,webRTCLib:a,commLayer:i,reconnect:s}),h}return r(t,e),t.prototype.setupCommLayer=function(e){var t=this,r=e.CommLayer,n=e.otherPublicKey,i=e.webRTCLib,o=e.commLayer,a=e.reconnect;this.commLayer=new r({otherPublicKey:n,webRTCLib:i,commLayer:o,reconnect:a,transports:this.transports}),this.commLayer.on("message",(function(e){var r=e.message;t.onMessageCommLayer(r)})),this.commLayer.on("clients_ready",(function(e){var r,n,i=e.isOriginator;if(t.isOriginator=i,i){var o="undefined"!=typeof document&&document.URL||"url undefined",a="undefined"!=typeof document&&document.title||"title undefined";(null===(r=t.dappMetadata)||void 0===r?void 0:r.url)&&(o=t.dappMetadata.url),(null===(n=t.dappMetadata)||void 0===n?void 0:n.name)&&(a=t.dappMetadata.name),t.commLayer.sendMessage({type:"originator_info",originatorInfo:{url:o,title:a,platform:t.platform}})}})),this.commLayer.on("clients_disconnected",(function(){t.paused||(t.isOriginator?(t.clean(),t.commLayer.removeAllListeners(),t.setupCommLayer({CommLayer:r,otherPublicKey:n,webRTCLib:i,commLayer:t.commLayer,reconnect:!1}),t.emit("clients_disconnected")):t.paused=!0)})),this.commLayer.on("channel_created",(function(e){t.emit("channel_created",e)})),this.commLayer.on("clients_waiting_to_join",(function(e){t.emit("clients_waiting_to_join",e)}))},t.prototype.clean=function(){this.channelId=null,this.connected=!1},t.prototype.connectToChannel=function(e){if(!j.validate(e))throw new Error("Invalid channel");this.commLayer.connectToChannel(e)},t.prototype.sendMessage=function(e){var t=this;this.paused?this.once("clients_ready",(function(){t.commLayer.sendMessage(e)})):this.commLayer.sendMessage(e)},t.prototype.onMessageCommLayer=function(e){return"originator_info"===e.type?(this.commLayer.sendMessage({type:"wallet_info",walletInfo:{type:"MetaMask",version:"MetaMask/Mobile"}}),this.originatorInfo=e.originatorInfo,this.connected=!0,this.emit("clients_ready",{isOriginator:this.isOriginator,originatorInfo:e.originatorInfo}),void(this.paused=!1)):"wallet_info"===e.type?(this.walletInfo=e.walletInfo,this.connected=!0,this.emit("clients_ready",{isOriginator:this.isOriginator,walletInfo:e.walletInfo}),void(this.paused=!1)):("pause"===e.type?this.paused=!0:"ready"===e.type&&(this.paused=!1,this.emit("clients_ready",{isOriginator:this.isOriginator,walletInfo:this.walletInfo})),void this.emit("message",{message:e}))},t.prototype.generateChannelId=function(){if(this.connected)throw new Error("Channel already created");this.clean();var e=this.commLayer.createChannel(),t=e.channelId,r=e.pubKey;return this.channelId=t,{channelId:t,pubKey:r}},t.prototype.pause=function(){this.commLayer.pause()},t.prototype.resume=function(){this.commLayer.resume()},t.prototype.disconnect=function(){this.commLayer.disconnect()},t}(L.exports.EventEmitter2);var I_=function(){return!Boolean(null===window||void 0===window?void 0:window.ethereum)&&(!(t=window.document.doctype)||"html"===t.name)&&function(){for(var e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname,r=0;r<e.length;r++)if(e[r].test(t))return!1;return!0}()&&(!(e=document.documentElement.nodeName)||"html"===e.toLowerCase())&&!function(){for(var e=["uscourts.gov","dropbox.com","webbyawards.com","cdn.shopify.com/s/javascripts/tricorder/xtld-read-only-frame.html","adyen.com","gravityforms.com","harbourair.com","ani.gamer.com.tw","blueskybooking.com","sharefile.com"],t=window.location.href,r=0;r<e.length;r++){var n=e[r].replace(".","\\.");if(!new RegExp("(?:https?:\\/\\/)(?:(?!".concat(n,").)*$"),"u").test(t))return!0}return!1}();var e,t},L_=function(e,t){return L_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},L_(e,t)};function j_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}L_(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var T_,D_=function(){return D_=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},D_.apply(this,arguments)};function N_(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function U_(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=a.trys,(i=i.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(e){o=[6,e],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])}}}!function(e){e.INPAGE="metamask-inpage",e.CONTENT_SCRIPT="metamask-contentscript",e.PROVIDER="metamask-provider"}(T_||(T_={}));var F_={eth_requestAccounts:!0,eth_sendTransaction:!0,eth_signTransaction:!0,eth_sign:!0,personal_sign:!0,eth_signTypedData:!0,eth_signTypedData_v3:!0,eth_signTypedData_v4:!0,wallet_watchAsset:!0,wallet_addEthereumChain:!0,wallet_switchEthereumChain:!0},q_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function W_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function z_(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var V_={exports:{}};V_.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function a(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 s=function(){function e(){}var t,r,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(r=null)&&a(t.prototype,r),n&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,r){t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),a=u(r(95)),s=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var f=this.satisfies(r[u]);if(void 0!==f)return f}var h=s.default.find(a,(function(e){return t.isPlatform(e)}));if(h){var c=this.satisfies(r[h]);if(void 0!==c)return c}}if(o>0){var l=Object.keys(i),d=s.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=f,e.exports=t.default},92:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}});var H_=W_(V_.exports),K_={},Y_={},G_={},Z_={},Q_=rM;rM.default=rM,rM.stable=aM,rM.stableStringify=aM;var J_="[...]",X_="[Circular]",$_=[],eM=[];function tM(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function rM(e,t,r,n){var i;void 0===n&&(n=tM()),iM(e,"",0,[],void 0,0,n);try{i=0===eM.length?JSON.stringify(e,t,r):JSON.stringify(e,uM(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==$_.length;){var o=$_.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function nM(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);void 0!==i.get?i.configurable?(Object.defineProperty(n,r,{value:e}),$_.push([n,r,t,i])):eM.push([t,r,e]):(n[r]=e,$_.push([n,r,t]))}function iM(e,t,r,n,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<n.length;s++)if(n[s]===e)return void nM(X_,e,t,i);if(void 0!==a.depthLimit&&o>a.depthLimit)return void nM(J_,e,t,i);if(void 0!==a.edgesLimit&&r+1>a.edgesLimit)return void nM(J_,e,t,i);if(n.push(e),Array.isArray(e))for(s=0;s<e.length;s++)iM(e[s],s,s,n,e,o,a);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var f=u[s];iM(e[f],f,s,n,e,o,a)}}n.pop()}}function oM(e,t){return e<t?-1:e>t?1:0}function aM(e,t,r,n){void 0===n&&(n=tM());var i,o=sM(e,"",0,[],void 0,0,n)||e;try{i=0===eM.length?JSON.stringify(o,t,r):JSON.stringify(o,uM(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==$_.length;){var a=$_.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return i}function sM(e,t,r,n,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<n.length;s++)if(n[s]===e)return void nM(X_,e,t,i);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&o>a.depthLimit)return void nM(J_,e,t,i);if(void 0!==a.edgesLimit&&r+1>a.edgesLimit)return void nM(J_,e,t,i);if(n.push(e),Array.isArray(e))for(s=0;s<e.length;s++)sM(e[s],s,s,n,e,o,a);else{var u={},f=Object.keys(e).sort(oM);for(s=0;s<f.length;s++){var h=f[s];sM(e[h],h,s,n,e,o,a),u[h]=e[h]}if(void 0===i)return u;$_.push([i,t,e]),i[t]=u}n.pop()}}function uM(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(eM.length>0)for(var n=0;n<eM.length;n++){var i=eM[n];if(i[1]===t&&i[0]===r){r=i[2],eM.splice(n,1);break}}return e.call(this,t,r)}}Object.defineProperty(Z_,"__esModule",{value:!0}),Z_.EthereumProviderError=Z_.EthereumRpcError=void 0;const fM=Q_;class hM extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return fM.default(this.serialize(),cM,2)}}Z_.EthereumRpcError=hM;function cM(e,t){if("[Circular]"!==t)return t}Z_.EthereumProviderError=class extends hM{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}};var lM={},dM={};Object.defineProperty(dM,"__esModule",{value:!0}),dM.errorValues=dM.errorCodes=void 0,dM.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},dM.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=dM,r=Z_,n=t.errorCodes.rpc.internal,i={code:n,message:o(n)};function o(r,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(r)){const n=r.toString();if(f(t.errorValues,n))return t.errorValues[n].message;if(s(r))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function a(e){if(!Number.isInteger(e))return!1;const r=e.toString();return!!t.errorValues[r]||!!s(e)}function s(e){return e>=-32099&&e<=-32e3}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=o,e.isValidCode=a,e.serializeError=function(e,{fallbackError:t=i,shouldIncludeStack:n=!1}={}){var s,h;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof r.EthereumRpcError)return e.serialize();const c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&a(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,f(t,"data")&&(c.data=t.data)):(c.message=o(c.code),c.data={originalError:u(e)})}else{c.code=t.code;const r=null===(s=e)||void 0===s?void 0:s.message;c.message=r&&"string"==typeof r?r:t.message,c.data={originalError:u(e)}}const l=null===(h=e)||void 0===h?void 0:h.stack;return n&&e&&l&&"string"==typeof l&&(c.stack=l),c}}(lM);var pM={};Object.defineProperty(pM,"__esModule",{value:!0}),pM.ethErrors=void 0;const gM=Z_,bM=lM,yM=dM;function mM(e,t){const[r,n]=AM(t);return new gM.EthereumRpcError(e,r||bM.getMessageFromCode(e),n)}function vM(e,t){const[r,n]=AM(t);return new gM.EthereumProviderError(e,r||bM.getMessageFromCode(e),n)}function AM(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}pM.ethErrors={rpc:{parse:e=>mM(yM.errorCodes.rpc.parse,e),invalidRequest:e=>mM(yM.errorCodes.rpc.invalidRequest,e),invalidParams:e=>mM(yM.errorCodes.rpc.invalidParams,e),methodNotFound:e=>mM(yM.errorCodes.rpc.methodNotFound,e),internal:e=>mM(yM.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return mM(t,e)},invalidInput:e=>mM(yM.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>mM(yM.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>mM(yM.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>mM(yM.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>mM(yM.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>mM(yM.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>vM(yM.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>vM(yM.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>vM(yM.errorCodes.provider.unsupportedMethod,e),disconnected:e=>vM(yM.errorCodes.provider.disconnected,e),chainDisconnected:e=>vM(yM.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new gM.EthereumProviderError(t,r,n)}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Z_;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=lM;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=pM;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=dM;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(G_);var wM={},_M={};Object.defineProperty(_M,"__esModule",{value:!0});const MM={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};_M.default=MM;var SM={};Object.defineProperty(SM,"__esModule",{value:!0}),SM.EMITTED_NOTIFICATIONS=SM.NOOP=SM.logStreamDisconnectWarning=SM.getRpcPromiseCallback=SM.createErrorMiddleware=void 0;const EM=G_;SM.createErrorMiddleware=function(e){return(t,r,n)=>{"string"==typeof t.method&&t.method||(r.error=EM.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:t})),n((t=>{const{error:n}=r;return n?(e.error(`MetaMask - RPC Error: ${n.message}`,n),t()):t()}))}};SM.getRpcPromiseCallback=(e,t,r=!0)=>(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)},SM.logStreamDisconnectWarning=function(e,t,r,n){let i=`MetaMask: Lost connection to "${t}".`;(null==r?void 0:r.stack)&&(i+=`\n${r.stack}`),e.warn(i),n&&n.listenerCount("error")>0&&n.emit("error",i)};SM.NOOP=()=>{},SM.EMITTED_NOTIFICATIONS=["eth_subscription"];var kM=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wM,"__esModule",{value:!0});const CM=kM(_M),RM=SM;function xM(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function OM(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of r)if(e&&await PM(e.href))return e.href;return null}function PM(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}wM.default=async function(e,t){try{const t=await async function(){return{name:xM(window),icon:await OM(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},RM.NOOP)}catch(e){t.error({message:CM.default.errors.sendSiteMetadata(),originalError:e})}};var BM={};function IM(){throw new Error("setTimeout has not been defined")}function LM(){throw new Error("clearTimeout has not been defined")}var jM=IM,TM=LM;function DM(e){if(jM===setTimeout)return setTimeout(e,0);if((jM===IM||!jM)&&setTimeout)return jM=setTimeout,setTimeout(e,0);try{return jM(e,0)}catch(t){try{return jM.call(null,e,0)}catch(t){return jM.call(this,e,0)}}}"function"==typeof e.setTimeout&&(jM=setTimeout),"function"==typeof e.clearTimeout&&(TM=clearTimeout);var NM,UM=[],FM=!1,qM=-1;function WM(){FM&&NM&&(FM=!1,NM.length?UM=NM.concat(UM):qM=-1,UM.length&&zM())}function zM(){if(!FM){var e=DM(WM);FM=!0;for(var t=UM.length;t;){for(NM=UM,UM=[];++qM<t;)NM&&NM[qM].run();qM=-1,t=UM.length}NM=null,FM=!1,function(e){if(TM===clearTimeout)return clearTimeout(e);if((TM===LM||!TM)&&clearTimeout)return TM=clearTimeout,clearTimeout(e);try{TM(e)}catch(t){try{return TM.call(null,e)}catch(t){return TM.call(this,e)}}}(e)}}function VM(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];UM.push(new HM(e,t)),1!==UM.length||FM||DM(zM)}function HM(e,t){this.fun=e,this.array=t}HM.prototype.run=function(){this.fun.apply(null,this.array)};function KM(){}var YM=KM,GM=KM,ZM=KM,QM=KM,JM=KM,XM=KM,$M=KM;var eS=e.performance||{},tS=eS.now||eS.mozNow||eS.msNow||eS.oNow||eS.webkitNow||function(){return(new Date).getTime()};var rS=new Date;var nS={nextTick:VM,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:YM,addListener:GM,once:ZM,off:QM,removeListener:JM,removeAllListeners:XM,emit:$M,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*tS.call(eS),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-rS)/1e3}},iS={exports:{}},oS=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}};var aS=oS;function sS(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function uS(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}iS.exports=aS(sS),iS.exports.strict=aS(uS),sS.proto=sS((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return sS(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return uS(this)},configurable:!0})}));var fS=iS.exports,hS=function(){},cS=function(e,t,r){if("function"==typeof t)return cS(e,null,t);t||(t={}),r=fS(r||hS);var n=e._writableState,i=e._readableState,o=t.readable||!1!==t.readable&&e.readable,a=t.writable||!1!==t.writable&&e.writable,s=!1,u=function(){e.writable||f()},f=function(){a=!1,o||r.call(e)},h=function(){o=!1,a||r.call(e)},c=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},l=function(t){r.call(e,t)},d=function(){VM(p)},p=function(){if(!s)return(!o||i&&i.ended&&!i.destroyed)&&(!a||n&&n.ended&&!n.destroyed)?void 0:r.call(e,new Error("premature close"))},g=function(){e.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?a&&!n&&(e.on("end",u),e.on("close",u)):(e.on("complete",f),e.on("abort",d),e.req?g():e.on("request",g)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",c),e.on("end",h),e.on("finish",f),!1!==t.error&&e.on("error",l),e.on("close",d),function(){s=!0,e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("exit",c),e.removeListener("end",h),e.removeListener("error",l),e.removeListener("close",d)}},lS=cS,dS=z_(Object.freeze({__proto__:null,default:{}})),pS=iS.exports,gS=lS,bS=dS,yS=function(){},mS=/^v?\.0/.test(nS.version),vS=function(e){return"function"==typeof e},AS=function(e,t,r,n){n=pS(n);var i=!1;e.on("close",(function(){i=!0})),gS(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return!!mS&&!!bS&&(e instanceof(bS.ReadStream||yS)||e instanceof(bS.WriteStream||yS))&&vS(e.close)}(e)?e.close(yS):function(e){return e.setHeader&&vS(e.abort)}(e)?e.abort():vS(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}},wS=function(e){e()},_S=function(e,t){return e.pipe(t)},MS=function(){var e,t=Array.prototype.slice.call(arguments),r=vS(t[t.length-1]||yS)&&t.pop()||yS;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(i,o){var a=o<t.length-1;return AS(i,a,o>0,(function(t){e||(e=t),t&&n.forEach(wS),a||(n.forEach(wS),r(e))}))}));return t.reduce(_S)},SS={},ES={},kS={};Object.defineProperty(kS,"__esModule",{value:!0}),kS.getUniqueId=void 0;const CS=4294967295;let RS=Math.floor(Math.random()*CS);kS.getUniqueId=function(){return RS=(RS+1)%CS,RS},Object.defineProperty(ES,"__esModule",{value:!0}),ES.createIdRemapMiddleware=void 0;const xS=kS;ES.createIdRemapMiddleware=function(){return(e,t,r,n)=>{const i=e.id,o=xS.getUniqueId();e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))}};var OS={};Object.defineProperty(OS,"__esModule",{value:!0}),OS.createAsyncMiddleware=void 0,OS.createAsyncMiddleware=function(e){return async(t,r,n,i)=>{let o;const a=new Promise((e=>{o=e}));let s=null,u=!1;const f=async()=>{u=!0,n((e=>{s=e,o()})),await a};try{await e(t,r,f),u?(await a,s(null)):i(null)}catch(e){s?s(e):i(e)}}};var PS={};Object.defineProperty(PS,"__esModule",{value:!0}),PS.createScaffoldMiddleware=void 0,PS.createScaffoldMiddleware=function(e){return(t,r,n,i)=>{const o=e[t.method];return void 0===o?n():"function"==typeof o?o(t,r,n,i):(r.result=o,i())}};var BS,IS={},LS={},jS={exports:{}};function TS(){if(BS)return jS.exports;BS=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}jS.exports=i,jS.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))}p(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&p(e,"error",t,r)}(e,i,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,u,f;if(a(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),u=o[t]),void 0===u)u=o[t]=r,++e._eventsCount;else if("function"==typeof u?u=o[t]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),(i=s(e))>0&&u.length>i&&!u.warned){u.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=u.length,f=h,console&&console.warn&&console.warn(f)}return e}function f(){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 h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function c(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):d(i,i.length)}function l(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 d(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function p(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)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(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},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){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=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var f=u.length,h=d(u,f);for(n=0;n<f;++n)r(h[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(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){s=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,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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},i.prototype.listeners=function(e){return c(this,e,!0)},i.prototype.rawListeners=function(e){return c(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},i.prototype.listenerCount=l,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},jS.exports}Object.defineProperty(LS,"__esModule",{value:!0});const DS=TS();function NS(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class US extends DS.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(void 0===i)return!1;if("function"==typeof i)NS(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)NS(r[n],this,t)}return!0}}LS.default=US;var FS={},qS={};Object.defineProperty(qS,"__esModule",{value:!0}),qS.EthereumProviderError=qS.EthereumRpcError=void 0;const WS=Q_;class zS extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return WS.default(this.serialize(),VS,2)}}qS.EthereumRpcError=zS;function VS(e,t){if("[Circular]"!==t)return t}qS.EthereumProviderError=class extends zS{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}};var HS={},KS={};Object.defineProperty(KS,"__esModule",{value:!0}),KS.errorValues=KS.errorCodes=void 0,KS.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},KS.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=KS,r=qS,n=t.errorCodes.rpc.internal,i={code:n,message:o(n)};function o(r,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(r)){const n=r.toString();if(f(t.errorValues,n))return t.errorValues[n].message;if(s(r))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function a(e){if(!Number.isInteger(e))return!1;const r=e.toString();return!!t.errorValues[r]||!!s(e)}function s(e){return e>=-32099&&e<=-32e3}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=o,e.isValidCode=a,e.serializeError=function(e,{fallbackError:t=i,shouldIncludeStack:n=!1}={}){var s,h;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof r.EthereumRpcError)return e.serialize();const c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&a(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,f(t,"data")&&(c.data=t.data)):(c.message=o(c.code),c.data={originalError:u(e)})}else{c.code=t.code;const r=null===(s=e)||void 0===s?void 0:s.message;c.message=r&&"string"==typeof r?r:t.message,c.data={originalError:u(e)}}const l=null===(h=e)||void 0===h?void 0:h.stack;return n&&e&&l&&"string"==typeof l&&(c.stack=l),c}}(HS);var YS={};Object.defineProperty(YS,"__esModule",{value:!0}),YS.ethErrors=void 0;const GS=qS,ZS=HS,QS=KS;function JS(e,t){const[r,n]=$S(t);return new GS.EthereumRpcError(e,r||ZS.getMessageFromCode(e),n)}function XS(e,t){const[r,n]=$S(t);return new GS.EthereumProviderError(e,r||ZS.getMessageFromCode(e),n)}function $S(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}YS.ethErrors={rpc:{parse:e=>JS(QS.errorCodes.rpc.parse,e),invalidRequest:e=>JS(QS.errorCodes.rpc.invalidRequest,e),invalidParams:e=>JS(QS.errorCodes.rpc.invalidParams,e),methodNotFound:e=>JS(QS.errorCodes.rpc.methodNotFound,e),internal:e=>JS(QS.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return JS(t,e)},invalidInput:e=>JS(QS.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>JS(QS.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>JS(QS.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>JS(QS.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>JS(QS.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>JS(QS.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>XS(QS.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>XS(QS.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>XS(QS.errorCodes.provider.unsupportedMethod,e),disconnected:e=>XS(QS.errorCodes.provider.disconnected,e),chainDisconnected:e=>XS(QS.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new GS.EthereumProviderError(t,r,n)}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=qS;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=HS;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=YS;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=KS;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(FS);var eE=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(IS,"__esModule",{value:!0}),IS.JsonRpcEngine=void 0;const tE=eE(LS),rE=FS;class nE extends tE.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,a]=await nE._runAllMiddleware(e,t,this._middleware);return o?(await nE._runReturnHandlers(a),n(i)):r((async e=>{try{await nE._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new rE.EthereumRpcError(rE.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new rE.EthereumRpcError(rE.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}return i&&(delete n.result,n.error||(n.error=rE.serializeError(i))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await nE._runAllMiddleware(e,t,this._middleware);if(nE._checkForCompletion(e,t,n),await nE._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=await nE._runMiddleware(e,t,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=rE.serializeError(r)),i([r,!0])},a=r=>{t.error?o(t.error):(r&&("function"!=typeof r&&o(new rE.EthereumRpcError(rE.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${iE(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,a,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new rE.EthereumRpcError(rE.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${iE(e)}`,{request:e});if(!r)throw new rE.EthereumRpcError(rE.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${iE(e)}`,{request:e})}}function iE(e){return JSON.stringify(e,null,2)}IS.JsonRpcEngine=nE;var oE={};Object.defineProperty(oE,"__esModule",{value:!0}),oE.mergeMiddleware=void 0;const aE=IS;var sE,uE,fE;oE.mergeMiddleware=function(e){const t=new aE.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()},sE=SS,uE=q_&&q_.__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]}),fE=q_&&q_.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||uE(t,e,r)},Object.defineProperty(sE,"__esModule",{value:!0}),fE(ES,sE),fE(OS,sE),fE(PS,sE),fE(kS,sE),fE(IS,sE),fE(oE,sE);var hE,cE,lE,dE,pE,gE={},bE={},yE={exports:{}},mE={exports:{}};function vE(){if(hE)return mE.exports;return hE=1,void 0===nS||!nS.version||0===nS.version.indexOf("v0.")||0===nS.version.indexOf("v1.")&&0!==nS.version.indexOf("v1.8.")?mE.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return VM(e);case 2:return VM((function(){e.call(null,t)}));case 3:return VM((function(){e.call(null,t,r)}));case 4:return VM((function(){e.call(null,t,r,n)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return VM((function(){e.apply(null,i)}))}}}:mE.exports=nS,mE.exports}function AE(){if(lE)return cE;lE=1;var e={}.toString;return cE=Array.isArray||function(t){return"[object Array]"==e.call(t)},cE}function wE(){return pE?dE:(pE=1,dE=TS().EventEmitter)}for(var _E={exports:{}},ME={},SE={byteLength:function(e){var t=PE(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=PE(e),i=n[0],o=n[1],a=new CE(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),s=0,u=o>0?i-4:i;for(r=0;r<u;r+=4)t=kE[e.charCodeAt(r)]<<18|kE[e.charCodeAt(r+1)]<<12|kE[e.charCodeAt(r+2)]<<6|kE[e.charCodeAt(r+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===o&&(t=kE[e.charCodeAt(r)]<<2|kE[e.charCodeAt(r+1)]>>4,a[s++]=255&t);1===o&&(t=kE[e.charCodeAt(r)]<<10|kE[e.charCodeAt(r+1)]<<4|kE[e.charCodeAt(r+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(BE(e,a,a+o>s?s:a+o));1===n?(t=e[r-1],i.push(EE[t>>2]+EE[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(EE[t>>10]+EE[t>>4&63]+EE[t<<2&63]+"="));return i.join("")}},EE=[],kE=[],CE="undefined"!=typeof Uint8Array?Uint8Array:Array,RE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xE=0,OE=RE.length;xE<OE;++xE)EE[xE]=RE[xE],kE[RE.charCodeAt(xE)]=xE;function PE(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 BE(e,t,r){for(var n,i,o=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(EE[(i=n)>>18&63]+EE[i>>12&63]+EE[i>>6&63]+EE[63&i]);return o.join("")}kE["-".charCodeAt(0)]=62,kE["_".charCodeAt(0)]=63;var IE,LE={};
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function jE(){return IE||(IE=1,function(e,t){var r=ME,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(_E,_E.exports)),_E.exports}LE.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},LE.write=function(e,t,r,n,i,o){var a,s,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=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=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-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,f+=i;f>0;e[r+d]=255&a,d+=p,a/=256,f-=8);e[r+d-p]|=128*g},
/*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <https://feross.org>
             * @license  MIT
             */
function(e){var t=SE,r=LE,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=o(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t=0|l(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||F(e.length)?o(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),o(e<0?0:0|l(e))}function h(e){for(var t=e.length<0?0:0|l(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function c(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,a.prototype),n}function l(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function p(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 R(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(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),F(r=+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=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(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 f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var h=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(e,o+l)!==f(t,l)){c=!1;break}if(c)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;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(F(s))return a;e[r+a]=s}return a}function v(e,t,r,n){return N(T(t,e.length-r),e,r,n)}function A(e,t,r,n){return N(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return N(D(t),e,r,n)}function _(e,t,r,n){return N(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 M(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,f=e[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=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&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return f(e)},a.allocUnsafeSlow=function(e){return f(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');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},a.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}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(U(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.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)g(this,t,t+1);return this},a.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)g(this,t,t+3),g(this,t+1,t+2);return this},a.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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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),s=(r>>>=0)-(t>>>=0),u=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r),c=0;c<u;++c)if(f[c]!==h[c]){o=f[c],s=h[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},a.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 v(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return w(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}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function k(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 R(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+=q[e[o]];return i}function x(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(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 P(e,t,r,n,i,o){if(!a.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,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 I(e,t,n,i,o){return t=+t,n>>>=0,o||B(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,o){return t=+t,n>>>=0,o||B(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(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},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(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},a.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(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},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(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},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(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},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(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},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));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 s=a.isBuffer(e)?e:a.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%u]}return this};var j=/[^+/0-9A-Za-z-_]/g;function T(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 D(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(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}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function F(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()}(ME);var TE,DE={};function NE(){if(TE)return DE;function e(e){return Object.prototype.toString.call(e)}return TE=1,DE.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},DE.isBoolean=function(e){return"boolean"==typeof e},DE.isNull=function(e){return null===e},DE.isNullOrUndefined=function(e){return null==e},DE.isNumber=function(e){return"number"==typeof e},DE.isString=function(e){return"string"==typeof e},DE.isSymbol=function(e){return"symbol"==typeof e},DE.isUndefined=function(e){return void 0===e},DE.isRegExp=function(t){return"[object RegExp]"===e(t)},DE.isObject=function(e){return"object"==typeof e&&null!==e},DE.isDate=function(t){return"[object Date]"===e(t)},DE.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},DE.isFunction=function(e){return"function"==typeof e},DE.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},DE.isBuffer=ME.Buffer.isBuffer,DE}var UE,FE={exports:{}};function qE(){return UE||(UE=1,"function"==typeof Object.create?FE.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:FE.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),FE.exports}var WE,zE,VE,HE,KE,YE,GE,ZE,QE,JE=z_(Object.freeze({__proto__:null,default:{}})),XE={exports:{}};function $E(){return WE||(WE=1,function(e){var t=jE().Buffer,r=JE;function n(e,t,r){e.copy(t,r)}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 t.alloc(0);if(1===this.length)return this.head.data;for(var r=t.allocUnsafe(e>>>0),i=this.head,o=0;i;)n(i.data,r,o),o+=i.data.length,i=i.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})}(XE)),XE.exports}function ek(){if(VE)return zE;VE=1;var e=vE();function t(e,t){e.emit("error",t)}return zE={destroy:function(r,n){var i=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(n?n(r):!r||this._writableState&&this._writableState.errorEmitted||e.nextTick(t,this,r),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(r){!n&&r?(e.nextTick(t,i,r),i._writableState&&(i._writableState.errorEmitted=!0)):n&&n(r)})),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)}},zE}function tk(){if(KE)return HE;function e(e){try{if(!q_.localStorage)return!1}catch(e){return!1}var t=q_.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return KE=1,HE=function(t,r){if(e("noDeprecation"))return t;var n=!1;return function(){if(!n){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}},HE}function rk(){if(GE)return YE;GE=1;var e=vE();function t(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)}}YE=d;var r,n=e.nextTick;d.WritableState=l;var i=Object.create(NE());i.inherits=qE();var o={deprecate:tk()},a=wE(),s=jE().Buffer,u=q_.Uint8Array||function(){};var f,h=ek();function c(){}function l(i,o){r=r||nk(),i=i||{};var a=o instanceof r;this.objectMode=!!i.objectMode,a&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var s=i.highWaterMark,u=i.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:a&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===i.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var i=t._writableState,o=i.sync,a=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),r)!function(t,r,n,i,o){--r.pendingcb,n?(e.nextTick(o,i),e.nextTick(v,t,r),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),v(t,r))}(t,i,o,r,a);else{var s=y(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||b(t,i),o?n(g,t,i,s,a):g(t,i,s,a)}}(o,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(r=r||nk(),!(f.call(d,this)||this instanceof r))return new d(e);this._writableState=new l(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)),a.call(this)}function p(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 g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),v(e,t)}function b(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,p(e,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,h=n.encoding,c=n.callback;if(p(e,r,!1,r.objectMode?1:f.length,f,h,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function m(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),v(e,t)}))}function v(t,r){var n=y(r);return n&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e.nextTick(m,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),n}return i.inherits(d,a),l.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(l.prototype,"buffer",{get:o.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(d,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===d&&(e&&e._writableState instanceof l)}})):f=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,n){var i,o=this._writableState,a=!1,f=!o.objectMode&&(i=t,s.isBuffer(i)||i instanceof u);return f&&!s.isBuffer(t)&&(t=function(e){return s.from(e)}(t)),"function"==typeof r&&(n=r,r=null),f?r="buffer":r||(r=o.defaultEncoding),"function"!=typeof n&&(n=c),o.ended?function(t,r){var n=new Error("write after end");t.emit("error",n),e.nextTick(r,n)}(this,n):(f||function(t,r,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),e.nextTick(i,a),o=!1),o}(this,o,t,n))&&(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=s.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,u,n,i,o);return f}(this,o,f,t,r,n)),a},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},d.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(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),null!=t&&this.write(t,r),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,r,n){r.ending=!0,v(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n));r.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=h.destroy,d.prototype._undestroy=h.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},YE}function nk(){if(QE)return ZE;QE=1;var e=vE(),t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ZE=u;var r=Object.create(NE());r.inherits=qE();var n=dk(),i=rk();r.inherits(u,n);for(var o=t(i.prototype),a=0;a<o.length;a++){var s=o[a];u.prototype[s]||(u.prototype[s]=i.prototype[s])}function u(e){if(!(this instanceof u))return new u(e);n.call(this,e),i.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",f)}function f(){this.allowHalfOpen||this._writableState.ended||e.nextTick(h,this)}function h(e){e.end()}return Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.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)}}),u.prototype._destroy=function(t,r){this.push(null),this.end(),e.nextTick(r,t)},ZE}var ik,ok,ak,sk,uk,fk,hk,ck={};function lk(){if(ik)return ck;ik=1;var e=jE().Buffer,t=e.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 r(r){var n;switch(this.encoding=function(r){var n=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}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=s,this.end=u,n=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(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 o(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 a(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 s(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 u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}return ck.StringDecoder=r,r.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||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var o=n(t[i]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--i<r||-2===o)return 0;if((o=n(t[i]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--i<r||-2===o)return 0;if((o=n(t[i]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.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},ck}function dk(){if(ak)return ok;ak=1;var e=vE();ok=g;var t,r=AE();g.ReadableState=p,TS().EventEmitter;var n=function(e,t){return e.listeners(t).length},i=wE(),o=jE().Buffer,a=q_.Uint8Array||function(){};var s=Object.create(NE());s.inherits=qE();var u=JE,f=void 0;f=u&&u.debuglog?u.debuglog("stream"):function(){};var h,c=$E(),l=ek();s.inherits(g,i);var d=["error","close","destroy","pause","resume"];function p(e,r){e=e||{};var n=r instanceof(t=t||nk());this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new c,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&&(h||(h=lk().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function g(e){if(t=t||nk(),!(this instanceof g))return new g(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function b(e,t,r,n,i){var s,u=e._readableState;null===t?(u.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,A(e)}(e,u)):(i||(s=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(u,t)),s?e.emit("error",s):u.objectMode||t&&t.length>0?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?y(e,u,t,!1):_(e,u)):y(e,u,t,!1))):n||(u.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(u)}function y(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&&A(e)),_(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=l.destroy,g.prototype._undestroy=l.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.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=o.from(e,t),t=""),r=!0),b(this,e,t,!1,r)},g.prototype.unshift=function(e){return b(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return h||(h=lk().StringDecoder),this._readableState.decoder=new h(e),this._readableState.encoding=e,this};var m=8388608;function v(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 A(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(f("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(w,t):w(t))}function w(e){f("emit readable"),e.emit("readable"),k(e)}function _(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(M,t,r))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function S(e){f("readable nexttick read 0"),e.read(0)}function E(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function C(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=o.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,s),0===(e-=s)){s===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e.nextTick(x,r,t))}function x(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return g.prototype.read=function(e){f("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 f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):A(this),null;if(0===(e=v(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=v(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,i){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,i);var s=(!i||!1!==i.end)&&t!==nS.stdout&&t!==nS.stderr?h:m;function u(e,r){f("onunpipe"),e===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),t.removeListener("close",b),t.removeListener("finish",y),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",u),o.removeListener("end",h),o.removeListener("end",m),o.removeListener("data",p),l=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function h(){f("onend"),t.end()}a.endEmitted?e.nextTick(s):o.once("end",s),t.on("unpipe",u);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,k(e))}}(o);t.on("drain",c);var l=!1;var d=!1;function p(e){f("ondata"),d=!1,!1!==t.write(e)||d||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==O(a.pipes,t))&&!l&&(f("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,d=!0),o.pause())}function g(e){f("onerror",e),m(),t.removeListener("error",g),0===n(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",y),m()}function y(){f("onfinish"),t.removeListener("close",b),m()}function m(){f("unpipe"),o.unpipe(t)}return o.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",b),t.once("finish",y),t.emit("pipe",o),a.flowing||(f("pipe resume"),o.resume()),t},g.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=O(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},g.prototype.on=function(t,r){var n=i.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&A(this):e.nextTick(S,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(E,t,r))}(this,t)),this},g.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("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){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==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<d.length;o++)e.on(d[o],this.emit.bind(this,d[o]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=C,ok}function pk(){if(uk)return sk;uk=1,sk=n;var e=nk(),t=Object.create(NE());function r(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 n(t){if(!(this instanceof n))return new n(t);e.call(this,t),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){o(e,t,r)})):o(this,null,null)}function o(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)}return t.inherits=qE(),t.inherits(n,e),n.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},n.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},n.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)}},n.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},n.prototype._destroy=function(t,r){var n=this;e.prototype._destroy.call(this,t,(function(e){r(e),n.emit("close")}))},sk}function gk(){if(hk)return fk;hk=1,fk=r;var e=pk(),t=Object.create(NE());function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=qE(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},fk}!function(e,t){(t=e.exports=dk()).Stream=t,t.Readable=t,t.Writable=rk(),t.Duplex=nk(),t.Transform=pk(),t.PassThrough=gk()}(yE,yE.exports),Object.defineProperty(bE,"__esModule",{value:!0});const bk=yE.exports;bE.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new bk.Duplex({objectMode:!0,read:function(){return},write:function(e,n,i){t.handle(e,((e,t)=>{r.push(t)})),i()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r};var yk={},mk=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yk,"__esModule",{value:!0});const vk=mk(LS),Ak=yE.exports;yk.default=function(){const e={},t=new Ak.Duplex({objectMode:!0,read:function(){return!1},write:function(t,n,i){let o;try{!t.id?function(e){r.emit("notification",e)}(t):function(t){const r=e[t.id];if(!r)throw new Error(`StreamMiddleware - Unknown response id "${t.id}"`);delete e[t.id],Object.assign(r.res,t),setTimeout(r.end)}(t)}catch(e){o=e}i(o)}}),r=new vk.default;return{events:r,middleware:(r,n,i,o)=>{t.push(r),e[r.id]={req:r,res:n,next:i,end:o}},stream:t}};var wk=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gE,"__esModule",{value:!0}),gE.createStreamMiddleware=gE.createEngineStream=void 0;const _k=wk(bE);gE.createEngineStream=_k.default;const Mk=wk(yk);gE.createStreamMiddleware=Mk.default;var Sk={},Ek={};Object.defineProperty(Ek,"__esModule",{value:!0}),Ek.Substream=void 0;const kk=yE.exports;class Ck extends kk.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}Ek.Substream=Ck;var Rk=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sk,"__esModule",{value:!0}),Sk.ObjectMultiplex=void 0;const xk=yE.exports,Ok=Rk(lS),Pk=Rk(iS.exports),Bk=Ek,Ik=Symbol("IGNORE_SUBSTREAM");class Lk extends xk.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new Bk.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=Pk.default(t);Ok.default(e,{readable:!1},r),Ok.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=Ik}_read(){}_write(e,t,r){const{name:n,data:i}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const o=this._substreams[n];return o?(o!==Ik&&o.push(i),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}Sk.ObjectMultiplex=Lk;var jk=Sk.ObjectMultiplex,Tk=Array.isArray,Dk=Object.keys,Nk=Object.prototype.hasOwnProperty;const Uk=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;Uk.writable=e=>Uk(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,Uk.readable=e=>Uk(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,Uk.duplex=e=>Uk.writable(e)&&Uk.readable(e),Uk.transform=e=>Uk.duplex(e)&&"function"==typeof e._transform;var Fk=Uk,qk=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(BM,"__esModule",{value:!0});const Wk=qk(MS),zk=SS,Vk=gE,Hk=qk(jk),Kk=qk(LS),Yk=qk((function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var n,i,o,a=Tk(t),s=Tk(r);if(a&&s){if((i=t.length)!=r.length)return!1;for(n=i;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(a!=s)return!1;var u=t instanceof Date,f=r instanceof Date;if(u!=f)return!1;if(u&&f)return t.getTime()==r.getTime();var h=t instanceof RegExp,c=r instanceof RegExp;if(h!=c)return!1;if(h&&c)return t.toString()==r.toString();var l=Dk(t);if((i=l.length)!==Dk(r).length)return!1;for(n=i;0!=n--;)if(!Nk.call(r,l[n]))return!1;for(n=i;0!=n--;)if(!e(t[o=l[n]],r[o]))return!1;return!0}return t!=t&&r!=r})),Gk=G_,Zk=Fk,Qk=qk(_M),Jk=SM;class Xk extends Kk.default{constructor(e,{jsonRpcStreamName:t="metamask-provider",logger:r=console,maxEventListeners:n=100}={}){if(super(),!Zk.duplex(e))throw new Error(Qk.default.errors.invalidDuplexStream());this._log=r,this.setMaxListeners(n),this._state=Object.assign({},Xk._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const i=new Hk.default;Wk.default(e,i,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this.on("connect",(()=>{this._state.isConnected=!0})),this._jsonRpcConnection=Vk.createStreamMiddleware(),Wk.default(this._jsonRpcConnection.stream,i.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider"));const o=new zk.JsonRpcEngine;o.push(zk.createIdRemapMiddleware()),o.push(Jk.createErrorMiddleware(this._log)),o.push(this._jsonRpcConnection.middleware),this._rpcEngine=o,this._initializeState(),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):Jk.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(Qk.default.errors.permanentlyDisconnected()))}))}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw Gk.ethErrors.rpc.invalidRequest({message:Qk.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw Gk.ethErrors.rpc.invalidRequest({message:Qk.default.errors.invalidRequestMethod(),data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw Gk.ethErrors.rpc.invalidRequest({message:Qk.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},Jk.getRpcPromiseCallback(e,n))}))}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:r,networkVersion:n}=await this.request({method:"metamask_getProviderState"});this.emit("connect",{chainId:t}),this._handleChainChanged({chainId:t,networkVersion:n}),this._handleUnlockStateChanged({accounts:e,isUnlocked:r}),this._handleAccountsChanged(e)}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}finally{this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result||[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(Qk.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new Gk.EthereumRpcError(1013,t||Qk.default.errors.disconnected()),this._log.debug(r)):(r=new Gk.EthereumRpcError(1011,t||Qk.default.errors.permanentlyDisconnected()),this._log.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleStreamDisconnect(e,t){Jk.logStreamDisconnectWarning(this._log,e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}_handleChainChanged({chainId:e,networkVersion:t}={}){e&&"string"==typeof e&&e.startsWith("0x")&&t&&"string"==typeof t?"loading"===t?this._handleDisconnect(!0):(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error("MetaMask: Received invalid network parameters. Please report this bug.",{chainId:e,networkVersion:t})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}Yk.default(this._state.accounts,r)||(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,this.selectedAddress!==r[0]&&(this.selectedAddress=r[0]||null),this._state.initialized&&this.emit("accountsChanged",r))}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}BM.default=Xk,Xk._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1};var $k=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y_,"__esModule",{value:!0});const eC=G_,tC=$k(wM),rC=$k(_M),nC=SM,iC=$k(BM);class oC extends iC.default{constructor(e,{jsonRpcStreamName:t="metamask-provider",logger:r=console,maxEventListeners:n=100,shouldSendMetadata:i=!0}={}){if(super(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this.networkVersion=null,this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;nC.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),i)if("complete"===document.readyState)tC.default(this._rpcEngine,this._log);else{const e=()=>{tC.default(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){var t;!1===(null===(t=this._sentWarnings)||void 0===t?void 0:t.events[e])&&(this._log.warn(rC.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}enable(){return this._sentWarnings.enable||(this._log.warn(rC.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},nC.getRpcPromiseCallback(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(rC.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},nC.getRpcPromiseCallback(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,nC.NOOP),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(rC.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw eC.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,nC.getRpcPromiseCallback(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(rC.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),t&&"loading"!==t&&t!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}Y_.default=oC;var aC={},sC=[],uC=[],fC="undefined"!=typeof Uint8Array?Uint8Array:Array,hC=!1;function cC(){hC=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)sC[t]=e[t],uC[e.charCodeAt(t)]=t;uC["-".charCodeAt(0)]=62,uC["_".charCodeAt(0)]=63}function lC(e,t,r){for(var n,i,o=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(sC[(i=n)>>18&63]+sC[i>>12&63]+sC[i>>6&63]+sC[63&i]);return o.join("")}function dC(e){var t;hC||cC();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(lC(e,s,s+a>u?u:s+a));return 1===n?(t=e[r-1],i+=sC[t>>2],i+=sC[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=sC[t>>10],i+=sC[t>>4&63],i+=sC[t<<2&63],i+="="),o.push(i),o.join("")}function pC(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)}function gC(e,t,r,n,i,o){var a,s,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=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=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-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,f+=i;f>0;e[r+d]=255&a,d+=p,a/=256,f-=8);e[r+d-p]|=128*g}var bC={}.toString,yC=Array.isArray||function(e){return"[object Array]"==bC.call(e)};function mC(){return AC.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function vC(e,t){if(mC()<t)throw new RangeError("Invalid typed array length");return AC.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=AC.prototype:(null===e&&(e=new AC(t)),e.length=t),e}function AC(e,t,r){if(!(AC.TYPED_ARRAY_SUPPORT||this instanceof AC))return new AC(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 MC(this,e)}return wC(this,e,t,r)}function wC(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);AC.TYPED_ARRAY_SUPPORT?(e=t).__proto__=AC.prototype:e=SC(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!AC.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|CC(t,r),i=(e=vC(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(kC(t)){var r=0|EC(t.length);return 0===(e=vC(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?vC(e,0):SC(e,t);if("Buffer"===t.type&&yC(t.data))return SC(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function _C(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 MC(e,t){if(_C(t),e=vC(e,t<0?0:0|EC(t)),!AC.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function SC(e,t){var r=t.length<0?0:0|EC(t.length);e=vC(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function EC(e){if(e>=mC())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+mC().toString(16)+" bytes");return 0|e}function kC(e){return!(null==e||!e._isBuffer)}function CC(e,t){if(kC(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 eR(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return tR(e).length;default:if(n)return eR(e).length;t=(""+t).toLowerCase(),n=!0}}function RC(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 zC(this,t,r);case"utf8":case"utf-8":return UC(this,t,r);case"ascii":return qC(this,t,r);case"latin1":case"binary":return WC(this,t,r);case"base64":return NC(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return VC(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function xC(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function OC(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=AC.from(t,n)),kC(t))return 0===t.length?-1:PC(e,t,r,n,i);if("number"==typeof t)return t&=255,AC.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):PC(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function PC(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 f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var h=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(e,o+l)!==f(t,l)){c=!1;break}if(c)return o}return-1}function BC(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 IC(e,t,r,n){return rR(eR(t,e.length-r),e,r,n)}function LC(e,t,r,n){return rR(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function jC(e,t,r,n){return LC(e,t,r,n)}function TC(e,t,r,n){return rR(tR(t),e,r,n)}function DC(e,t,r,n){return rR(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 NC(e,t,r){return 0===t&&r===e.length?dC(e):dC(e.slice(t,r))}function UC(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,f=e[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=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&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(e){var t=e.length;if(t<=FC)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=FC));return r}(n)}AC.TYPED_ARRAY_SUPPORT=void 0===e.TYPED_ARRAY_SUPPORT||e.TYPED_ARRAY_SUPPORT,AC.poolSize=8192,AC._augment=function(e){return e.__proto__=AC.prototype,e},AC.from=function(e,t,r){return wC(null,e,t,r)},AC.TYPED_ARRAY_SUPPORT&&(AC.prototype.__proto__=Uint8Array.prototype,AC.__proto__=Uint8Array),AC.alloc=function(e,t,r){return function(e,t,r,n){return _C(t),t<=0?vC(e,t):void 0!==r?"string"==typeof n?vC(e,t).fill(r,n):vC(e,t).fill(r):vC(e,t)}(null,e,t,r)},AC.allocUnsafe=function(e){return MC(null,e)},AC.allocUnsafeSlow=function(e){return MC(null,e)},AC.isBuffer=nR,AC.compare=function(e,t){if(!kC(e)||!kC(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},AC.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}},AC.concat=function(e,t){if(!yC(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return AC.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=AC.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!kC(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},AC.byteLength=CC,AC.prototype._isBuffer=!0,AC.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)xC(this,t,t+1);return this},AC.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)xC(this,t,t+3),xC(this,t+1,t+2);return this},AC.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)xC(this,t,t+7),xC(this,t+1,t+6),xC(this,t+2,t+5),xC(this,t+3,t+4);return this},AC.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?UC(this,0,e):RC.apply(this,arguments)},AC.prototype.equals=function(e){if(!kC(e))throw new TypeError("Argument must be a Buffer");return this===e||0===AC.compare(this,e)},AC.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},AC.prototype.compare=function(e,t,r,n,i){if(!kC(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),u=this.slice(n,i),f=e.slice(t,r),h=0;h<s;++h)if(u[h]!==f[h]){o=u[h],a=f[h];break}return o<a?-1:a<o?1:0},AC.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},AC.prototype.indexOf=function(e,t,r){return OC(this,e,t,r,!0)},AC.prototype.lastIndexOf=function(e,t,r){return OC(this,e,t,r,!1)},AC.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 BC(this,e,t,r);case"utf8":case"utf-8":return IC(this,e,t,r);case"ascii":return LC(this,e,t,r);case"latin1":case"binary":return jC(this,e,t,r);case"base64":return TC(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return DC(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},AC.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var FC=4096;function qC(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 WC(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 zC(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+=$C(e[o]);return i}function VC(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 HC(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 KC(e,t,r,n,i,o){if(!kC(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 YC(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 GC(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 ZC(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 QC(e,t,r,n,i){return i||ZC(e,0,r,4),gC(e,t,r,n,23,4),r+4}function JC(e,t,r,n,i){return i||ZC(e,0,r,8),gC(e,t,r,n,52,8),r+8}AC.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),AC.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=AC.prototype;else{var i=t-e;r=new AC(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},AC.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||HC(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},AC.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||HC(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},AC.prototype.readUInt8=function(e,t){return t||HC(e,1,this.length),this[e]},AC.prototype.readUInt16LE=function(e,t){return t||HC(e,2,this.length),this[e]|this[e+1]<<8},AC.prototype.readUInt16BE=function(e,t){return t||HC(e,2,this.length),this[e]<<8|this[e+1]},AC.prototype.readUInt32LE=function(e,t){return t||HC(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},AC.prototype.readUInt32BE=function(e,t){return t||HC(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},AC.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||HC(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},AC.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||HC(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},AC.prototype.readInt8=function(e,t){return t||HC(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},AC.prototype.readInt16LE=function(e,t){t||HC(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},AC.prototype.readInt16BE=function(e,t){t||HC(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},AC.prototype.readInt32LE=function(e,t){return t||HC(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},AC.prototype.readInt32BE=function(e,t){return t||HC(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},AC.prototype.readFloatLE=function(e,t){return t||HC(e,4,this.length),pC(this,e,!0,23,4)},AC.prototype.readFloatBE=function(e,t){return t||HC(e,4,this.length),pC(this,e,!1,23,4)},AC.prototype.readDoubleLE=function(e,t){return t||HC(e,8,this.length),pC(this,e,!0,52,8)},AC.prototype.readDoubleBE=function(e,t){return t||HC(e,8,this.length),pC(this,e,!1,52,8)},AC.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||KC(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},AC.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||KC(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},AC.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,1,255,0),AC.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},AC.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,2,65535,0),AC.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):YC(this,e,t,!0),t+2},AC.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,2,65535,0),AC.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):YC(this,e,t,!1),t+2},AC.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,4,4294967295,0),AC.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):GC(this,e,t,!0),t+4},AC.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,4,4294967295,0),AC.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):GC(this,e,t,!1),t+4},AC.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);KC(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},AC.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);KC(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},AC.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,1,127,-128),AC.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},AC.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,2,32767,-32768),AC.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):YC(this,e,t,!0),t+2},AC.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,2,32767,-32768),AC.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):YC(this,e,t,!1),t+2},AC.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,4,2147483647,-2147483648),AC.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):GC(this,e,t,!0),t+4},AC.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||KC(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),AC.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):GC(this,e,t,!1),t+4},AC.prototype.writeFloatLE=function(e,t,r){return QC(this,e,t,!0,r)},AC.prototype.writeFloatBE=function(e,t,r){return QC(this,e,t,!1,r)},AC.prototype.writeDoubleLE=function(e,t,r){return JC(this,e,t,!0,r)},AC.prototype.writeDoubleBE=function(e,t,r){return JC(this,e,t,!1,r)},AC.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||!AC.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},AC.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&&!AC.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=kC(e)?e:eR(new AC(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var XC=/[^+\/0-9A-Za-z-_]/g;function $C(e){return e<16?"0"+e.toString(16):e.toString(16)}function eR(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 tR(e){return function(e){var t,r,n,i,o,a;hC||cC();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new fC(3*s/4-o),n=o>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)i=uC[e.charCodeAt(t)]<<18|uC[e.charCodeAt(t+1)]<<12|uC[e.charCodeAt(t+2)]<<6|uC[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=uC[e.charCodeAt(t)]<<2|uC[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=uC[e.charCodeAt(t)]<<10|uC[e.charCodeAt(t+1)]<<4|uC[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(XC,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function rR(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}function nR(e){return null!=e&&(!!e._isBuffer||iR(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&iR(e.slice(0,0))}(e))}function iR(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var oR,aR=TS(),sR={},uR={},fR=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0},hR=fR,cR=function(){return hR()&&!!Symbol.toStringTag},lR="undefined"!=typeof Symbol&&Symbol,dR=fR,pR="Function.prototype.bind called on incompatible ",gR=Array.prototype.slice,bR=Object.prototype.toString,yR="[object Function]",mR=function(e){var t=this;if("function"!=typeof t||bR.call(t)!==yR)throw new TypeError(pR+t);for(var r,n=gR.call(arguments,1),i=function(){if(this instanceof r){var i=t.apply(this,n.concat(gR.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(gR.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s<o;s++)a.push("$"+s);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r},vR=Function.prototype.bind||mR,AR=vR.call(Function.call,Object.prototype.hasOwnProperty),wR=SyntaxError,_R=Function,MR=TypeError,SR=function(e){try{return _R('"use strict"; return ('+e+").constructor;")()}catch(e){}},ER=Object.getOwnPropertyDescriptor;if(ER)try{ER({},"")}catch(r){ER=null}var kR=function(){throw new MR},CR=ER?function(){try{return kR}catch(e){try{return ER(arguments,"callee").get}catch(e){return kR}}}():kR,RR="function"==typeof lR&&"function"==typeof Symbol&&"symbol"==typeof lR("foo")&&"symbol"==typeof Symbol("bar")&&dR(),xR=Object.getPrototypeOf||function(e){return e.__proto__},OR={},PR="undefined"==typeof Uint8Array?oR:xR(Uint8Array),BR={"%AggregateError%":"undefined"==typeof AggregateError?oR:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?oR:ArrayBuffer,"%ArrayIteratorPrototype%":RR?xR([][Symbol.iterator]()):oR,"%AsyncFromSyncIteratorPrototype%":oR,"%AsyncFunction%":OR,"%AsyncGenerator%":OR,"%AsyncGeneratorFunction%":OR,"%AsyncIteratorPrototype%":OR,"%Atomics%":"undefined"==typeof Atomics?oR:Atomics,"%BigInt%":"undefined"==typeof BigInt?oR:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?oR:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?oR:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?oR:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?oR:FinalizationRegistry,"%Function%":_R,"%GeneratorFunction%":OR,"%Int8Array%":"undefined"==typeof Int8Array?oR:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?oR:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?oR:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":RR?xR(xR([][Symbol.iterator]())):oR,"%JSON%":"object"==typeof JSON?JSON:oR,"%Map%":"undefined"==typeof Map?oR:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&RR?xR((new Map)[Symbol.iterator]()):oR,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?oR:Promise,"%Proxy%":"undefined"==typeof Proxy?oR:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?oR:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?oR:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&RR?xR((new Set)[Symbol.iterator]()):oR,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?oR:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":RR?xR(""[Symbol.iterator]()):oR,"%Symbol%":RR?Symbol:oR,"%SyntaxError%":wR,"%ThrowTypeError%":CR,"%TypedArray%":PR,"%TypeError%":MR,"%Uint8Array%":"undefined"==typeof Uint8Array?oR:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?oR:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?oR:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?oR:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?oR:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?oR:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?oR:WeakSet},IR=function e(t){var r;if("%AsyncFunction%"===t)r=SR("async function () {}");else if("%GeneratorFunction%"===t)r=SR("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=SR("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=xR(i.prototype))}return BR[t]=r,r},LR={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},jR=vR,TR=AR,DR=jR.call(Function.call,Array.prototype.concat),NR=jR.call(Function.apply,Array.prototype.splice),UR=jR.call(Function.call,String.prototype.replace),FR=jR.call(Function.call,String.prototype.slice),qR=jR.call(Function.call,RegExp.prototype.exec),WR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zR=/\\(\\)?/g,VR=function(e){var t=FR(e,0,1),r=FR(e,-1);if("%"===t&&"%"!==r)throw new wR("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new wR("invalid intrinsic syntax, expected opening `%`");var n=[];return UR(e,WR,(function(e,t,r,i){n[n.length]=r?UR(i,zR,"$1"):t||e})),n},HR=function(e,t){var r,n=e;if(TR(LR,n)&&(n="%"+(r=LR[n])[0]+"%"),TR(BR,n)){var i=BR[n];if(i===OR&&(i=IR(n)),void 0===i&&!t)throw new MR("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new wR("intrinsic "+e+" does not exist!")},KR=function(e,t){if("string"!=typeof e||0===e.length)throw new MR("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new MR('"allowMissing" argument must be a boolean');if(null===qR(/^%?[^%]*%?$/g,e))throw new wR("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=VR(e),n=r.length>0?r[0]:"",i=HR("%"+n+"%",t),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],NR(r,DR([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var c=r[f],l=FR(c,0,1),d=FR(c,-1);if(('"'===l||"'"===l||"`"===l||'"'===d||"'"===d||"`"===d)&&l!==d)throw new wR("property names with quotes must have matching quotes");if("constructor"!==c&&h||(s=!0),TR(BR,o="%"+(n+="."+c)+"%"))a=BR[o];else if(null!=a){if(!(c in a)){if(!t)throw new MR("base intrinsic for "+e+" exists, but the property is not available.");return}if(ER&&f+1>=r.length){var p=ER(a,c);a=(h=!!p)&&"get"in p&&!("originalValue"in p.get)?p.get:a[c]}else h=TR(a,c),a=a[c];h&&!s&&(BR[o]=a)}}return a},YR={exports:{}};!function(e){var t=vR,r=KR,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var r=o(t,i,arguments);if(a&&s){var n=a(r,"length");n.configurable&&s(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var f=function(){return o(t,n,arguments)};s?s(e.exports,"apply",{value:f}):e.exports.apply=f}(YR);var GR=KR,ZR=YR.exports,QR=ZR(GR("String.prototype.indexOf")),JR=function(e,t){var r=GR(e,!!t);return"function"==typeof r&&QR(e,".prototype.")>-1?ZR(r):r},XR=cR(),$R=JR("Object.prototype.toString"),ex=function(e){return!(XR&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===$R(e)},tx=function(e){return!!ex(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==$R(e)&&"[object Function]"===$R(e.callee)},rx=function(){return ex(arguments)}();ex.isLegacyArguments=tx;var nx,ix,ox,ax,sx,ux=rx?ex:tx,fx=Object.prototype.toString,hx=Function.prototype.toString,cx=/^\s*(?:function)?\*/,lx=cR(),dx=Object.getPrototypeOf,px=function(e){if("function"!=typeof e)return!1;if(cx.test(hx.call(e)))return!0;if(!lx)return"[object GeneratorFunction]"===fx.call(e);if(!dx)return!1;if(void 0===nx){var t=function(){if(!lx)return!1;try{return Function("return function*() {}")()}catch(e){}}();nx=!!t&&dx(t)}return dx(e)===nx},gx=Object.prototype.hasOwnProperty,bx=Object.prototype.toString,yx=function(e,t,r){if("[object Function]"!==bx.call(t))throw new TypeError("iterator must be a function");var n=e.length;if(n===+n)for(var i=0;i<n;i++)t.call(r,e[i],i,e);else for(var o in e)gx.call(e,o)&&t.call(r,e[o],o,e)},mx=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],vx="undefined"==typeof globalThis?q_:globalThis,Ax=function(){for(var e=[],t=0;t<mx.length;t++)"function"==typeof vx[mx[t]]&&(e[e.length]=mx[t]);return e};var wx=yx,_x=Ax,Mx=JR,Sx=Mx("Object.prototype.toString"),Ex=cR(),kx="undefined"==typeof globalThis?q_:globalThis,Cx=_x(),Rx=Mx("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},xx=Mx("String.prototype.slice"),Ox={},Px=function(){if(sx)return ax;sx=1;var e=KR("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return ax=e}(),Bx=Object.getPrototypeOf;Ex&&Px&&Bx&&wx(Cx,(function(e){var t=new kx[e];if(Symbol.toStringTag in t){var r=Bx(t),n=Px(r,Symbol.toStringTag);if(!n){var i=Bx(r);n=Px(i,Symbol.toStringTag)}Ox[e]=n.get}}));var Ix=function(e){if(!e||"object"!=typeof e)return!1;if(!Ex||!(Symbol.toStringTag in e)){var t=xx(Sx(e),8,-1);return Rx(Cx,t)>-1}return!!Px&&function(e){var t=!1;return wx(Ox,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)},Lx=yx,jx=Ax,Tx=JR,Dx=Tx("Object.prototype.toString"),Nx=cR(),Ux="undefined"==typeof globalThis?q_:globalThis,Fx=jx(),qx=Tx("String.prototype.slice"),Wx={},zx=function(){if(ox)return ix;ox=1;var e=KR("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return ix=e}(),Vx=Object.getPrototypeOf;Nx&&zx&&Vx&&Lx(Fx,(function(e){if("function"==typeof Ux[e]){var t=new Ux[e];if(Symbol.toStringTag in t){var r=Vx(t),n=zx(r,Symbol.toStringTag);if(!n){var i=Vx(r);n=zx(i,Symbol.toStringTag)}Wx[e]=n.get}}}));var Hx=Ix,Kx=function(e){return!!Hx(e)&&(Nx&&Symbol.toStringTag in e?function(e){var t=!1;return Lx(Wx,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):qx(Dx(e),8,-1))};!function(e){var t=ux,r=px,n=Kx,i=Ix;function o(e){return e.call.bind(e)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,u=o(Object.prototype.toString),f=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),c=o(Boolean.prototype.valueOf);if(a)var l=o(BigInt.prototype.valueOf);if(s)var d=o(Symbol.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===u(e)}function b(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function m(e){return"[object WeakSet]"===u(e)}function v(e){return"[object ArrayBuffer]"===u(e)}function A(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function w(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(w.working?w(e):e instanceof DataView)}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i,e.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||_(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},g.working="undefined"!=typeof Map&&g(new Map),e.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},m.working="undefined"!=typeof WeakSet&&m(new WeakSet),e.isWeakSet=function(e){return m(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),e.isArrayBuffer=A,w.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&w(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=_;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===u(e)}function E(e){return void 0!==M&&(void 0===S.working&&(S.working=S(new M)),S.working?S(e):e instanceof M)}function k(e){return p(e,f)}function C(e){return p(e,h)}function R(e){return p(e,c)}function x(e){return a&&p(e,l)}function O(e){return s&&p(e,d)}e.isSharedArrayBuffer=E,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=k,e.isStringObject=C,e.isBooleanObject=R,e.isBigIntObject=x,e.isSymbolObject=O,e.isBoxedPrimitive=function(e){return k(e)||C(e)||R(e)||x(e)||O(e)},e.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(A(e)||E(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}(uR);var Yx,Gx=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8};function Zx(){this.head=null,this.tail=null,this.length=0}!function(e){var t=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},r=/%[sdj%]/g;e.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var i=arguments,o=i.length,s=String(e).replace(r,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}})),u=i[n];n<o;u=i[++n])p(u)||!v(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(t,r){if(void 0!==nS&&!0===nS.noDeprecation)return t;if(void 0===nS)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(nS.throwDeprecation)throw new Error(r);nS.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},i=/^$/;if(nS.env.NODE_DEBUG){var o=nS.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}function a(t,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),f(n,t,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function f(t,r,n){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(e,t){if(y(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(g(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(p(t))return e.stylize("null","null")}(t,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(t.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(_(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(m(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return h(r)}var v,M="",S=!1,E=["{","}"];(l(r)&&(S=!0,E=["[","]"]),_(r))&&(M=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(M=" "+RegExp.prototype.toString.call(r)),A(r)&&(M=" "+Date.prototype.toUTCString.call(r)),w(r)&&(M=" "+h(r)),0!==a.length||S&&0!=r.length?n<0?m(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),v=S?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)C(t,String(a))?o.push(c(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(c(e,t,r,n,i,!0))})),o}(t,r,n,s,a):a.map((function(e){return c(t,r,n,s,e,S)})),t.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n"),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]}(v,M,E)):E[0]+M+E[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function c(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")),C(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=p(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")),y(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 l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return void 0===e}function m(e){return v(e)&&"[object RegExp]"===M(e)}function v(e){return"object"==typeof e&&null!==e}function A(e){return v(e)&&"[object Date]"===M(e)}function w(e){return v(e)&&("[object Error]"===M(e)||e instanceof Error)}function _(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!n[t])if(i.test(t)){var r=nS.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=uR,e.isArray=l,e.isBoolean=d,e.isNull=p,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=b,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=y,e.isRegExp=m,e.types.isRegExp=m,e.isObject=v,e.isDate=A,e.types.isDate=A,e.isError=w,e.types.isNativeError=w,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.isBuffer=Gx;var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),E[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=qE(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var r;if("function"!=typeof(r=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,R,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){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(e){r(e)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),R&&Object.defineProperty(r,R,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,t(e))},e.promisify.custom=R,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};e.apply(this,t).then((function(e){VM(o.bind(null,null,e))}),(function(e){VM(x.bind(null,e,o))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,t(e)),r}}(sR),Zx.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},Zx.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Zx.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}},Zx.prototype.clear=function(){this.head=this.tail=null,this.length=0},Zx.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},Zx.prototype.concat=function(e){if(0===this.length)return ME.Buffer.alloc(0);if(1===this.length)return this.head.data;for(var t=ME.Buffer.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var Qx=ME.Buffer,Jx=Qx.isEncoding||function(e){switch(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}};var Xx=Yx=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Jx(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=eO;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=tO;break;default:return void(this.write=$x)}this.charBuffer=new Qx(6),this.charReceived=0,this.charLength=0};function $x(e){return e.toString(this.encoding)}function eO(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function tO(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Xx.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},Xx.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},Xx.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t},iO.ReadableState=nO;var rO=sR.debuglog("stream");function nO(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof BO&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new Zx,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Yx(e.encoding),this.encoding=e.encoding)}function iO(e){if(!(this instanceof iO))return new iO(e);this._readableState=new nO(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),aR.call(this)}function oO(e,t,r,n,i){var o=function(e,t){var r=null;nR(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(o)e.emit("error",o);else if(null===r)t.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,uO(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&uO(e))),function(e,t){t.readingMore||(t.readingMore=!0,VM(hO,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}sR.inherits(iO,aR),iO.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=AC.from(e,t),t=""),oO(this,r,e,t,!1)},iO.prototype.unshift=function(e){return oO(this,this._readableState,e,"",!0)},iO.prototype.isPaused=function(){return!1===this._readableState.flowing},iO.prototype.setEncoding=function(e){return this._readableState.decoder=new Yx(e),this._readableState.encoding=e,this};var aO=8388608;function sO(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>=aO?e=aO:(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 uO(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(rO("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?VM(fO,e):fO(e))}function fO(e){rO("emit readable"),e.emit("readable"),dO(e)}function hO(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(rO("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function cO(e){rO("readable nexttick read 0"),e.read(0)}function lO(e,t){t.reading||(rO("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),dO(e),t.flowing&&!t.reading&&e.read(0)}function dO(e){var t=e._readableState;for(rO("flow",t.flowing);t.flowing&&null!==e.read(););}function pO(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=AC.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 gO(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,VM(bO,t,e))}function bO(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function yO(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function mO(){}function vO(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function AO(e,t){Object.defineProperty(this,"buffer",{get:sR.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof BO&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,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?VM(i,n):i(n);e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,i);else{var o=EO(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||SO(e,r),n?VM(MO,e,r,o,i):MO(e,r,o,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 RO(this)}function wO(e){if(!(this instanceof wO||this instanceof BO))return new wO(e);this._writableState=new AO(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),aR.EventEmitter.call(this)}function _O(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 MO(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),CO(e,t)}function SO(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 a=0;r;)i[a]=r,r=r.next,a+=1;_O(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 RO(t)}else{for(;r;){var s=r.chunk,u=r.encoding,f=r.callback;if(_O(e,t,!1,t.objectMode?1:s.length,s,u,f),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function EO(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function kO(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function CO(e,t){var r=EO(t);return r&&(0===t.pendingcb?(kO(e,t),t.finished=!0,e.emit("finish")):kO(e,t)),r}function RO(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}iO.prototype.read=function(e){rO("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 rO("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?gO(this):uO(this),null;if(0===(e=sO(e,t))&&t.ended)return 0===t.length&&gO(this),null;var n,i=t.needReadable;return rO("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&rO("length less than watermark",i=!0),t.ended||t.reading?rO("reading or ended",i=!1):i&&(rO("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=sO(r,t))),null===(n=e>0?pO(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&gO(this)),null!==n&&this.emit("data",n),n},iO.prototype._read=function(e){this.emit("error",new Error("not implemented"))},iO.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,rO("pipe count=%d opts=%j",n.pipesCount,t);var i=!t||!1!==t.end?a:f;function o(e){rO("onunpipe"),e===r&&f()}function a(){rO("onend"),e.end()}n.endEmitted?VM(i):r.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;rO("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,dO(e))}}(r);e.on("drain",s);var u=!1;function f(){rO("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",f),r.removeListener("data",c),u=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var h=!1;function c(t){rO("ondata"),h=!1,!1!==e.write(t)||h||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==yO(n.pipes,e))&&!u&&(rO("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function l(t){var r;rO("onerror",t),g(),e.removeListener("error",l),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){rO("onfinish"),e.removeListener("close",d),g()}function g(){rO("unpipe"),r.unpipe(e)}return r.on("data",c),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",l),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(rO("pipe resume"),r.resume()),e},iO.prototype.unpipe=function(e){var t=this._readableState;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)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var o=yO(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},iO.prototype.on=function(e,t){var r=aR.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&&uO(this):VM(cO,this))}return r},iO.prototype.addListener=iO.prototype.on,iO.prototype.resume=function(){var e=this._readableState;return e.flowing||(rO("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,VM(lO,e,t))}(this,e)),this},iO.prototype.pause=function(){return rO("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(rO("pause"),this._readableState.flowing=!1,this.emit("pause")),this},iO.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(rO("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){(rO("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(n.push(i)||(r=!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));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){rO("wrapped _read",t),r&&(r=!1,e.resume())},n},iO._fromList=pO,wO.WritableState=AO,sR.inherits(wO,aR.EventEmitter),AO.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wO.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wO.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),ME.Buffer.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=mO),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),VM(t,r)}(this,r):function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):ME.Buffer.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),VM(n,o),i=!1),i}(this,n,e,r)&&(n.pendingcb++,i=function(e,t,r,n,i){r=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=ME.Buffer.from(t,r));return t}(t,r,n),ME.Buffer.isBuffer(r)&&(n="buffer");var o=t.objectMode?1:r.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new vO(r,n,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _O(e,t,!1,o,r,n,i);return a}(this,n,e,t,r)),i},wO.prototype.cork=function(){this._writableState.corked++},wO.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||SO(this,e))},wO.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},wO.prototype._write=function(e,t,r){r(new Error("not implemented"))},wO.prototype._writev=null,wO.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&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,CO(e,t),r&&(t.finished?VM(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},sR.inherits(BO,iO);for(var xO=Object.keys(wO.prototype),OO=0;OO<xO.length;OO++){var PO=xO[OO];BO.prototype[PO]||(BO.prototype[PO]=wO.prototype[PO])}function BO(e){if(!(this instanceof BO))return new BO(e);iO.call(this,e),wO.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",IO)}function IO(){this.allowHalfOpen||this._writableState.ended||VM(LO,this)}function LO(e){e.end()}function jO(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!=r&&e.push(r);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function TO(e){if(!(this instanceof TO))return new TO(e);BO.call(this,e),this._transformState=new jO(this);var t=this;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.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){DO(t,e)})):DO(t)}))}function DO(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function NO(e){if(!(this instanceof NO))return new NO(e);TO.call(this,e)}function UO(){aR.call(this)}sR.inherits(TO,BO),TO.prototype.push=function(e,t){return this._transformState.needTransform=!1,BO.prototype.push.call(this,e,t)},TO.prototype._transform=function(e,t,r){throw new Error("Not implemented")},TO.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)}},TO.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},sR.inherits(NO,TO),NO.prototype._transform=function(e,t,r){r(null,e)},sR.inherits(UO,aR),UO.Readable=iO,UO.Writable=wO,UO.Duplex=BO,UO.Transform=TO,UO.PassThrough=NO,UO.Stream=UO,UO.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===aR.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",u),e.on("error",u),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e};var FO=z_(Object.freeze({__proto__:null,default:UO,Readable:iO,Writable:wO,Duplex:BO,Transform:TO,PassThrough:NO,Stream:UO}));const qO=FO;var WO=class extends qO.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(nR(e)){const t=AC.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){}_write(e,t,r){try{if(nR(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return r(new Error("PortDuplexStream - disconnected"))}return r()}},zO=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},VO=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},HO=function(e){this.version=e,this.type="node",this.name="node",this.os=nS.platform},KO=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},YO=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},GO=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},ZO=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,QO=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],JO=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function XO(e){return""!==e&&QO.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]}),!1)}function $O(e){var t=XO(e);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new YO;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=zO(zO([],i,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(3-i.length),!0)):i=[];var o=i.join("."),a=eP(e),s=ZO.exec(e);return s&&s[1]?new KO(r,o,a,s[1]):new VO(r,o,a)}function eP(e){for(var t=0,r=JO.length;t<r;t++){var n=JO[t],i=n[0];if(n[1].exec(e))return i}return null}function tP(){return void 0!==nS&&nS.version?new HO(nS.version.slice(1)):null}var rP=Object.freeze({__proto__:null,BrowserInfo:VO,NodeInfo:HO,SearchBotDeviceInfo:KO,BotInfo:YO,ReactNativeInfo:GO,detect:function(e){return e?$O(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new GO:"undefined"!=typeof navigator?$O(navigator.userAgent):tP()},browserName:function(e){var t=XO(e);return t?t[0]:null},parseUserAgent:$O,detectOS:eP,getNodeVersion:tP}),nP=z_(rP),iP={CHROME_ID:"nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX_ID:"webextension@metamask.io"},oP=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aC,"__esModule",{value:!0});const aP=oP(WO),sP=nP,uP=oP(BM),fP=oP(iP),hP=sP.detect();aC.default=function(){let e;try{const t=function(){switch(null==hP?void 0:hP.name){case"chrome":default:return fP.default.CHROME_ID;case"firefox":return fP.default.FIREFOX_ID}}(),r=chrome.runtime.connect(t),n=new aP.default(r);e=new uP.default(n)}catch(e){throw console.dir("Metamask connect error ",e),e}return e};var cP={},lP={};Object.defineProperty(lP,"__esModule",{value:!0}),lP.default=function(e,t=console){let r=!1,n=!1;if(!window.web3){const i="__isMetaMaskShim__";let o={currentProvider:e};Object.defineProperty(o,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),o=new Proxy(o,{get:(o,a,...s)=>("currentProvider"!==a||r?"currentProvider"===a||a===i||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(o,a,...s)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:o,enumerable:!1,configurable:!0,writable:!0})}};var dP=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cP,"__esModule",{value:!0}),cP.setGlobalProvider=cP.initializeProvider=void 0;const pP=dP(Y_),gP=dP(lP);function bP(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}cP.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:n=100,shouldSendMetadata:i=!0,shouldSetOnWindow:o=!0,shouldShimWeb3:a=!1}){let s=new pP.default(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n,shouldSendMetadata:i});return s=new Proxy(s,{deleteProperty:()=>!0}),o&&bP(s),a&&gP.default(s,r),s},cP.setGlobalProvider=bP,function(e){var t=q_&&q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.createExternalExtensionProvider=e.shimWeb3=e.setGlobalProvider=e.BaseProvider=e.MetaMaskInpageProvider=e.initializeProvider=void 0;const r=t(Y_);e.MetaMaskInpageProvider=r.default;const n=t(aC);e.createExternalExtensionProvider=n.default;const i=t(BM);e.BaseProvider=i.default;const o=cP;Object.defineProperty(e,"initializeProvider",{enumerable:!0,get:function(){return o.initializeProvider}}),Object.defineProperty(e,"setGlobalProvider",{enumerable:!0,get:function(){return o.setGlobalProvider}});const a=t(lP);e.shimWeb3=a.default}(K_);var yP,mP,vP={ethereum:null,initializeProvider:function(e){var t=e.shouldSetOnWindow,r=e.connectionStream,n=e.shouldShimWeb3,i=void 0===n||n;return this.ethereum=K_.initializeProvider({shouldSetOnWindow:t,connectionStream:r,shouldSendMetadata:!1,shouldShimWeb3:i}),this.ethereum}},AP=function(){return"undefined"!=typeof navigator&&parseFloat("".concat((/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},wP=function(){return"wakeLock"in navigator},_P=function(){function e(){this._eventsAdded=!1}return e.prototype.start=function(){var e=this;if(this.enabled=!1,wP()&&!this._eventsAdded){this._eventsAdded=!0,this._wakeLock=null;var t=function(){null!==e._wakeLock&&"visible"===document.visibilityState&&e.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else AP()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","MetaMask SDK - Listening for responses"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64, "),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64, "),this.noSleepVideo.addEventListener("loadedmetadata",(function(){e.noSleepVideo.duration<=1?e.noSleepVideo.setAttribute("loop",""):e.noSleepVideo.addEventListener("timeupdate",(function(){e.noSleepVideo.currentTime>.5&&(e.noSleepVideo.currentTime=Math.random())}))})))},e.prototype._addSourceToVideo=function(e,t,r){var n=document.createElement("source");n.src=r,n.type="video/".concat(t),e.appendChild(n)},Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this.enabled},enumerable:!1,configurable:!0}),e.prototype.enable=function(){var e=this;if(this.enabled&&this.disable(),this.start(),wP())return navigator.wakeLock.request("screen").then((function(t){e._wakeLock=t,e.enabled=!0})).catch((function(){return e.enabled=!1,!1}));if(AP())return this.disable(),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();var t=this.noSleepVideo.play();return this.enabled=!0,t.then((function(){return!0})).catch((function(){return!1}))},e.prototype.disable=function(){if(this.enabled){if(wP())this._wakeLock&&this._wakeLock.release(),this._wakeLock=null;else if(AP())this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null);else try{this.noSleepVideo.firstChild&&(this.noSleepVideo.removeChild(this.noSleepVideo.firstChild),this.noSleepVideo.load()),this.noSleepVideo.pause(),this.noSleepVideo.src=null,this.noSleepVideo.remove()}catch(e){console.log(e)}this.enabled=!1}},e}();!function(e){e.NonBrowser="NonBrowser",e.MetaMaskMobileWebview="MetaMaskMobileWebview",e.DesktopWeb="DesktopWeb",e.MobileWeb="MobileWeb"}(yP||(yP={})),function(e){e.Disabled="Disabled",e.Temporary="Temporary",e.UntilResponse="UntilResponse"}(mP||(mP={}));var MP=function(){var e=vP.ethereum||(null===window||void 0===window?void 0:window.ethereum);return(null==e?void 0:e.isMetaMask)&&(null==e?void 0:e.isConnected())},SP=function(){var e,t,r=H_.parse(window.navigator.userAgent);return"mobile"===(null===(e=null==r?void 0:r.platform)||void 0===e?void 0:e.type)||"tablet"===(null===(t=null==r?void 0:r.platform)||void 0===t?void 0:t.type)},EP=function(){return Boolean(window.ReactNativeWebView)&&Boolean(navigator.userAgent.endsWith("MetaMaskMobile"))},kP=function(){var e;return"undefined"==typeof window||!(null===window||void 0===window?void 0:window.navigator)||"undefined"!=typeof global&&"ReactNative"===(null===(e=null===global||void 0===global?void 0:global.navigator)||void 0===e?void 0:e.product)||"ReactNative"===(null===navigator||void 0===navigator?void 0:navigator.product)},CP={wakeLock:new _P,wakeLockType:mP.Temporary,wakeLockTimer:null,wakeLockFeatureActive:!1,enableWakeLock:function(){var e=this;if(this.wakeLockType!==mP.Disabled){this.wakeLock.enable();var t=this.wakeLockType===mP.Temporary?2e3:2e4;this.wakeLockTimer=setTimeout((function(){e.disableWakeLock()}),t),this.wakeLockFeatureActive||this.WakeLockType!==mP.UntilResponse||(this.wakeLockFeatureActive=!0,window.addEventListener("focus",(function(){return e.disableWakeLock()})))}},disableWakeLock:function(){this.wakeLockType!==mP.Disabled&&(clearTimeout(this.wakeLockTimer),this.wakeLock.disable())},platform:null,useDeeplink:null,preferredOpenLink:null,openDeeplink:function(e,t,r){var n;(this.enableWakeLock(),this.preferredOpenLink)?this.preferredOpenLink(e,r):"undefined"!=typeof window&&(n=CP.useDeeplink?window.open(t,"_blank"):window.open(e,"_blank"),setTimeout((function(){var e;return null===(e=null==n?void 0:n.close)||void 0===e?void 0:e.call(n)}),500))},isMetaMaskInstalled:MP,isMobile:SP,isMetaMaskMobileWebView:EP,isNotBrowser:kP,getPlatform:function(){return this.platform||(this.platform=kP()?yP.NonBrowser:EP()?yP.MetaMaskMobileWebview:SP()?yP.MobileWeb:yP.DesktopWeb),this.platform}};
/*! *****************************************************************************
            Copyright (c) Microsoft Corporation.

            Permission to use, copy, modify, and/or distribute this software for any
            purpose with or without fee is hereby granted.

            THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
            REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
            AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
            INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
            LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
            OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
            PERFORMANCE OF THIS SOFTWARE.
            ***************************************************************************** */
function RP(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function xP(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=a.trys,(i=i.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(e){o=[6,e],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])}}}var OP="INSTALLED",PP="NOT_INSTALLED",BP="REGISTERED",IP="REGISTERING",LP="RELOADING",jP={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},TP="REGISTRATION_IN_PROGRESS",DP="FORWARDER_ID",NP=function(){function e(t){var r=void 0===t?{}:t,n=r.forwarderOrigin,i=void 0===n?"https://fwd.metamask.io":n,o=r.forwarderMode,a=void 0===o?e.FORWARDER_MODE.INJECT:o;this.forwarderOrigin=i,this.forwarderMode=a,this.state=e.isMetaMaskInstalled()?OP:PP;var s=e._detectBrowser();this.downloadUrl=s?jP[s]:jP.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),a===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(TP)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return RP(this,void 0,void 0,(function(){return xP(this,(function(r){switch(r.label){case 0:switch(this.state){case LP:return[3,1];case PP:return[3,2];case OP:return[3,3];case IP:return[3,5];case BP:return[3,6]}return[3,7];case 1:return console.debug("Ignoring message while reloading"),[3,8];case 2:return console.debug("Reloading now to register with MetaMask"),this.state=LP,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=IP,[4,e._register()];case 4:return r.sent(),this.state=BP,t.source.postMessage({type:"metamask:registrationCompleted"},t.origin),this.stopOnboarding(),[3,8];case 5:return console.debug("Already registering - ignoring reload message"),[3,8];case 6:return console.debug("Already registered - ignoring reload message"),[3,8];case 7:this._onMessageUnknownStateError(this.state),r.label=8;case 8:return[2]}}))}))},e.prototype.startOnboarding=function(){sessionStorage.setItem(TP,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(TP)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(TP,"false"))},e.prototype._openForwarder=function(){this.forwarderMode===e.FORWARDER_MODE.OPEN_TAB?window.open(this.forwarderOrigin,"_blank"):e._injectForwarder(this.forwarderOrigin)},e.prototype._openDownloadPage=function(){window.open(this.downloadUrl,"_blank")},e.isMetaMaskInstalled=function(){return Boolean(window.ethereum&&window.ethereum.isMetaMask)},e._register=function(){return window.ethereum.request({method:"wallet_registerOnboarding"})},e._injectForwarder=function(e){var t=document.body,r=document.createElement("iframe");r.setAttribute("height","0"),r.setAttribute("width","0"),r.setAttribute("style","display: none;"),r.setAttribute("src",e),r.setAttribute("id",DP),t.insertBefore(r,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById(DP))||void 0===e||e.remove()},e._detectBrowser=function(){var e=H_.parse(window.navigator.userAgent);return"Firefox"===e.browser.name?"FIREFOX":["Chrome","Chromium"].includes(e.browser.name||"")?"CHROME":null},e.FORWARDER_MODE={INJECT:"INJECT",OPEN_TAB:"OPEN_TAB"},e}(),UP={30:e=>{e.exports=(()=>{var e={192:(e,t)=>{A.stringToBytes=(A.stringToBytesFuncs={default:function(e){for(var t=[],r=0;r<e.length;r+=1){var n=e.charCodeAt(r);t.push(255&n)}return t}}).default,A.createStringToBytes=function(e,t){var r=function(){function r(){var e=n.read();if(-1==e)throw"eof";return e}for(var n=y(e),i=0,o={};;){var a=n.read();if(-1==a)break;var s=r(),u=r()<<8|r();o[String.fromCharCode(a<<8|s)]=u,i+=1}if(i!=t)throw i+" != "+t;return o}(),n="?".charCodeAt(0);return function(e){for(var t=[],i=0;i<e.length;i+=1){var o=e.charCodeAt(i);o<128?t.push(o):"number"==typeof(o=r[e.charAt(i)])?(255&o)==o?t.push(o):(t.push(o>>>8),t.push(255&o)):t.push(n)}return t}},s={L:1,M:0,Q:3,H:2},r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;0<=a(t)-a(n);)t^=n<<a(t)-a(n);return 21522^(e<<10|t)},o.getBCHTypeNumber=function(e){for(var t=e<<12;0<=a(t)-a(i);)t^=i<<a(t)-a(i);return e<<12|t},o.getPatternPosition=function(e){return r[e-1]},o.getMaskFunction=function(e){switch(e){case 0:return function(e,t){return(e+t)%2==0};case 1:return function(e,t){return e%2==0};case 2:return function(e,t){return t%3==0};case 3:return function(e,t){return(e+t)%3==0};case 4:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case 5:return function(e,t){return e*t%2+e*t%3==0};case 6:return function(e,t){return(e*t%2+e*t%3)%2==0};case 7:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},o.getErrorCorrectPolynomial=function(e){for(var t=w([1],0),r=0;r<e;r+=1)t=t.multiply(w([1,f.gexp(r)],0));return t},o.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+e}}},o.getLostPoint=function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n+=1)for(var i=0;i<t;i+=1){for(var o=0,a=e.isDark(n,i),s=-1;s<=1;s+=1)if(!(n+s<0||t<=n+s))for(var u=-1;u<=1;u+=1)i+u<0||t<=i+u||0==s&&0==u||a==e.isDark(n+s,i+u)&&(o+=1);5<o&&(r+=3+o-5)}for(n=0;n<t-1;n+=1)for(i=0;i<t-1;i+=1){var f=0;e.isDark(n,i)&&(f+=1),e.isDark(n+1,i)&&(f+=1),e.isDark(n,i+1)&&(f+=1),e.isDark(n+1,i+1)&&(f+=1),0!=f&&4!=f||(r+=3)}for(n=0;n<t;n+=1)for(i=0;i<t-6;i+=1)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(i=0;i<t;i+=1)for(n=0;n<t-6;n+=1)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);var h=0;for(i=0;i<t;i+=1)for(n=0;n<t;n+=1)e.isDark(n,i)&&(h+=1);return r+Math.abs(100*h/t/t-50)/5*10},u=o,f=function(){for(var e=new Array(256),t=new Array(256),r=0;r<8;r+=1)e[r]=1<<r;for(r=8;r<256;r+=1)e[r]=e[r-4]^e[r-5]^e[r-6]^e[r-8];for(r=0;r<255;r+=1)t[e[r]]=r;return{glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),h=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],c={getRSBlocks:function(e,t){var r=function(e){switch(t){case s.L:return h[4*(e-1)+0];case s.M:return h[4*(e-1)+1];case s.Q:return h[4*(e-1)+2];case s.H:return h[4*(e-1)+3];default:return}}(e);if(void 0===r)throw"bad rs block @ typeNumber:"+e+"/errorCorrectionLevel:"+t;for(var n,i,o=r.length/3,a=[],u=0;u<o;u+=1)for(var f=r[3*u+0],c=r[3*u+1],l=r[3*u+2],d=0;d<f;d+=1)a.push((n=l,(i={}).totalCount=c,i.dataCount=n,i));return a}},l=function(){var e=[],t=0,r={getBuffer:function(){return e},getAt:function(t){var r=Math.floor(t/8);return 1==(e[r]>>>7-t%8&1)},put:function(e,t){for(var n=0;n<t;n+=1)r.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return t},putBit:function(r){var n=Math.floor(t/8);e.length<=n&&e.push(0),r&&(e[n]|=128>>>t%8),t+=1}};return r},d=function(e){var t=e,r=function(e){for(var t=0,r=0;r<e.length;r+=1)t=10*t+n(e.charAt(r));return t},n=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return{getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+2<n.length;)e.put(r(n.substring(i,i+3)),10),i+=3;i<n.length&&(n.length-i==1?e.put(r(n.substring(i,i+1)),4):n.length-i==2&&e.put(r(n.substring(i,i+2)),7))}}},p=function(e){var t=e,r=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return{getMode:function(){return 2},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+1<n.length;)e.put(45*r(n.charAt(i))+r(n.charAt(i+1)),11),i+=2;i<n.length&&e.put(r(n.charAt(i)),6)}}},g=function(e){var t=A.stringToBytes(e);return{getMode:function(){return 4},getLength:function(e){return t.length},write:function(e){for(var r=0;r<t.length;r+=1)e.put(t[r],8)}}},b=function(e){var t=A.stringToBytesFuncs.SJIS;if(!t)throw"sjis not supported.";var r=t("友");if(2!=r.length||38726!=(r[0]<<8|r[1]))throw"sjis not supported.";var n=t(e);return{getMode:function(){return 8},getLength:function(e){return~~(n.length/2)},write:function(e){for(var t=n,r=0;r+1<t.length;){var i=(255&t[r])<<8|255&t[r+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(r+1)+"/"+i;i-=49472}e.put(i=192*(i>>>8&255)+(255&i),13),r+=2}if(r<t.length)throw"illegal char at "+(r+1)}}},y=function(e){var t=e,r=0,n=0,i=0,o=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return{read:function(){for(;i<8;){if(r>=t.length){if(0==i)return-1;throw"unexpected end of file./"+i}var e=t.charAt(r);if(r+=1,"="==e)return i=0,-1;e.match(/^\s$/)||(n=n<<6|o(e.charCodeAt(0)),i+=6)}var a=n>>>i-8&255;return i-=8,a}}},m=function(e,t,r){n=e,i=t,o=new Array(e*t),a=function(e){for(var t=1<<e,r=1+(1<<e),n=e+1,i=s(),a=0;a<t;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(r));e=_();var u,f,h,c=(u=e,h=f=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;8<=f+t;)u.writeByte(255&(e<<f|h)),t-=8-f,e>>>=8-f,f=h=0;h|=e<<f,f+=t},flush:function(){0<f&&u.writeByte(h)}}),l=(c.write(t,n),0),d=String.fromCharCode(o[l]);for(l+=1;l<o.length;){var p=String.fromCharCode(o[l]);l+=1,i.contains(d+p)?d+=p:(c.write(i.indexOf(d),n),i.size()<4095&&(i.size()==1<<n&&(n+=1),i.add(d+p)),d=p)}return c.write(i.indexOf(d),n),c.write(r,n),c.flush(),e.toByteArray()},s=function(){var e={},t=0,r={add:function(n){if(r.contains(n))throw"dup key:"+n;e[n]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return r};for(var n,i,o,a,s,u={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(i),e.writeByte(0);var t=a(2);e.writeByte(2);for(var r=0;255<t.length-r;)e.writeByte(255),e.writeBytes(t,r,255),r+=255;e.writeByte(t.length-r),e.writeBytes(t,r,t.length-r),e.writeByte(0),e.writeString(";")}},f=0;f<t;f+=1)for(var h=0;h<e;h+=1)u.setPixel(h,f,r(h,f));var c=_();u.write(c),p=d=l=0,g="",y=function(e){if(!(e<0)){if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e},(b={}).writeByte=function(e){for(l=l<<8|255&e,d+=8,p+=1;6<=d;)w(l>>>d-6),d-=6},b.flush=function(){if(0<d&&(w(l<<6-d),d=l=0),p%3!=0)for(var e=3-p%3,t=0;t<e;t+=1)g+="="},b.toString=function(){return g};for(var l,d,p,g,b,y,m=b,v=c.toByteArray(),A=0;A<v.length;A+=1)m.writeByte(v[A]);function w(e){g+=String.fromCharCode(y(63&e))}return m.flush(),"data:image/gif;base64,"+m};var r,n,i,o,a,s,u,f,h,c,l,d,p,g,b,y,m,v=A;function A(e,t){function r(e,t){a=function(e){for(var t=new Array(e),r=0;r<e;r+=1){t[r]=new Array(e);for(var n=0;n<e;n+=1)t[r][n]=null}return t}(f=4*i+17),n(0,0),n(f-7,0),n(0,f-7);for(var r=u.getPatternPosition(i),s=0;s<r.length;s+=1)for(var d=0;d<r.length;d+=1){var p=r[s],g=r[d];if(null==a[p][g])for(var b=-2;b<=2;b+=1)for(var m=-2;m<=2;m+=1)a[p+b][g+m]=-2==b||2==b||-2==m||2==m||0==b&&0==m}for(var v=8;v<f-8;v+=1)null==a[v][6]&&(a[v][6]=v%2==0);for(var A=8;A<f-8;A+=1)null==a[6][A]&&(a[6][A]=A%2==0);for(var _=e,M=o<<3|t,S=u.getBCHTypeInfo(M),E=0;E<15;E+=1){var k=!_&&1==(S>>E&1);E<6?a[E][8]=k:E<8?a[E+1][8]=k:a[f-15+E][8]=k}for(E=0;E<15;E+=1)k=!_&&1==(S>>E&1),E<8?a[8][f-E-1]=k:E<9?a[8][15-E-1+1]=k:a[8][15-E-1]=k;if(a[f-8][8]=!_,7<=i){for(var C=e,R=u.getBCHTypeNumber(i),x=0;x<18;x+=1){var O=!C&&1==(R>>x&1);a[Math.floor(x/3)][x%3+f-8-3]=O}for(x=0;x<18;x+=1)O=!C&&1==(R>>x&1),a[x%3+f-8-3][Math.floor(x/3)]=O}for(var P=h=null==h?function(e,t,r){for(var n=c.getRSBlocks(e,t),i=l(),o=0;o<r.length;o+=1){var a=r[o];i.put(a.getMode(),4),i.put(a.getLength(),u.getLengthInBits(a.getMode(),e)),a.write(i)}var s=0;for(o=0;o<n.length;o+=1)s+=n[o].dataCount;if(i.getLengthInBits()>8*s)throw"code length overflow. ("+i.getLengthInBits()+">"+8*s+")";for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*s||(i.put(236,8),i.getLengthInBits()>=8*s));)i.put(17,8);for(var f=i,h=n,d=0,p=0,g=0,b=new Array(h.length),y=new Array(h.length),m=0;m<h.length;m+=1){var v=h[m].dataCount,A=h[m].totalCount-v;p=Math.max(p,v),g=Math.max(g,A),b[m]=new Array(v);for(var _=0;_<b[m].length;_+=1)b[m][_]=255&f.getBuffer()[_+d];d+=v;var M=u.getErrorCorrectPolynomial(A),S=w(b[m],M.getLength()-1).mod(M);for(y[m]=new Array(M.getLength()-1),_=0;_<y[m].length;_+=1){var E=_+S.getLength()-y[m].length;y[m][_]=E>=0?S.getAt(E):0}}var k=0;for(_=0;_<h.length;_+=1)k+=h[_].totalCount;var C=new Array(k),R=0;for(_=0;_<p;_+=1)for(m=0;m<h.length;m+=1)_<b[m].length&&(C[R]=b[m][_],R+=1);for(_=0;_<g;_+=1)for(m=0;m<h.length;m+=1)_<y[m].length&&(C[R]=y[m][_],R+=1);return C}(i,o,y):h,B=(M=t,-1),I=f-1,L=7,j=0,T=u.getMaskFunction(M),D=f-1;0<D;D-=2)for(6==D&&--D;;){for(var N,U=0;U<2;U+=1)null==a[I][D-U]&&(N=!1,j<P.length&&(N=1==(P[j]>>>L&1)),T(I,D-U)&&(N=!N),a[I][D-U]=N,-1==--L&&(j+=1,L=7));if((I+=B)<0||f<=I){I-=B,B=-B;break}}}function n(e,t){for(var r=-1;r<=7;r+=1)if(!(e+r<=-1||f<=e+r))for(var n=-1;n<=7;n+=1)t+n<=-1||f<=t+n||(a[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)}var i=e,o=s[t],a=null,f=0,h=null,y=[],v={},A=(v.addData=function(e,t){var r=null;switch(t=t||"Byte"){case"Numeric":r=d(e);break;case"Alphanumeric":r=p(e);break;case"Byte":r=g(e);break;case"Kanji":r=b(e);break;default:throw"mode:"+t}y.push(r),h=null},v.isDark=function(e,t){if(e<0||f<=e||t<0||f<=t)throw e+","+t;return a[e][t]},v.getModuleCount=function(){return f},v.make=function(){if(i<1){for(var e=1;e<40;e++){for(var t=c.getRSBlocks(e,o),n=l(),a=0;a<y.length;a++){var s=y[a];n.put(s.getMode(),4),n.put(s.getLength(),u.getLengthInBits(s.getMode(),e)),s.write(n)}var f=0;for(a=0;a<t.length;a++)f+=t[a].dataCount;if(n.getLengthInBits()<=8*f)break}i=e}r(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){r(!0,n);var i=u.getLostPoint(v);(0==n||i<e)&&(e=i,t=n)}return t}())},v.createTableTag=function(e,t){e=e||2;for(var r=(r=(r=(r="")+'<table style=" border-width: 0px; border-style: none;')+" border-collapse: collapse; padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;")+'"><tbody>',n=0;n<v.getModuleCount();n+=1){r+="<tr>";for(var i=0;i<v.getModuleCount();i+=1)r=(r=(r=(r=(r=(r+='<td style="')+" border-width: 0px; border-style: none; border-collapse: collapse;")+" padding: 0px; margin: 0px; width: "+e+"px;")+" height: "+e+"px; background-color: ")+(v.isDark(n,i)?"#000000":"#ffffff"))+';"/>';r+="</tr>"}return r+"</tbody></table>"},v.createSvgTag=function(e,t,r,n){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,r=i.alt,n=i.title),e=e||2,t=void 0===t?4*e:t,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;for(var o,a,s=v.getModuleCount()*e+2*t,u="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",f=(f=(f=(f=(f=(f=(f="")+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg"'+(i.scalable?"":' width="'+s+'px" height="'+s+'px"'))+' viewBox="0 0 '+s+" "+s+'"  preserveAspectRatio="xMinYMin meet"')+(n.text||r.text?' role="img" aria-labelledby="'+A([n.id,r.id].join(" ").trim())+'"':"")+">")+(n.text?'<title id="'+A(n.id)+'">'+A(n.text)+"</title>":""))+(r.text?'<description id="'+A(r.id)+'">'+A(r.text)+"</description>":""))+'<rect width="100%" height="100%" fill="white" cx="0" cy="0"/><path d="',h=0;h<v.getModuleCount();h+=1)for(a=h*e+t,o=0;o<v.getModuleCount();o+=1)v.isDark(h,o)&&(f+="M"+(o*e+t)+","+a+u);return f+'" stroke="transparent" fill="black"/></svg>'},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var r=v.getModuleCount()*e+2*t,n=t,i=r-t;return m(r,r,(function(t,r){return n<=t&&t<i&&n<=r&&r<i?(t=Math.floor((t-n)/e),r=Math.floor((r-n)/e),v.isDark(r,t)?0:1):1}))},v.createImgTag=function(e,t,r){e=e||2,t=void 0===t?4*e:t;var n=v.getModuleCount()*e+2*t,i=(i=(i=(i=(i=(i="")+'<img src="')+v.createDataURL(e,t)+'"')+' width="'+n)+'" height="')+n+'"';return(i=r?(i+=' alt="')+A(r)+'"':i)+"/>"},function(e){for(var t="",r=0;r<e.length;r+=1){var n=e.charAt(r);switch(n){case"<":t+="&lt;";break;case">":t+="&gt;";break;case"&":t+="&amp;";break;case'"':t+="&quot;";break;default:t+=n}}return t});return v.createASCII=function(e,t){if((e=e||1)<2){var r=t;r=void 0===r?2:r;for(var n,i,o,a,s=+v.getModuleCount()+2*r,u=r,f=s-r,h={"██":"█","█ ":"▀"," █":"▄","  ":" "},c={"██":"▀","█ ":"▀"," █":" ","  ":" "},l="",d=0;d<s;d+=2){for(i=Math.floor(d-u),o=Math.floor(d+1-u),n=0;n<s;n+=1)a="█",u<=n&&n<f&&u<=d&&d<f&&v.isDark(i,Math.floor(n-u))&&(a=" "),u<=n&&n<f&&u<=d+1&&d+1<f&&v.isDark(o,Math.floor(n-u))?a+=" ":a+="█",l+=(r<1&&f<=d+1?c:h)[a];l+="\n"}return s%2&&0<r?l.substring(0,l.length-s-1)+Array(1+s).join("▀"):l.substring(0,l.length-1)}--e,t=void 0===t?2*e:t;for(var p,g,b,y=v.getModuleCount()*e+2*t,m=t,A=y-t,w=Array(e+1).join("██"),_=Array(e+1).join("  "),M="",S="",E=0;E<y;E+=1){for(g=Math.floor((E-m)/e),S="",p=0;p<y;p+=1)b=1,S+=(b=m<=p&&p<A&&m<=E&&E<A&&v.isDark(g,Math.floor((p-m)/e))?0:b)?w:_;for(g=0;g<e;g+=1)M+=S+"\n"}return M.substring(0,M.length-1)},v.renderTo2dContext=function(e,t){t=t||2;for(var r=v.getModuleCount(),n=0;n<r;n++)for(var i=0;i<r;i++)e.fillStyle=v.isDark(n,i)?"black":"white",e.fillRect(n*t,i*t,t,t)},v}function w(e,t){if(void 0===e.length)throw e.length+"/"+t;var r=function(){for(var r=0;r<e.length&&0==e[r];)r+=1;for(var n=new Array(e.length-r+t),i=0;i<e.length-r;i+=1)n[i]=e[i+r];return n}(),n={getAt:function(e){return r[e]},getLength:function(){return r.length},multiply:function(e){for(var t=new Array(n.getLength()+e.getLength()-1),r=0;r<n.getLength();r+=1)for(var i=0;i<e.getLength();i+=1)t[r+i]^=f.gexp(f.glog(n.getAt(r))+f.glog(e.getAt(i)));return w(t,0)},mod:function(e){if(n.getLength()-e.getLength()<0)return n;for(var t=f.glog(n.getAt(0))-f.glog(e.getAt(0)),r=new Array(n.getLength()),i=0;i<n.getLength();i+=1)r[i]=n.getAt(i);for(i=0;i<e.getLength();i+=1)r[i]^=f.gexp(f.glog(e.getAt(i))+t);return w(r,0).mod(e)}};return n}function _(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,r,n){r=r||0,n=n||e.length;for(var i=0;i<n;i+=1)t.writeByte(e[i+r])},writeString:function(e){for(var r=0;r<e.length;r+=1)t.writeByte(e.charCodeAt(r))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var r=0;r<e.length;r+=1)0<r&&(t+=","),t+=e[r];return t+"]"}};return t}v.stringToBytesFuncs["UTF-8"]=function(e){for(var t=e,r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||57344<=i?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r},void 0!==(t="function"==typeof(o=function(){return v})?o.apply(t,[]):o)&&(e.exports=t)},676:(e,t,r)=>{r.d(t,{default:()=>T});var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},o=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)};function a(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!t.length)return e;var s=t.shift();return void 0!==s&&o(e)&&o(s)?(e=n({},e),Object.keys(s).forEach((function(t){var r=e[t],n=s[t];Array.isArray(r)&&Array.isArray(n)||!o(r)||!o(n)?e[t]=n:e[t]=a(Object.assign({},r),n)})),a.apply(void 0,i([e],t))):e}function s(e,t){var r=document.createElement("a");r.download=t,r.href=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function u(e){return t=this,n=function(){return r=this,n=function(t){return[2,new Promise((function(t){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.open("GET",e),r.responseType="blob",r.send()}))]},s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function t(e){return function(t){var u=[e,t];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(a=2&u[0]?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,(u=a?[2&u[0],a.value]:u)[0]){case 0:case 1:a=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((a=0<(a=s.trys).length&&a[a.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){s.label=u[1];break}if(6===u[0]&&s.label<a[1]){s.label=a[1],a=u;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(u);break}a[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(r,s)}catch(t){u=[6,t],o=0}finally{i=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var r,n,i,o,a,s,u},r=void 0,new(r=Promise)((function(e,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r((function(e){e(n)}))).then(o,a)}s((n=n.apply(t,[])).next())}));var t,r,n}const f={L:.07,M:.15,Q:.25,H:.3};var h=function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};l.prototype.draw=function(e,t,r,n){var i;switch(this._type){case"dots":i=this._drawDot;break;case"classy":i=this._drawClassy;break;case"classy-rounded":i=this._drawClassyRounded;break;case"rounded":i=this._drawRounded;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawSquare}i.call(this,{x:e,y:t,size:r,getNeighbor:n})},l.prototype._rotateFigure=function(e){var t=e.x,r=e.y,n=e.size,i=void 0===(i=e.rotation)?0:i;t+=n/2,r+=n/2;(0,e.draw)(),null!=(n=this._element)&&n.setAttribute("transform","rotate("+180*i/Math.PI+","+t+","+r+")")},l.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(n+r/2)),t._element.setAttribute("cy",String(i+r/2)),t._element.setAttribute("r",String(r/2))}}))},l.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(n)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(r)),t._element.setAttribute("height",String(r))}}))},l.prototype._basicSideRounded=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, 0 "+-r)}}))},l.prototype._basicCornerRounded=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},l.prototype._basicCornerExtraRounded=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"a "+r+" "+r+", 0, 0, 0, "+-r+" "+-r)}}))},l.prototype._basicCornersRounded=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+i+"v "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+r/2+" "+r/2+"h "+r/2+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},l.prototype._drawDot=function(e){var t=e.x,r=e.y;e=e.size;this._basicDot({x:t,y:r,size:e,rotation:0})},l.prototype._drawSquare=function(e){var t=e.x,r=e.y;e=e.size;this._basicSquare({x:t,y:r,size:e,rotation:0})},l.prototype._drawRounded=function(e){var t,r=e.x,n=e.y,i=e.size,o=(e=e.getNeighbor)?+e(-1,0):0,a=e?+e(1,0):0,s=e?+e(0,-1):0,u=o+a+s+(e=e?+e(0,1):0);if(0!=u){if(!(2<u||o&&a||s&&e))return 2==u?(t=0,o&&s?t=Math.PI/2:s&&a?t=Math.PI:a&&e&&(t=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:t})):1==u?(t=0,s?t=Math.PI/2:a?t=Math.PI:e&&(t=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:t})):void 0;this._basicSquare({x:r,y:n,size:i,rotation:0})}else this._basicDot({x:r,y:n,size:i,rotation:0})},l.prototype._drawExtraRounded=function(e){var t,r=e.x,n=e.y,i=e.size,o=(e=e.getNeighbor)?+e(-1,0):0,a=e?+e(1,0):0,s=e?+e(0,-1):0,u=o+a+s+(e=e?+e(0,1):0);if(0!=u){if(!(2<u||o&&a||s&&e))return 2==u?(t=0,o&&s?t=Math.PI/2:s&&a?t=Math.PI:a&&e&&(t=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:t})):1==u?(t=0,s?t=Math.PI/2:a?t=Math.PI:e&&(t=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:t})):void 0;this._basicSquare({x:r,y:n,size:i,rotation:0})}else this._basicDot({x:r,y:n,size:i,rotation:0})},l.prototype._drawClassy=function(e){var t=e.x,r=e.y,n=e.size,i=(e=e.getNeighbor)?+e(-1,0):0,o=e?+e(1,0):0,a=e?+e(0,-1):0;0!=i+o+a+(e=e?+e(0,1):0)?i||a?o||e?this._basicSquare({x:t,y:r,size:n,rotation:0}):this._basicCornerRounded({x:t,y:r,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:t,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:n,rotation:Math.PI/2})},l.prototype._drawClassyRounded=function(e){var t=e.x,r=e.y,n=e.size,i=(e=e.getNeighbor)?+e(-1,0):0,o=e?+e(1,0):0,a=e?+e(0,-1):0;0!=i+o+a+(e=e?+e(0,1):0)?i||a?o||e?this._basicSquare({x:t,y:r,size:n,rotation:0}):this._basicCornerExtraRounded({x:t,y:r,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:t,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:n,rotation:Math.PI/2})};const c=l;function l(e){var t=e.svg;e=e.type;this._svg=t,this._type=e}var d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};g.prototype.draw=function(e,t,r,n){var i;switch(this._type){case"square":i=this._drawSquare;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawDot}i.call(this,{x:e,y:t,size:r,rotation:n})},g.prototype._rotateFigure=function(e){var t=e.x,r=e.y,n=e.size,i=void 0===(i=e.rotation)?0:i;t+=n/2,r+=n/2;(0,e.draw)(),null!=(n=this._element)&&n.setAttribute("transform","rotate("+180*i/Math.PI+","+t+","+r+")")},g.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,i=e.y,o=r/7;this._rotateFigure(d(d({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+(n+r/2)+" "+i+"a "+r/2+" "+r/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(r/2-o)+" "+(r/2-o)+" 0 1 1 -0.1 0Z")}}))},g.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,i=e.y,o=r/7;this._rotateFigure(d(d({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r+"zM "+(n+o)+" "+(i+o)+"h "+(r-2*o)+"v "+(r-2*o)+"h "+(2*o-r)+"z")}}))},g.prototype._basicExtraRounded=function(e){var t=this,r=e.size,n=e.x,i=e.y,o=r/7;this._rotateFigure(d(d({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},g.prototype._drawDot=function(e){var t=e.x,r=e.y,n=e.size;e=e.rotation;this._basicDot({x:t,y:r,size:n,rotation:e})},g.prototype._drawSquare=function(e){var t=e.x,r=e.y,n=e.size;e=e.rotation;this._basicSquare({x:t,y:r,size:n,rotation:e})},g.prototype._drawExtraRounded=function(e){var t=e.x,r=e.y,n=e.size;e=e.rotation;this._basicExtraRounded({x:t,y:r,size:n,rotation:e})};const p=g;function g(e){var t=e.svg;e=e.type;this._svg=t,this._type=e}var b=function(){return(b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};v.prototype.draw=function(e,t,r,n){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:e,y:t,size:r,rotation:n})},v.prototype._rotateFigure=function(e){var t=e.x,r=e.y,n=e.size,i=void 0===(i=e.rotation)?0:i;t+=n/2,r+=n/2;(0,e.draw)(),null!=(n=this._element)&&n.setAttribute("transform","rotate("+180*i/Math.PI+","+t+","+r+")")},v.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(b(b({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(n+r/2)),t._element.setAttribute("cy",String(i+r/2)),t._element.setAttribute("r",String(r/2))}}))},v.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,i=e.y;this._rotateFigure(b(b({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(n)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(r)),t._element.setAttribute("height",String(r))}}))},v.prototype._drawDot=function(e){var t=e.x,r=e.y,n=e.size;e=e.rotation;this._basicDot({x:t,y:r,size:n,rotation:e})},v.prototype._drawSquare=function(e){var t=e.x,r=e.y,n=e.size;e=e.rotation;this._basicSquare({x:t,y:r,size:n,rotation:e})};const y=v,m="circle";function v(e){var t=e.svg;e=e.type;this._svg=t,this._type=e}function A(e,t,r,n){return new(r=r||Promise)((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function w(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a={next:s(0),throw:s(1),return:s(2)};return"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,(u=i?[2&u[0],i.value]:u)[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((i=0<(i=o.trys).length&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(s){u=[6,s],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var _=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];Object.defineProperty(k.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),k.prototype.getElement=function(){return this._element},k.prototype.drawQR=function(e){return A(this,void 0,void 0,(function(){var t,r,n,i,o,a=this;return w(this,(function(s){switch(s.label){case 0:return t=e.getModuleCount(),r=Math.min(this._options.width,this._options.height)-2*this._options.margin,r=this._options.shape===m?r/Math.sqrt(2):r,r=Math.floor(r/t),n={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=e,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];o=this._options,i=o.imageOptions,o=o.qrOptions,i=i.imageSize*f[o.errorCorrectionLevel],o=Math.floor(i*t*t),n=function(e){var t=e.originalHeight,r=e.originalWidth,n=e.maxHiddenDots,i=e.maxHiddenAxisDots,o=(e=e.dotSize,{x:0,y:0}),a={x:0,y:0};return t<=0||r<=0||n<=0||e<=0?{height:0,width:0,hideYDots:0,hideXDots:0}:(t/=r,o.x=Math.floor(Math.sqrt(n/t)),o.x<=0&&(o.x=1),i&&i<o.x&&(o.x=i),o.x%2==0&&o.x--,a.x=o.x*e,o.y=1+2*Math.ceil((o.x*t-1)/2),a.y=Math.round(a.x*t),(o.y*o.x>n||i&&i<o.y)&&(i&&i<o.y?(o.y=i,o.y%2==0&&o.x--):o.y-=2,a.y=o.y*e,o.x=1+2*Math.ceil((o.y/t-1)/2),a.x=Math.round(a.y/t)),{height:a.y,width:a.x,hideYDots:o.y,hideXDots:o.x})}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:o,maxHiddenAxisDots:t-14,dotSize:r}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(e,r){var i;return!(a._options.imageOptions.hideBackgroundDots&&e>=(t-n.hideXDots)/2&&e<(t+n.hideXDots)/2&&r>=(t-n.hideYDots)/2&&r<(t+n.hideYDots)/2||null!=(i=_[e])&&i[r]||null!=(i=_[e-t+7])&&i[r]||null!=(i=_[e])&&i[r-t+7]||null!=(i=M[e])&&i[r]||null!=(i=M[e-t+7])&&i[r]||null!=(i=M[e])&&i[r-t+7])})),this.drawCorners(),this._options.image?[4,this.drawImage({width:n.width,height:n.height,count:t,dotSize:r})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},k.prototype.drawBackground=function(){var e,t=this._element,r=this._options;t&&(t=null==(t=r.backgroundOptions)?void 0:t.gradient,e=null==(e=r.backgroundOptions)?void 0:e.color,(t||e)&&this._createColor({options:t,color:e,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"background-color"}),null!=(t=r.backgroundOptions)&&t.round&&(e=Math.min(r.width,r.height),t=document.createElementNS("http://www.w3.org/2000/svg","rect"),this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),t.setAttribute("x",String((r.width-e)/2)),t.setAttribute("y",String((r.height-e)/2)),t.setAttribute("width",String(e)),t.setAttribute("height",String(e)),t.setAttribute("rx",String(e/2*r.backgroundOptions.round)),this._backgroundClipPath.appendChild(t)))},k.prototype.drawDots=function(e){var t,r=this;if(!this._qr)throw"QR code is not defined";var n=this._options,i=this._qr.getModuleCount();if(i>n.width||i>n.height)throw"The canvas is too small.";var o=Math.min(n.width,n.height)-2*n.margin,a=n.shape===m?o/Math.sqrt(2):o,s=Math.floor(a/i),u=Math.floor((n.width-i*s)/2),f=Math.floor((n.height-i*s)/2),h=new c({svg:this._element,type:n.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null==(a=n.dotsOptions)?void 0:a.gradient,color:n.dotsOptions.color,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:"dot-color"});for(var l=this,d=0;d<i;d++)!function(n){for(var o=0;o<i;o++)!function(o){(!e||e(n,o))&&null!=(t=l._qr)&&t.isDark(n,o)&&(h.draw(u+n*s,f+o*s,s,(function(t,a){return!(n+t<0||o+a<0||i<=n+t||i<=o+a)&&!(e&&!e(n+t,o+a))&&!!r._qr&&r._qr.isDark(n+t,o+a)})),h._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(h._element))}(o)}(d);if(n.shape===m){var p=Math.floor((o/s-i)/2),g=i+2*p,b=u-p*s,y=f-p*s,v=[],A=Math.floor(g/2);for(d=0;d<g;d++){v[d]=[];for(var w=0;w<g;w++)p-1<=d&&d<=g-p&&p-1<=w&&w<=g-p||Math.sqrt((d-A)*(d-A)+(w-A)*(w-A))>A?v[d][w]=0:v[d][w]=this._qr.isDark(w-2*p<0?w:i<=w?w-2*p:w-p,d-2*p<0?d:i<=d?d-2*p:d-p)?1:0}var _=function(e){for(var t=0;t<g;t++)!function(t){v[e][t]&&(h.draw(b+e*s,y+t*s,s,(function(r,n){return!(null==(r=v[e+r])||!r[t+n])})),h._element&&M._dotsClipPath&&M._dotsClipPath.appendChild(h._element))}(t)},M=this;for(d=0;d<g;d++)_(d)}},k.prototype.drawCorners=function(){var e=this;if(!this._qr)throw"QR code is not defined";var t=this._element,r=this._options;if(!t)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=(t=Math.min(r.width,r.height)-2*r.margin,t=r.shape===m?t/Math.sqrt(2):t,Math.floor(t/n)),o=7*i,a=3*i,s=Math.floor((r.width-n*i)/2),u=Math.floor((r.height-n*i)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(t){var f,h,l=t[0],d=t[1],g=(t=t[2],s+l*i*(n-7)),b=u+d*i*(n-7),m=e._dotsClipPath,v=e._dotsClipPath;if((null!=(A=r.cornersSquareOptions)&&A.gradient||null!=(A=r.cornersSquareOptions)&&A.color)&&((m=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+l+"-"+d),e._defs.appendChild(m),e._cornersSquareClipPath=e._cornersDotClipPath=v=m,e._createColor({options:null==(A=r.cornersSquareOptions)?void 0:A.gradient,color:null==(A=r.cornersSquareOptions)?void 0:A.color,additionalRotation:t,x:g,y:b,height:o,width:o,name:"corners-square-color-"+l+"-"+d})),null!=(A=r.cornersSquareOptions)&&A.type){var A=new p({svg:e._element,type:r.cornersSquareOptions.type});A.draw(g,b,o,t),A._element&&m&&m.appendChild(A._element)}else for(var w=new c({svg:e._element,type:r.dotsOptions.type}),S=0;S<_.length;S++)!function(e){for(var t=0;t<_[e].length;t++)!function(t){null!=(f=_[e])&&f[t]&&(w.draw(g+e*i,b+t*i,i,(function(r,n){return!(null==(r=_[e+r])||!r[t+n])})),w._element&&m&&m.appendChild(w._element))}(t)}(S);if((null!=(A=r.cornersDotOptions)&&A.gradient||null!=(A=r.cornersDotOptions)&&A.color)&&((v=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+l+"-"+d),e._defs.appendChild(v),e._cornersDotClipPath=v,e._createColor({options:null==(A=r.cornersDotOptions)?void 0:A.gradient,color:null==(A=r.cornersDotOptions)?void 0:A.color,additionalRotation:t,x:g+2*i,y:b+2*i,height:a,width:a,name:"corners-dot-color-"+l+"-"+d})),null!=(A=r.cornersDotOptions)&&A.type)(l=new y({svg:e._element,type:r.cornersDotOptions.type})).draw(g+2*i,b+2*i,a,t),l._element&&v&&v.appendChild(l._element);else{w=new c({svg:e._element,type:r.dotsOptions.type});var E=function(e){for(var t=0;t<M[e].length;t++)!function(t){null!=(h=M[e])&&h[t]&&(w.draw(g+e*i,b+t*i,i,(function(r,n){return!(null==(r=M[e+r])||!r[t+n])})),w._element&&v&&v.appendChild(w._element))}(t)};for(S=0;S<M.length;S++)E(S)}}))},k.prototype.loadImage=function(){var e=this;return new Promise((function(t,r){var n=e._options,i=new Image;if(!n.image)return r("Image is not defined");"string"==typeof n.imageOptions.crossOrigin&&(i.crossOrigin=n.imageOptions.crossOrigin),(e._image=i).onload=function(){t()},i.src=n.image}))},k.prototype.drawImage=function(e){var t=e.width,r=e.height,n=e.count,i=e.dotSize;return A(this,void 0,void 0,(function(){var e,o,a,s,f,h;return w(this,(function(c){switch(c.label){case 0:return e=this._options,h=Math.floor((e.width-n*i)/2),o=Math.floor((e.height-n*i)/2),h=h+e.imageOptions.margin+(n*i-t)/2,o=o+e.imageOptions.margin+(n*i-r)/2,a=t-2*e.imageOptions.margin,s=r-2*e.imageOptions.margin,(f=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(h)),f.setAttribute("y",String(o)),f.setAttribute("width",a+"px"),f.setAttribute("height",s+"px"),[4,u(e.image||"")];case 1:return h=c.sent(),f.setAttribute("href",h||""),this._element.appendChild(f),[2]}}))}))},k.prototype._createColor=function(e){var t,r,n,i=e.options,o=e.color,a=e.additionalRotation,s=e.x,u=e.y,f=e.height,h=e.width,c=(e=e.name,f<h?h:f),l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.setAttribute("x",String(s)),l.setAttribute("y",String(u)),l.setAttribute("height",String(f)),l.setAttribute("width",String(h)),l.setAttribute("clip-path","url('#clip-path-"+e+"')"),i?("radial"===i.type?((t=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",e),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("fx",String(s+h/2)),t.setAttribute("fy",String(u+f/2)),t.setAttribute("cx",String(s+h/2)),t.setAttribute("cy",String(u+f/2)),t.setAttribute("r",String(c/2))):(s=c=s+h/2,n=u+=f/2,0<=(r=((a=((i.rotation||0)+a)%(2*Math.PI))+2*Math.PI)%(2*Math.PI))&&r<=.25*Math.PI||r>1.75*Math.PI&&r<=2*Math.PI?(c-=h/2,u-=f/2*Math.tan(a),s+=h/2,n+=f/2*Math.tan(a)):r>.25*Math.PI&&r<=.75*Math.PI?(u-=f/2,c-=h/2/Math.tan(a),n+=f/2,s+=h/2/Math.tan(a)):r>.75*Math.PI&&r<=1.25*Math.PI?(c+=h/2,u+=f/2*Math.tan(a),s-=h/2,n-=f/2*Math.tan(a)):r>1.25*Math.PI&&r<=1.75*Math.PI&&(u+=f/2,c+=h/2/Math.tan(a),n-=f/2,s-=h/2/Math.tan(a)),(t=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",e),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("x1",String(Math.round(c))),t.setAttribute("y1",String(Math.round(u))),t.setAttribute("x2",String(Math.round(s))),t.setAttribute("y2",String(Math.round(n)))),i.colorStops.forEach((function(e){var r=e.offset,n=(e=e.color,document.createElementNS("http://www.w3.org/2000/svg","stop"));n.setAttribute("offset",100*r+"%"),n.setAttribute("stop-color",e),t.appendChild(n)})),l.setAttribute("fill","url('#"+e+"')"),this._defs.appendChild(t)):o&&l.setAttribute("fill",o),this._element.appendChild(l)};const S=k,E="canvas";function k(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=e}for(var C={},R=0;R<=40;R++)C[R]=R;const x={type:E,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:C[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var O=function(){return(O=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function P(e){if((e=O({},e)).colorStops&&e.colorStops.length)return e.rotation?e.rotation=Number(e.rotation):e.rotation=0,e.colorStops=e.colorStops.map((function(e){return O(O({},e),{offset:Number(e.offset)})})),e;throw"Field 'colorStops' is required in gradient"}function B(e){return(e=O({},e)).width=Number(e.width),e.height=Number(e.height),e.margin=Number(e.margin),e.imageOptions=O(O({},e.imageOptions),{hideBackgroundDots:Boolean(e.imageOptions.hideBackgroundDots),imageSize:Number(e.imageOptions.imageSize),margin:Number(e.imageOptions.margin)}),e.margin>Math.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=O({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=P(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=O({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=P(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=O({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=P(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=O({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=P(e.backgroundOptions.gradient))),e}function I(e,t,r,n){return new(r=r||Promise)((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function L(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a={next:s(0),throw:s(1),return:s(2)};return"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,(u=i?[2&u[0],i.value]:u)[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((i=0<(i=o.trys).length&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(s){u=[6,s],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}t=r(192);var j=r.n(t);D._clearContainer=function(e){e&&(e.innerHTML="")},D.prototype._setupSvg=function(){var e,t=this;this._qr&&(e=new S(this._options),this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then((function(){var r;t._svg&&null!=(r=t._extension)&&r.call(t,e.getElement(),t._options)})))},D.prototype._setupCanvas=function(){var e,t=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null==(e=this._svgDrawingPromise)?void 0:e.then((function(){var e,r,n;if(t._svg)return e=t._svg,e=(new XMLSerializer).serializeToString(e),r="data:image/svg+xml;base64,"+btoa(e),n=new Image,new Promise((function(e){n.onload=function(){var r;null!=(r=null==(r=t._canvas)?void 0:r.getContext("2d"))&&r.drawImage(n,0,0),e()},n.src=r}))})))},D.prototype._getElement=function(e){return void 0===e&&(e="png"),I(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:if(this._qr)return"svg"!==e.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);throw"QR code is empty";case 1:return t.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return t.sent(),[2,this._canvas]}}))}))},D.prototype.update=function(e){D._clearContainer(this._container),this._options=e?B(a(this._options,e)):this._options,this._options.data&&(this._qr=j()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===E?this._setupCanvas():this._setupSvg(),this.append(this._container))},D.prototype.append=function(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===E?this._canvas&&e.appendChild(this._canvas):this._svg&&e.appendChild(this._svg),this._container=e}},D.prototype.applyExtension=function(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()},D.prototype.deleteExtension=function(){this._extension=void 0,this.update()},D.prototype.getRawData=function(e){return void 0===e&&(e="png"),I(this,void 0,void 0,(function(){var t,r;return L(this,(function(n){switch(n.label){case 0:if(this._qr)return[4,this._getElement(e)];throw"QR code is empty";case 1:return(t=n.sent())?"svg"===e.toLowerCase()?(r=(r=new XMLSerializer).serializeToString(t),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+r],{type:"image/svg+xml"})]):[2,new Promise((function(r){return t.toBlob(r,"image/"+e,1)}))]:[2,null]}}))}))},D.prototype.download=function(e){return I(this,void 0,void 0,(function(){var t,r,n,i;return L(this,(function(o){switch(o.label){case 0:if(this._qr)return t="png",r="qr","string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(r=e.name),e.extension&&(t=e.extension)),[4,this._getElement(t)];throw"QR code is empty";case 1:return(n=o.sent())&&("svg"===t.toLowerCase()?(i='<?xml version="1.0" standalone="no"?>\r\n'+(i=new XMLSerializer).serializeToString(n),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),r+".svg")):s(n.toDataURL("image/"+t),r+"."+t)),[2]}}))}))};const T=D;function D(e){this._options=e?B(a(x,e)):x,this.update()}}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r(676)})().default},38:(e,t,r)=>{r.d(t,{Z:()=>st});var n,i,o={},a=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(e,t){for(var r in t)e[r]=t[r];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,r){var n,i,o,a=arguments,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(3<arguments.length)for(r=[r],o=3;o<arguments.length;o++)r.push(a[o]);if(null!=r&&(s.children=r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return c(e,s,n,i,null)}function c(e,t,r,i,o){return e={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o},null!=n.vnode&&n.vnode(e),e}function l(e){return e.children}function d(e,t){this.props=e,this.context=t}function p(e,t){if(null==t)return e.__?p(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?p(e):null}function g(e){(!e.__d&&(e.__d=!0)&&I.push(e)&&!b.__r++||i!==n.debounceRendering)&&((i=n.debounceRendering)||L)(b)}function b(){for(var e;b.__r=I.length;)e=I.sort((function(e,t){return e.__v.__b-t.__v.__b})),I=[],e.some((function(e){var t,r,n,i,o;e.__d&&(i=(n=e.__v).__e,(o=e.__P)&&(t=[],(r=u({},n)).__v=n.__v+1,S(o,n,r,e.__n,void 0!==o.ownerSVGElement,null!=n.__h?[i]:null,t,null==i?p(n):i,n.__h),E(t,n),n.__e!=i&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(n)))}))}function y(e,t,r,i,s,u,h,d,g,b){var y,m,A,w,_,M,E,C=i&&i.__k||a,R=C.length;for(r.__k=[],y=0;y<t.length;y++)if(null!=(w=r.__k[y]=null==(w=t[y])||"boolean"==typeof w?null:"string"==typeof w||"number"==typeof w||"bigint"==typeof w?c(null,w,null,null,w):Array.isArray(w)?c(l,{children:w},null,null,null):0<w.__b?c(w.type,w.props,w.key,null,w.__v):w)){if(w.__=r,w.__b=r.__b+1,null===(A=C[y])||A&&w.key==A.key&&w.type===A.type)C[y]=void 0;else for(m=0;m<R;m++){if((A=C[m])&&w.key==A.key&&w.type===A.type){C[m]=void 0;break}A=null}S(e,w,A=A||o,s,u,h,d,g,b),_=w.__e,(m=w.ref)&&A.ref!=m&&(E=E||[],A.ref&&E.push(A.ref,null,w),E.push(m,w.__c||_,w)),null!=_?(null==M&&(M=_),"function"==typeof w.type&&null!=w.__k&&w.__k===A.__k?w.__d=g=function e(t,r,n){var i,o;for(i=0;i<t.__k.length;i++)(o=t.__k[i])&&(o.__=t,r="function"==typeof o.type?e(o,r,n):v(n,o,o,t.__k,o.__e,r));return r}(w,g,e):g=v(e,w,A,C,_,g),b||"option"!==r.type?"function"==typeof r.type&&(r.__d=g):e.value=""):g&&A.__e==g&&g.parentNode!=e&&(g=p(A))}for(r.__e=M,y=R;y--;)null!=C[y]&&("function"==typeof r.type&&null!=C[y].__e&&C[y].__e==r.__d&&(r.__d=p(i,y+1)),function e(t,r,i){var o,a,s;if(n.unmount&&n.unmount(t),!(o=t.ref)||o.current&&o.current!==t.__e||k(o,null,r),i||"function"==typeof t.type||(i=null!=(a=t.__e)),t.__e=t.__d=void 0,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){n.__e(t,r)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&e(o[s],r,i);null!=a&&f(a)}(C[y],C[y]));if(E)for(y=0;y<E.length;y++)k(E[y],E[++y],E[++y])}function m(e,t){return t=t||[],null!=e&&"boolean"!=typeof e&&(Array.isArray(e)?e.some((function(e){m(e,t)})):t.push(e)),t}function v(e,t,r,n,i,o){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==r||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<n.length;u+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function A(e,t,r){"-"===t[0]?e.setProperty(t,r):e[t]=null==r?"":"number"!=typeof r||s.test(t)?r:r+"px"}function w(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||A(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||A(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=(t.toLowerCase()in e?t.toLowerCase():t).slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?M:_,o):e.removeEventListener(t,o?M:_,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"!=typeof r&&(null!=r&&(!1!==r||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,r):e.removeAttribute(t))}}function _(e){this.l[e.type+!1](n.event?n.event(e):e)}function M(e){this.l[e.type+!0](n.event?n.event(e):e)}function S(e,t,r,i,s,h,c,p,g){var b,m,v,A,_,M,S,E,k,R,x,O=t.type;if(void 0===t.constructor){null!=r.__h&&(g=r.__h,p=t.__e=r.__e,t.__h=null,h=[p]),(b=n.__b)&&b(t);try{e:if("function"==typeof O){if(E=t.props,k=(b=O.contextType)&&i[b.__c],R=b?k?k.props.value:b.__:i,r.__c?S=(m=t.__c=r.__c).__=m.__E:("prototype"in O&&O.prototype.render?t.__c=m=new O(E,R):(t.__c=m=new d(E,R),m.constructor=O,m.render=C),k&&k.sub(m),m.props=E,m.state||(m.state={}),m.context=R,m.__n=i,v=m.__d=!0,m.__h=[]),null==m.__s&&(m.__s=m.state),null!=O.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=u({},m.__s)),u(m.__s,O.getDerivedStateFromProps(E,m.__s))),A=m.props,_=m.state,v)null==O.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(null==O.getDerivedStateFromProps&&E!==A&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(E,R),!m.__e&&null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(E,m.__s,R)||t.__v===r.__v){m.props=E,m.state=m.__s,t.__v!==r.__v&&(m.__d=!1),(m.__v=t).__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),m.__h.length&&c.push(m);break e}null!=m.componentWillUpdate&&m.componentWillUpdate(E,m.__s,R),null!=m.componentDidUpdate&&m.__h.push((function(){m.componentDidUpdate(A,_,M)}))}m.context=R,m.props=E,m.state=m.__s,(b=n.__r)&&b(t),m.__d=!1,m.__v=t,m.__P=e,b=m.render(m.props,m.state,m.context),m.state=m.__s,null!=m.getChildContext&&(i=u(u({},i),m.getChildContext())),v||null==m.getSnapshotBeforeUpdate||(M=m.getSnapshotBeforeUpdate(A,_)),x=null!=b&&b.type===l&&null==b.key?b.props.children:b,y(e,Array.isArray(x)?x:[x],t,r,i,s,h,c,p,g),m.base=t.__e,t.__h=null,m.__h.length&&c.push(m),S&&(m.__E=m.__=null),m.__e=!1}else null==h&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,s,u,h){var c,l,d,p,g=r.props,b=t.props,m=t.type,v=0;if("svg"===m&&(i=!0),null!=s)for(;v<s.length;v++)if((c=s[v])&&(c===e||(m?c.localName==m:3==c.nodeType))){e=c,s[v]=null;break}if(null==e){if(null===m)return document.createTextNode(b);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,b.is&&b),s=null,h=!1}if(null===m)g===b||h&&e.data===b||(e.data=b);else{if(s=s&&a.slice.call(e.childNodes),l=(g=r.props||o).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!h){if(null!=s)for(g={},p=0;p<e.attributes.length;p++)g[e.attributes[p].name]=e.attributes[p].value;!d&&!l||d&&(l&&d.__html==l.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||"")}if(function(e,t,r,n,i){for(var o in r)"children"===o||"key"===o||o in t||w(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||w(e,o,t[o],r[o],n)}(e,b,g,i,h),d)t.__k=[];else if(v=t.props.children,y(e,Array.isArray(v)?v:[v],t,r,n,i&&"foreignObject"!==m,s,u,e.firstChild,h),null!=s)for(v=s.length;v--;)null!=s[v]&&f(s[v]);h||("value"in b&&void 0!==(v=b.value)&&(v!==e.value||"progress"===m&&!v)&&w(e,"value",v,g.value,!1),"checked"in b&&void 0!==(v=b.checked)&&v!==e.checked&&w(e,"checked",v,g.checked,!1))}return e}(r.__e,t,r,i,s,h,c,g);(b=n.diffed)&&b(t)}catch(e){t.__v=null,!g&&null==h||(t.__e=p,t.__h=!!g,h[h.indexOf(p)]=null),n.__e(e,t,r)}}}function E(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function k(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,r)}}function C(e,t,r){return this.constructor(e,r)}function R(e,t,r){var i,s,u;n.__&&n.__(e,t),s=(i="function"==typeof r)?null:r&&r.__k||t.__k,u=[],S(t,e=(!i&&r||t).__k=h(l,null,[e]),s||o,o,void 0!==t.ownerSVGElement,!i&&r?[r]:!s&&t.firstChild?a.slice.call(t.childNodes):null,u,!i&&r?r:s?s.__e:t.firstChild,i),E(u,e)}function x(e,t){return e={__c:t="__cC"+j++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],((n={})[t]=this).getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some(g)},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}},e.Provider.__=e.Consumer.contextType=e}n={__e:function(e,t){for(var r,n,i;t=t.__;)if((r=t.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(e)),i=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e),i=r.__d),i)return r.__E=r}catch(t){e=t}throw e},__v:0},d.prototype.setState=function(e,t){var r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state);(e="function"==typeof e?e(u({},r),this.props):e)&&u(r,e),null!=e&&this.__v&&(t&&this.__h.push(t),g(this))},d.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},d.prototype.render=l;var O,P,B,I=[],L="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j=b.__r=0,T=0,D=[],N=n.__b,U=n.__r,F=n.diffed,q=n.__c,W=n.unmount;function z(e,t){return n.__h&&n.__h(P,e,T||t),T=0,e>=(t=P.__H||(P.__H={__:[],__h:[]})).__.length&&t.__.push({}),t.__[e]}function V(e){return T=1,function(e,t,r){var n=z(O++,2);return n.t=e,n.__c||(n.__=[r?r(t):X(void 0,t),function(e){e=n.t(n.__[0],e),n.__[0]!==e&&(n.__=[e,n.__[1]],n.__c.setState({}))}],n.__c=P),n.__}(X,e)}function H(e,t){var r=z(O++,3);!n.__s&&J(r.__H,t)&&(r.__=e,r.__H=t,P.__H.__h.push(r))}function K(e){return T=5,function(e,t){var r=z(O++,7);return J(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}((function(){return{current:e}}),[])}function Y(){D.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(Z),e.__H.__h.forEach(Q),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),D=[]}n.__b=function(e){P=null,N&&N(e)},n.__r=function(e){U&&U(e),O=0,(e=(P=e.__c).__H)&&(e.__h.forEach(Z),e.__h.forEach(Q),e.__h=[])},n.diffed=function(e){F&&F(e),(e=e.__c)&&e.__H&&e.__H.__h.length&&(1!==D.push(e)&&B===n.requestAnimationFrame||((B=n.requestAnimationFrame)||function(e){function t(){clearTimeout(n),G&&cancelAnimationFrame(r),setTimeout(e)}var r,n=setTimeout(t,100);G&&(r=requestAnimationFrame(t))})(Y)),P=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Z),e.__h=e.__h.filter((function(e){return!e.__||Q(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),q&&q(e,t)},n.unmount=function(e){W&&W(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Z)}catch(e){n.__e(e,t.__v)}};var G="function"==typeof requestAnimationFrame;function Z(e){var t=P;"function"==typeof e.__c&&e.__c(),P=t}function Q(e){var t=P;e.__c=e.__(),P=t}function J(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function X(e,t){return"function"==typeof t?t(e):t}function $(){return h("svg",{width:"273",height:"51",viewBox:"0 0 273 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M240.882 25.9263C239.472 24.997 237.916 24.3361 236.443 23.5101C235.489 22.9731 234.473 22.4982 233.643 21.8167C232.233 20.6602 232.524 18.3885 233.996 17.3973C236.112 15.993 239.617 16.7777 239.99 19.6483C239.99 19.7102 240.052 19.7515 240.114 19.7515H243.308C243.391 19.7515 243.454 19.6896 243.433 19.607C243.267 17.6244 242.5 15.9723 241.089 14.9191C239.741 13.9072 238.206 13.3702 236.568 13.3702C228.127 13.3702 227.359 22.271 231.901 25.0796C232.42 25.41 236.879 27.6404 238.455 28.611C240.032 29.5816 240.529 31.3576 239.845 32.7619C239.223 34.0423 237.605 34.9303 235.987 34.8271C234.224 34.7238 232.855 33.7738 232.378 32.2869C232.295 32.0185 232.254 31.5022 232.254 31.275C232.254 31.2131 232.192 31.1511 232.129 31.1511H228.666C228.604 31.1511 228.541 31.2131 228.541 31.275C228.541 33.7738 229.164 35.1575 230.864 36.4172C232.461 37.615 234.203 38.1106 236.008 38.1106C240.737 38.1106 243.184 35.4466 243.682 32.6793C244.117 29.974 243.308 27.5371 240.882 25.9263Z",fill:"#24292E"}),h("path",{d:"M90.4943 13.8246H88.9595H87.2795C87.2173 13.8246 87.1758 13.8659 87.1551 13.9072L84.3137 23.2416C84.2722 23.3655 84.1063 23.3655 84.0648 23.2416L81.2234 13.9072C81.2026 13.8452 81.1612 13.8246 81.0989 13.8246H79.419H77.8842H75.8102C75.748 13.8246 75.6857 13.8865 75.6857 13.9485V37.7802C75.6857 37.8422 75.748 37.9041 75.8102 37.9041H79.2738C79.336 37.9041 79.3982 37.8422 79.3982 37.7802V19.6689C79.3982 19.5244 79.6056 19.5037 79.6471 19.6276L82.5093 29.024L82.7167 29.6849C82.7374 29.7468 82.7789 29.7675 82.8411 29.7675H85.4959C85.5581 29.7675 85.5996 29.7262 85.6203 29.6849L85.8277 29.024L88.6899 19.6276C88.7313 19.4831 88.9387 19.5244 88.9387 19.6689V37.7802C88.9387 37.8422 89.001 37.9041 89.0632 37.9041H92.5268C92.589 37.9041 92.6513 37.8422 92.6513 37.7802V13.9485C92.6513 13.8865 92.589 13.8246 92.5268 13.8246H90.4943Z",fill:"#24292E"}),h("path",{d:"M187.849 13.8246C187.787 13.8246 187.745 13.8659 187.725 13.9072L184.883 23.2416C184.842 23.3655 184.676 23.3655 184.634 23.2416L181.793 13.9072C181.772 13.8452 181.731 13.8246 181.668 13.8246H176.4C176.338 13.8246 176.276 13.8865 176.276 13.9485V37.7802C176.276 37.8422 176.338 37.9041 176.4 37.9041H179.864C179.926 37.9041 179.988 37.8422 179.988 37.7802V19.6689C179.988 19.5244 180.196 19.5037 180.237 19.6276L183.099 29.024L183.307 29.6849C183.328 29.7468 183.369 29.7675 183.431 29.7675H186.086C186.148 29.7675 186.19 29.7262 186.211 29.6849L186.418 29.024L189.28 19.6276C189.322 19.4831 189.529 19.5244 189.529 19.6689V37.7802C189.529 37.8422 189.591 37.9041 189.653 37.9041H193.117C193.179 37.9041 193.241 37.8422 193.241 37.7802V13.9485C193.241 13.8865 193.179 13.8246 193.117 13.8246H187.849Z",fill:"#24292E"}),h("path",{d:"M143.174 13.8246H136.724H133.261H126.81C126.748 13.8246 126.686 13.8865 126.686 13.9485V16.9223C126.686 16.9843 126.748 17.0462 126.81 17.0462H133.136V37.7802C133.136 37.8422 133.198 37.9041 133.261 37.9041H136.724C136.786 37.9041 136.849 37.8422 136.849 37.7802V17.0462H143.174C143.237 17.0462 143.299 16.9843 143.299 16.9223V13.9485C143.299 13.8865 143.257 13.8246 143.174 13.8246Z",fill:"#24292E"}),h("path",{d:"M163.604 37.9041H166.756C166.839 37.9041 166.901 37.8215 166.881 37.7389L160.368 13.8245C160.347 13.7626 160.306 13.7419 160.244 13.7419H159.041H156.925H155.722C155.66 13.7419 155.619 13.7832 155.598 13.8245L149.085 37.7389C149.065 37.8215 149.127 37.9041 149.21 37.9041H152.362C152.425 37.9041 152.466 37.8628 152.487 37.8215L154.374 30.862C154.395 30.8 154.436 30.7794 154.499 30.7794H161.467C161.53 30.7794 161.571 30.8207 161.592 30.862L163.479 37.8215C163.5 37.8628 163.562 37.9041 163.604 37.9041ZM155.328 27.3719L157.859 18.0581C157.9 17.9342 158.066 17.9342 158.107 18.0581L160.638 27.3719C160.659 27.4545 160.596 27.5371 160.513 27.5371H155.453C155.37 27.5371 155.308 27.4545 155.328 27.3719Z",fill:"#24292E"}),h("path",{d:"M217.362 37.9041H220.515C220.598 37.9041 220.66 37.8215 220.639 37.7389L214.127 13.8245C214.106 13.7626 214.065 13.7419 214.002 13.7419H212.8H210.684H209.481C209.419 13.7419 209.377 13.7832 209.357 13.8245L202.844 37.7389C202.823 37.8215 202.886 37.9041 202.969 37.9041H206.121C206.183 37.9041 206.225 37.8628 206.246 37.8215L208.133 30.862C208.154 30.8 208.195 30.7794 208.257 30.7794H215.226C215.288 30.7794 215.33 30.8207 215.351 30.862L217.238 37.8215C217.259 37.8628 217.3 37.9041 217.362 37.9041ZM209.087 27.3719L211.617 18.0581C211.659 17.9342 211.825 17.9342 211.866 18.0581L214.397 27.3719C214.417 27.4545 214.355 27.5371 214.272 27.5371H209.211C209.129 27.5371 209.066 27.4545 209.087 27.3719Z",fill:"#24292E"}),h("path",{d:"M106.713 34.3727V26.9795C106.713 26.9176 106.775 26.8556 106.837 26.8556H116.067C116.129 26.8556 116.191 26.7936 116.191 26.7317V23.7579C116.191 23.6959 116.129 23.634 116.067 23.634H106.837C106.775 23.634 106.713 23.572 106.713 23.5101V17.1907C106.713 17.1288 106.775 17.0668 106.837 17.0668H117.332C117.394 17.0668 117.457 17.0049 117.457 16.9429V13.9691C117.457 13.9072 117.394 13.8452 117.332 13.8452H106.713H103.125C103.063 13.8452 103.001 13.9072 103.001 13.9691V17.0668V23.6546V26.8763V34.5173V37.7802C103.001 37.8422 103.063 37.9041 103.125 37.9041H106.713H117.768C117.83 37.9041 117.892 37.8422 117.892 37.7802V34.6412C117.892 34.5792 117.83 34.5173 117.768 34.5173H106.817C106.755 34.4966 106.713 34.4553 106.713 34.3727Z",fill:"#24292E"}),h("path",{d:"M272.532 37.6976L260.544 25.3687C260.502 25.3274 260.502 25.2448 260.544 25.2035L271.329 14.0517C271.412 13.9691 271.349 13.8452 271.246 13.8452H266.828C266.787 13.8452 266.766 13.8659 266.745 13.8865L257.599 23.3449C257.516 23.4275 257.391 23.3655 257.391 23.2623V13.9691C257.391 13.9072 257.329 13.8452 257.267 13.8452H253.803C253.741 13.8452 253.679 13.9072 253.679 13.9691V37.8009C253.679 37.8628 253.741 37.9248 253.803 37.9248H257.267C257.329 37.9248 257.391 37.8628 257.391 37.8009V27.3099C257.391 27.2067 257.536 27.1447 257.599 27.2273L267.969 37.8835C267.989 37.9041 268.031 37.9248 268.052 37.9248H272.469C272.552 37.9041 272.615 37.7596 272.532 37.6976Z",fill:"#24292E"}),h("path",{d:"M52.021 1L31.0526 16.4886L34.9517 7.36063L52.021 1Z",fill:"#E17726",stroke:"#E17726","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M3.65491 1L24.4366 16.6331L20.7241 7.36063L3.65491 1Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M44.4716 36.9127L38.8925 45.4211L50.8389 48.7047L54.261 37.0986L44.4716 36.9127Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M1.43555 37.0986L4.83695 48.7047L16.7626 45.4211L11.2042 36.9127L1.43555 37.0986Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M16.1197 22.5395L12.8013 27.5371L24.6232 28.074L24.2292 15.3734L16.1197 22.5395Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M39.5561 22.5394L31.3222 15.2288L31.0526 28.0739L42.8746 27.537L39.5561 22.5394Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M16.7626 45.4212L23.918 41.9724L17.7582 37.1813L16.7626 45.4212Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M31.7578 41.9724L38.8925 45.4212L37.9177 37.1813L31.7578 41.9724Z",fill:"#E27625",stroke:"#E27625","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M38.8923 45.4212L31.7577 41.9724L32.3384 46.5983L32.2762 48.5602L38.8923 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M16.7625 45.4212L23.3994 48.5602L23.3579 46.5983L23.9179 41.9724L16.7625 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M23.5239 34.1249L17.5922 32.3902L21.7818 30.4696L23.5239 34.1249Z",fill:"#233447",stroke:"#233447","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M32.1517 34.1249L33.8939 30.4696L38.1042 32.3902L32.1517 34.1249Z",fill:"#233447",stroke:"#233447","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M16.7626 45.4212L17.7996 36.9128L11.2042 37.0987L16.7626 45.4212Z",fill:"#CC6228",stroke:"#CC6228","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M37.8761 36.9128L38.8924 45.4212L44.4715 37.0987L37.8761 36.9128Z",fill:"#CC6228",stroke:"#CC6228","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M42.8745 27.5371L31.0526 28.074L32.1518 34.1249L33.894 30.4696L38.1042 32.3902L42.8745 27.5371Z",fill:"#CC6228",stroke:"#CC6228","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M17.5922 32.3902L21.7817 30.4696L23.5239 34.1249L24.6232 28.074L12.8012 27.5371L17.5922 32.3902Z",fill:"#CC6228",stroke:"#CC6228","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M12.8013 27.5371L17.7582 37.1813L17.5923 32.3902L12.8013 27.5371Z",fill:"#E27525",stroke:"#E27525","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M38.1044 32.3902L37.9177 37.1813L42.8746 27.5371L38.1044 32.3902Z",fill:"#E27525",stroke:"#E27525","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M24.6232 28.0741L23.524 34.125L24.9136 41.2703L25.2247 31.8533L24.6232 28.0741Z",fill:"#E27525",stroke:"#E27525","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M31.0526 28.0741L30.4719 31.8327L30.7623 41.2703L32.1519 34.125L31.0526 28.0741Z",fill:"#E27525",stroke:"#E27525","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M32.1519 34.1249L30.7623 41.2702L31.7578 41.9724L37.9177 37.1813L38.1043 32.3901L32.1519 34.1249Z",fill:"#F5841F",stroke:"#F5841F","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M17.5922 32.3901L17.7581 37.1813L23.918 41.9724L24.9135 41.2702L23.5239 34.1249L17.5922 32.3901Z",fill:"#F5841F",stroke:"#F5841F","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M32.2763 48.5602L32.3385 46.5983L31.7993 46.1439H23.8765L23.358 46.5983L23.3995 48.5602L16.7626 45.4211L19.0855 47.3211L23.7935 50.5633H31.8615L36.5903 47.3211L38.8924 45.4211L32.2763 48.5602Z",fill:"#C0AC9D",stroke:"#C0AC9D","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M31.7578 41.9724L30.7622 41.2703H24.9135L23.918 41.9724L23.358 46.5983L23.8765 46.144H31.7993L32.3385 46.5983L31.7578 41.9724Z",fill:"#24292E",stroke:"#24292E","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M52.9128 17.5005L54.6757 8.95079L52.021 1L31.7578 15.9723L39.5561 22.5394L50.5692 25.7404L52.9958 22.9111L51.938 22.147L53.618 20.6188L52.3321 19.6276L54.0121 18.3472L52.9128 17.5005Z",fill:"#763E1A",stroke:"#763E1A","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M1 8.95079L2.78366 17.5005L1.64295 18.3472L3.34365 19.6276L2.05775 20.6188L3.73771 22.147L2.67996 22.9111L5.10657 25.7404L16.1196 22.5394L23.918 15.9723L3.65475 1L1 8.95079Z",fill:"#763E1A",stroke:"#763E1A","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M50.5692 25.7404L39.5561 22.5394L42.8746 27.5371L37.9177 37.1813L44.4716 37.0987H54.261L50.5692 25.7404Z",fill:"#F5841F",stroke:"#F5841F","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M16.1196 22.5394L5.10651 25.7404L1.43549 37.0987H11.2041L17.7581 37.1813L12.8011 27.5371L16.1196 22.5394Z",fill:"#F5841F",stroke:"#F5841F","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M31.0526 28.0741L31.7578 15.9724L34.9518 7.36072H20.7239L23.9179 15.9724L24.6231 28.0741L24.8927 31.8739L24.9135 41.2703H30.7622L30.783 31.8739L31.0526 28.0741Z",fill:"#F5841F",stroke:"#F5841F","stroke-width":"0.5","stroke-linecap":"round","stroke-linejoin":"round"}))}function ee(){return h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M16.28 7.53V6.28C16.28 3.58 15.63 0 10 0C4.37 0 3.72 3.58 3.72 6.28V7.53C0.92 7.88 0 9.3 0 12.79V14.65C0 18.75 1.25 20 5.35 20H14.65C18.75 20 20 18.75 20 14.65V12.79C20 9.3 19.08 7.88 16.28 7.53ZM10 16.74C8.33 16.74 6.98 15.38 6.98 13.72C6.98 12.05 8.34 10.7 10 10.7C11.66 10.7 13.02 12.06 13.02 13.72C13.02 15.39 11.67 16.74 10 16.74ZM5.35 7.44C5.27 7.44 5.2 7.44 5.12 7.44V6.28C5.12 3.35 5.95 1.4 10 1.4C14.05 1.4 14.88 3.35 14.88 6.28V7.45C14.8 7.45 14.73 7.45 14.65 7.45H5.35V7.44Z",fill:"#037DD6"}))}function te(){return h("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M20.0002 7.9702V10.0302C20.0002 10.5802 19.5602 11.0302 19.0002 11.0502H17.0402C15.9602 11.0502 14.9702 10.2602 14.8802 9.1802C14.8202 8.5502 15.0602 7.9602 15.4802 7.5502C15.8502 7.1702 16.3602 6.9502 16.9202 6.9502H19.0002C19.5602 6.9702 20.0002 7.4202 20.0002 7.9702Z",fill:"#037DD6"}),h("path",{d:"M18.47 12.55H17.04C15.14 12.55 13.54 11.12 13.38 9.3C13.29 8.26 13.67 7.22 14.43 6.48C15.07 5.82 15.96 5.45 16.92 5.45H18.47C18.76 5.45 19 5.21 18.97 4.92C18.75 2.49 17.14 0.83 14.75 0.55C14.51 0.51 14.26 0.5 14 0.5H5C4.72 0.5 4.45 0.52 4.19 0.56C1.64 0.88 0 2.78 0 5.5V12.5C0 15.26 2.24 17.5 5 17.5H14C16.8 17.5 18.73 15.75 18.97 13.08C19 12.79 18.76 12.55 18.47 12.55ZM11 6.75H5C4.59 6.75 4.25 6.41 4.25 6C4.25 5.59 4.59 5.25 5 5.25H11C11.41 5.25 11.75 5.59 11.75 6C11.75 6.41 11.41 6.75 11 6.75Z",fill:"#037DD6"}))}function re(){return h("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M14.44 0.0999756C12.63 0.0999756 11.01 0.979976 10 2.32998C8.99 0.979976 7.37 0.0999756 5.56 0.0999756C2.49 0.0999756 0 2.59998 0 5.68998C0 6.87998 0.19 7.97998 0.52 8.99998C2.1 14 6.97 16.99 9.38 17.81C9.72 17.93 10.28 17.93 10.62 17.81C13.03 16.99 17.9 14 19.48 8.99998C19.81 7.97998 20 6.87998 20 5.68998C20 2.59998 17.51 0.0999756 14.44 0.0999756Z",fill:"#037DD6"}))}const ne={flexContainer:{display:"flex",justifyContent:"center",alignItems:"center"},flexItem:{flex:1,justifyContent:"center",alignItems:"center"},flexItem11:{flex:11,justifyContent:"center",alignItems:"center"},flexItem1:{flex:1,justifyContent:"center",alignItems:"center"},tab:{padding:8,cursor:"pointer",backgroundColor:"#F2F4F6",fontSize:12,textAlign:"center",color:"#24292E"},tabcontainer:{padding:"4px",backgroundColor:"#F2F4F6",borderRadius:"8px",marginBottom:30,marginTop:30},tabactive:{backgroundColor:"white",WebkitTransition:"background-color 300ms linear",msTransition:"background-color 300ms linear",transition:"background-color 300ms linear",borderRadius:"8px"},item:{fontSize:"12px",marginBottom:16,borderRadius:"8px",padding:"10px",border:"2px #F2F4F6 solid",color:"#24292E"},button:{marginTop:"41.5px",marginBottom:"20px",width:"100%",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"12px 20px",background:"#037DD6",borderRadius:"32px",color:"white",border:"0",fontSize:"14px",cursor:"pointer"},backdrop:{visibility:"visible",position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",zIndex:99998,background:"rgba(0, 0, 0, 0.87)",opacity:.3},modal:{visibility:"visible",position:"fixed",left:"50%",transform:"translate(-50%, -50%)",zIndex:99999,background:"#fff",padding:"20px",borderRadius:"8px",top:"50%",maxWidth:"100%",width:460,minWidth:300,boxShadow:"rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px","-webkit-font-smoothing":"antialiased"},closeButton:{color:"#BBC0C5",cursor:"pointer"},closeButtonContainer:{textAlign:"right"},logoContainer:{textAlign:"center",marginHorizontal:24,marginTop:24,display:"flex",alignItems:"center",justifyContent:"center"},connectMobileText:{fontSize:14,color:"black",marginTop:28,marginBottom:28,lineHeight:2},blue:{color:"#037DD6",fontWeight:700},installExtensionText:{marginLeft:10},center:{display:"flex",alignItems:"center",justifyContent:"center"},right:{display:"flex",alignItems:"center",justifyContent:"right"}};var ie=function(){return(ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function oe(e){var t=e.Icon;e=e.text;return h("div",{style:ie({padding:6},ne.flexContainer)},h("div",{style:ne.flexItem1},h(t,null)),h("div",{style:ne.flexItem11},h("span",{style:{lineHeight:"2"}},e)))}t=r(30);var ae=r.n(t);function se(){return h("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("rect",{width:"16",height:"16",fill:"white"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.40554 2.40554C2.94627 1.86482 3.82296 1.86482 4.36369 2.40554L8 6.04186L11.6363 2.40554C12.177 1.86482 13.0537 1.86482 13.5945 2.40554C14.1352 2.94627 14.1352 3.82296 13.5945 4.36369L9.95814 8L13.5945 11.6363C14.1352 12.177 14.1352 13.0537 13.5945 13.5945C13.0537 14.1352 12.177 14.1352 11.6363 13.5945L8 9.95814L4.36369 13.5945C3.82296 14.1352 2.94627 14.1352 2.40554 13.5945C1.86482 13.0537 1.86482 12.177 2.40554 11.6363L6.04186 8L2.40554 4.36369C1.86482 3.82296 1.86482 2.94627 2.40554 2.40554Z",fill:"#BBC0C5"}))}function ue(){return h("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M16.4405 8.8999C20.0405 9.2099 21.5105 11.0599 21.5105 15.1099V15.2399C21.5105 19.7099 19.7205 21.4999 15.2505 21.4999H8.74047C4.27047 21.4999 2.48047 19.7099 2.48047 15.2399V15.1099C2.48047 11.0899 3.93047 9.2399 7.47047 8.9099",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M12 2V14.88",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),h("path",{d:"M15.3504 12.6499L12.0004 15.9999L8.65039 12.6499",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}(new d).isPureReactComponent=!0;var fe=n.__b,he=(n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),fe&&fe(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911);var ce=n.__e,le=(n.__e=function(e,t,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t);ce(e,t,r)},n.unmount);function de(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}n.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),le&&le(e)},(new d).__c=function(e,t){function r(){a||(a=!0,n.__R=null,o?o(s):s())}var n=t.__c,i=this,o=(null==i.t&&(i.t=[]),i.t.push(n),de(i.__v)),a=!1,s=(n.__R=r,function(){var e,t;if(!--i.__u)for(i.state.__e&&(e=i.state.__e,i.__v.__k[0]=function e(t,r,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,r,n)})),t.__c&&t.__c.__P===r&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}(e,e.__c.__P,e.__c.__O)),i.setState({__e:i.__b=null});t=i.t.pop();)t.forceUpdate()});t=!0===t.__h;i.__u++||t||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(r,r)},(new d).__e=function(e){var t=this,r=de(t.__v),n=t.o.get(e);return n[0]++,function(i){function o(){t.props.revealOrder?(n.push(i),function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;3<r.length;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}}(t,e,n)):i()}r?r(o):o()}};var pe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ge=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;d.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(d.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var be=n.event;function ye(){}function me(){return this.cancelBubble}function ve(){return this.defaultPrevented}n.event=function(e){return(e=be?be(e):e).persist=ye,e.isPropagationStopped=me,e.isDefaultPrevented=ve,e.nativeEvent=e};var Ae={configurable:!0,get:function(){return this.class}},we=n.vnode,_e=(n.vnode=function(e){var t,r=e.type,n=e.props,i=n;if("string"==typeof r){for(var o in i={},n){var a=n[o];"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+r)&&(t=n.type,!("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t))?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():ge.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),i[o]=a)}"select"==r&&i.multiple&&Array.isArray(i.value)&&(i.value=m(n.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==r&&null!=i.defaultValue&&(i.value=m(n.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),e.props=i}r&&n.class!=n.className&&(Ae.enumerable="className"in n,null!=n.className&&(i.class=n.className),Object.defineProperty(i,"className",Ae)),e.$$typeof=pe,we&&we(e)},n.__r);n.__r=function(e){_e&&_e(e),e.__c},"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance);var Me=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&(r=this,(t=document.createElement("style")).setAttribute("data-emotion",r.key),void 0!==r.nonce&&t.setAttribute("nonce",r.nonce),t.appendChild(document.createTextNode("")),r=t,t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(r,t),this.tags.push(r));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{var n=105===e.charCodeAt(1)&&64===e.charCodeAt(0);r.insertRule(e,n?0:r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();const Se=function(e){function t(e,t,n){var i=t.trim().split(p),o=(t=i).length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=r(e,t[s],n).trim();break;default:var u=s=0;for(t=[];s<o;++s)for(var f=0;f<a;++f)t[u++]=r(e[f]+" ",i[s],n).trim()}return t}function r(e,t,r){var n=t.charCodeAt(0);switch(n=n<33?(t=t.trim()).charCodeAt(0):n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<+r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,r,o){var a,s=e+";",u=2*t+3*r+4*o;if(944==u)return e=s.indexOf(":",9)+1,a=s.substring(e,s.length-1).trim(),a=s.substring(0,e).trim()+a+";",1===x||2===x&&i(a,1)?"-webkit-"+a+a:a;if(0===x||2===x&&!i(s,1))return s;switch(u){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(E,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(a=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+a+s;case 1005:return l.test(s)?s.replace(c,":-webkit-")+s.replace(c,":-moz-")+s:s;case 1e3:switch(t=(a=s.substring(13).trim()).indexOf("-")+1,a.charCodeAt(0)+a.charCodeAt(t)){case 226:a=s.replace(v,"tb");break;case 232:a=s.replace(v,"tb-rl");break;case 220:a=s.replace(v,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+a+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,u=(a=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|a.charCodeAt(7))){case 203:if(a.charCodeAt(8)<111)break;case 115:s=s.replace(a,"-webkit-"+a)+";"+s;break;case 207:case 102:s=s.replace(a,"-webkit-"+(102<u?"inline-":"")+"box")+";"+s.replace(a,"-webkit-"+a)+";"+s.replace(a,"-ms-"+a+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return a=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+a+"-ms-flex-"+a+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(_,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(_,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(a=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,r,o).replace(":fill-available",":stretch"):s.replace(a,"-webkit-"+a)+s.replace(a,"-moz-"+a.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===r+o&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+s}return s}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);r=e.substring(r+1,e.length-1);return I(2!==t?n:n.replace(M,"$1"),r,t)}function o(e,t){var r=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,r,n,i,o,a,s,f,h){for(var c,l=0,d=t;l<B;++l)switch(c=P[l].call(u,e,d,r,n,i,o,a,s,f,h)){case void 0:case!1:case!0:case null:break;default:d=c}if(d!==t)return d}function s(e){return void 0!==(e=e.prefix)&&(I=null,e?"function"!=typeof e?x=1:(x=2,I=e):x=0),s}function u(e,r){e=[e=e.charCodeAt(0)<33?e.trim():e],0<B&&void 0!==(s=a(-1,r,e,e,C,k,0,0,0,0))&&"string"==typeof s&&(r=s);var s;r=function e(r,s,u,c,l){for(var d,p,g,v,w,_=0,M=0,S=0,E=0,P=0,I=0,j=g=d=0,T=0,D=0,N=0,U=0,F=u.length,q=F-1,W="",z="",V="",H="";T<F;){if(p=u.charCodeAt(T),T===q&&0!==M+E+S+_&&(0!==M&&(p=47===M?10:47),E=S=_=0,F++,q++),0===M+E+S+_){if(T===q&&0<(W=0<D?W.replace(h,""):W).trim().length){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:W+=u.charAt(T)}p=59}switch(p){case 123:for(d=(W=W.trim()).charCodeAt(0),g=1,U=++T;T<F;){switch(p=u.charCodeAt(T)){case 123:g++;break;case 125:g--;break;case 47:switch(p=u.charCodeAt(T+1)){case 42:case 47:e:{for(j=T+1;j<q;++j)switch(u.charCodeAt(j)){case 47:if(42!==p||42!==u.charCodeAt(j-1)||T+2===j)break;T=j+1;break e;case 10:if(47===p){T=j+1;break e}}T=j}}break;case 91:p++;case 40:p++;case 34:case 39:for(;T++<q&&u.charCodeAt(T)!==p;);}if(0===g)break;T++}if(g=u.substring(U,T),64===(d=0===d?(W=W.replace(f,"").trim()).charCodeAt(0):d)){switch(p=(W=0<D?W.replace(h,""):W).charCodeAt(1)){case 100:case 109:case 115:case 45:D=s;break;default:D=O}if(U=(g=e(s,D,g,p,l+1)).length,0<B&&(w=a(3,g,D=t(O,W,N),s,C,k,U,p,l,c),W=D.join(""),void 0!==w&&0===(U=(g=w.trim()).length)&&(p=0,g="")),0<U)switch(p){case 115:W=W.replace(A,o);case 100:case 109:case 45:g=W+"{"+g+"}";break;case 107:g=(W=W.replace(b,"$1 $2"))+"{"+g+"}",g=1===x||2===x&&i("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=W+g,112===c&&(z+=g,g="")}else g=""}else g=e(s,t(s,W,N),g,c,l+1);V+=g,g=N=D=j=d=0,W="",p=u.charCodeAt(++T);break;case 125:case 59:if(1<(U=(W=(0<D?W.replace(h,""):W).trim()).length))switch(0===j&&(d=W.charCodeAt(0),45===d||96<d&&d<123)&&(U=(W=W.replace(" ",":")).length),0<B&&void 0!==(w=a(1,W,s,r,C,k,z.length,c,l,c))&&0===(U=(W=w.trim()).length)&&(W="\0\0"),d=W.charCodeAt(0),p=W.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){H+=W+u.charAt(T);break}default:58!==W.charCodeAt(U-1)&&(z+=n(W,d,p,W.charCodeAt(2)))}N=D=j=d=0,W="",p=u.charCodeAt(++T)}}switch(p){case 13:case 10:47===M?M=0:0===1+d&&107!==c&&0<W.length&&(D=1,W+="\0"),0<B*L&&a(0,W,s,r,C,k,z.length,c,l,c),k=1,C++;break;case 59:case 125:if(0===M+E+S+_){k++;break}default:switch(k++,v=u.charAt(T),p){case 9:case 32:if(0===E+_+M)switch(P){case 44:case 58:case 9:case 32:v="";break;default:32!==p&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===E+M+_&&(D=N=1,v="\f"+v);break;case 108:if(0===E+M+_+R&&0<j)switch(T-j){case 2:112===P&&58===u.charCodeAt(T-3)&&(R=P);case 8:111===I&&(R=I)}break;case 58:0===E+M+_&&(j=T);break;case 44:0===M+S+E+_&&(D=1,v+="\r");break;case 34:case 39:0===M&&(E=E===p?0:0===E?p:E);break;case 91:0===E+M+S&&_++;break;case 93:0===E+M+S&&_--;break;case 41:0===E+M+_&&S--;break;case 40:0===E+M+_&&(0===d&&2*P+3*I!=533&&(d=1),S++);break;case 64:0===M+S+E+_+j+g&&(g=1);break;case 42:case 47:if(!(0<E+_+S))switch(M){case 0:switch(2*p+3*u.charCodeAt(T+1)){case 235:M=47;break;case 220:U=T,M=42}break;case 42:47===p&&42===P&&U+2!==T&&(33===u.charCodeAt(U+2)&&(z+=u.substring(U,T+1)),v="",M=0)}}0===M&&(W+=v)}I=P,P=p,T++}if(0<(U=z.length)){if(D=s,0<B&&void 0!==(w=a(2,z,D,r,C,k,U,c,l,c))&&0===(z=w).length)return H+z+V;if(z=D.join(",")+"{"+z+"}",0!=x*R){switch(R=2!==x||i(z,2)?R:0){case 111:z=z.replace(m,":-moz-$1")+z;break;case 112:z=z.replace(y,"::-webkit-input-$1")+z.replace(y,"::-moz-$1")+z.replace(y,":-ms-input-$1")+z}R=0}}return H+z+V}(O,e,r,0,0);return 0<B&&void 0!==(s=a(-2,r,e,e,C,k,r.length,0,0,0))&&(r=s),R=0,k=C=1,r}var f=/^\0+/g,h=/[\0\r\f]/g,c=/: */g,l=/zoo|gra/,d=/([,: ])(transform)/g,p=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,m=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,A=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,_=/-self|flex-/g,M=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,k=1,C=1,R=0,x=1,O=[],P=[],B=0,I=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:B=P.length=0;break;default:if("function"==typeof t)P[B++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else L=0|!!t}return e},u.set=s,void 0!==e&&s(e),u};var Ee="/*|*/";function ke(e){e&&Re.current.insert(e+"}")}function Ce(e,t,r,n,i,o,a,s,u,f){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return Re.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+Ee;break;case 3:switch(s){case 102:case 112:return Re.current.insert(r[0]+t),"";default:return t+(0===f?Ee:"")}case-2:t.split("/*|*/}").forEach(ke)}}var Re={current:null};const xe=function(e){for(var t,r=0,n=0,i=e.length;4<=i;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},Oe={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Pe=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}};function Be(e){return 45===e.charCodeAt(1)}var Ie=/[A-Z]|^ms/g,Le=/_EMO_([^_]+?)_([^]*?)_EMO_/g,je=function(e){return null!=e&&"boolean"!=typeof e},Te=Pe((function(e){return Be(e)?e:e.replace(Ie,"-$&").toLowerCase()})),De=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Le,(function(e,t,r){return qe={name:t,styles:r,next:qe},t}))}return 1===Oe[e]||Be(e)||"number"!=typeof t||0===t?t:t+"px"};function Ne(e,t,r,n){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return qe={name:r.name,styles:r.styles,next:qe},r.name;if(void 0===r.styles){var i=e,o=t,a=r,s="";if(Array.isArray(a))for(var u=0;u<a.length;u++)s+=Ne(i,o,a[u],!1);else for(var f in a){var h=a[f];if("object"!=typeof h)null!=o&&void 0!==o[h]?s+=f+"{"+o[h]+"}":je(h)&&(s+=Te(f)+":"+De(f,h)+";");else if(!Array.isArray(h)||"string"!=typeof h[0]||null!=o&&void 0!==o[h[0]]){var c=Ne(i,o,h,!1);switch(f){case"animation":case"animationName":s+=Te(f)+":"+c+";";break;default:s+=f+"{"+c+"}"}}else for(var l=0;l<h.length;l++)je(h[l])&&(s+=Te(f)+":"+De(f,h[l])+";")}return s}var d=r.next;if(void 0!==d)for(;void 0!==d;)qe={name:d.name,styles:d.styles,next:qe},d=d.next;return r.styles+";";case"function":var p,g;if(void 0!==e)return p=qe,g=r(e),qe=p,Ne(e,t,g,n)}if(null==t)return r;var b=t[r];return void 0===b||n?r:b}function Ue(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="",o=(qe=void 0,e[0]);null==o||void 0===o.raw?i+=Ne(r,t,o,n=!1):i+=o[0];for(var a=1;a<e.length;a++)i+=Ne(r,t,e[a],46===i.charCodeAt(i.length-1)),n&&(i+=o[a]);We.lastIndex=0;for(var s,u="";null!==(s=We.exec(i));)u+="-"+s[1];return{name:xe(i)+u,styles:i,next:qe}}function Fe(e){return function(e){function t(t,r){var n=function(e,t){for(var r in t)e[r]=t[r];return e}({},t);return delete n.ref,e(n,(r=t.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return t.$$typeof=he,(t.render=t).prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}((function(t,r){return h(ze.Consumer,null,(function(n){return e(t,n,r)}))}))}var qe,We=/label:\s*([^\s;\n{]+)\s*;/g,ze=x("undefined"!=typeof HTMLElement?function(e){var t=(e=void 0===e?{}:e).key||"css",r=(void 0!==e.prefix&&(o={prefix:e.prefix}),new Se(o)),n={},i=e.container||document.head,o=document.querySelectorAll("style[data-emotion-"+t+"]"),a=(Array.prototype.forEach.call(o,(function(e){e.getAttribute("data-emotion-"+t).split(" ").forEach((function(e){n[e]=!0})),e.parentNode!==i&&i.appendChild(e)})),r.use(e.stylisPlugins)(Ce),o=function(e,t,n,i){var o=t.name;Re.current=n,r(e,t.styles),i&&(a.inserted[o]=!0)},{key:t,sheet:new Me({key:t,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:n,registered:{},insert:o});return a}():null),Ve=x({});function He(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]):n+=r+" "})),n}function Ke(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+n,i,e.sheet,!0),i=i.next}while(void 0!==i)}}ze.Provider;function Ye(e){for(var t=e.length,r=0,n="";r<t;r++){var i=e[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=Ye(i);else for(var a in o="",i)i[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n}function Ge(e){return"string"==typeof e&&96<e.charCodeAt(0)?Qe:Je}Fe((function(e,t){return h(Ve.Consumer,null,(function(r){function n(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=Ue(r,t.registered);return Ke(t,i,!1),t.key+"-"+i.name}return r=e.children({css:n,cx:function(){for(var e,r,i,o,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return r=n,e=He(e=t.registered,o=[],i=Ye(s)),o.length<2?i:e+r(o)},theme:r}),r}))})),r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ue(t)}(function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}(["\n  html,\n  body,\n  div,\n  span,\n  applet,\n  object,\n  iframe,\n  h1,\n  h2,\n  h3,\n  h4,\n  h5,\n  h6,\n  p,\n  blockquote,\n  pre,\n  a,\n  abbr,\n  acronym,\n  address,\n  big,\n  cite,\n  code,\n  del,\n  dfn,\n  em,\n  img,\n  ins,\n  kbd,\n  q,\n  s,\n  samp,\n  small,\n  strike,\n  strong,\n  sub,\n  sup,\n  tt,\n  var,\n  b,\n  u,\n  i,\n  center,\n  dl,\n  dt,\n  dd,\n  ol,\n  ul,\n  li,\n  fieldset,\n  form,\n  label,\n  legend,\n  table,\n  caption,\n  tbody,\n  tfoot,\n  thead,\n  tr,\n  th,\n  td,\n  article,\n  aside,\n  canvas,\n  details,\n  embed,\n  figure,\n  figcaption,\n  footer,\n  header,\n  hgroup,\n  menu,\n  nav,\n  output,\n  ruby,\n  section,\n  summary,\n  time,\n  mark,\n  audio,\n  video {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    font-size: 100%;\n    font: inherit;\n    vertical-align: baseline;\n  }\n  article,\n  aside,\n  details,\n  figcaption,\n  figure,\n  footer,\n  header,\n  hgroup,\n  menu,\n  nav,\n  section {\n    display: block;\n  }\n  body {\n    line-height: 1;\n  }\n  ol,\n  ul {\n    list-style: none;\n  }\n  blockquote,\n  q {\n    quotes: none;\n  }\n  blockquote:before,\n  blockquote:after,\n  q:before,\n  q:after {\n    content: '';\n    content: none;\n  }\n  table {\n    border-collapse: collapse;\n    border-spacing: 0;\n  }\n"],["\n  html,\n  body,\n  div,\n  span,\n  applet,\n  object,\n  iframe,\n  h1,\n  h2,\n  h3,\n  h4,\n  h5,\n  h6,\n  p,\n  blockquote,\n  pre,\n  a,\n  abbr,\n  acronym,\n  address,\n  big,\n  cite,\n  code,\n  del,\n  dfn,\n  em,\n  img,\n  ins,\n  kbd,\n  q,\n  s,\n  samp,\n  small,\n  strike,\n  strong,\n  sub,\n  sup,\n  tt,\n  var,\n  b,\n  u,\n  i,\n  center,\n  dl,\n  dt,\n  dd,\n  ol,\n  ul,\n  li,\n  fieldset,\n  form,\n  label,\n  legend,\n  table,\n  caption,\n  tbody,\n  tfoot,\n  thead,\n  tr,\n  th,\n  td,\n  article,\n  aside,\n  canvas,\n  details,\n  embed,\n  figure,\n  figcaption,\n  footer,\n  header,\n  hgroup,\n  menu,\n  nav,\n  output,\n  ruby,\n  section,\n  summary,\n  time,\n  mark,\n  audio,\n  video {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    font-size: 100%;\n    font: inherit;\n    vertical-align: baseline;\n  }\n  article,\n  aside,\n  details,\n  figcaption,\n  figure,\n  footer,\n  header,\n  hgroup,\n  menu,\n  nav,\n  section {\n    display: block;\n  }\n  body {\n    line-height: 1;\n  }\n  ol,\n  ul {\n    list-style: none;\n  }\n  blockquote,\n  q {\n    quotes: none;\n  }\n  blockquote:before,\n  blockquote:after,\n  q:before,\n  q:after {\n    content: '';\n    content: none;\n  }\n  table {\n    border-collapse: collapse;\n    border-spacing: 0;\n  }\n"]));var Ze=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qe=Pe((function(e){return Ze.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Je=function(e){return"theme"!==e&&"innerRef"!==e};function Xe(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)),n}function $e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){var n,i;n=e,i=r[t],t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function et(){return null}var tt=function e(t,r){void 0!==r&&(n=r.label,o=r.target,i=t.__emotion_forwardProp&&r.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&r.shouldForwardProp(e)}:r.shouldForwardProp);var n,i,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t,u=(i="function"!=typeof i&&a?t.__emotion_forwardProp:i)||Ge(s),f=!u("as");return function(){var c=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var p=c.length,g=1;g<p;g++)d.push(c[g],c[0][g])}var b=Fe((function(e,t,r){return h(Ve.Consumer,null,(function(n){var a=f&&e.as||s,c="",p=[],g=e;if(null==e.theme){for(var b in g={},e)g[b]=e[b];g.theme=n}"string"==typeof e.className?c=He(t.registered,p,e.className):null!=e.className&&(c=e.className+" ");n=Ue(d.concat(p),t.registered,g);var y,m=(Ke(t,n,"string"==typeof a),c+=t.key+"-"+n.name,void 0!==o&&(c+=" "+o),f&&void 0===i?Ge(a):u),v={};for(y in e)f&&"as"===y||m(y)&&(v[y]=e[y]);return v.className=c,v.ref=r||e.innerRef,p=h(a,v),h(l,null,h(et,null),p)}))}));return b.displayName=void 0!==n?n:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",b.defaultProps=t.defaultProps,(b.__emotion_real=b).__emotion_base=s,b.__emotion_styles=d,b.__emotion_forwardProp=i,Object.defineProperty(b,"toString",{value:function(){return"."+o}}),b.withComponent=function(t,n){return e(t,void 0!==n?$e({},r||{},{},n):r).apply(void 0,d)},b}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){tt[e]=tt(e)}));t=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var rt=function(){return(rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},nt=tt.div(t(["\n  ","\n  font-family: Roboto,sans-serif;\n"],["\n  ","\n  font-family: Roboto,sans-serif;\n"]),r);function it(e){function t(e){i(e)}var r=V(1),n=r[0],i=r[1],o=K(null);return H((function(){new(ae())({width:270,height:270,type:"svg",data:e.link,image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA2CAYAAACbZ/oUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAb1SURBVHgB3Vrdcds4EN4FJVo/fnAqOKWCOBVEqcBKBbbeLvLNWFeBnQpiz+SUe4tTwckVWK4gTgVRB9ZD9BNaBG4XJGiIon4oUYrtb0YiCIIEFvuD3QUQLPxslI8cUG98wJvdVv8SnihUc29v5HknVKyAKz8Uz0dd8wxNYfhnoaKE+GG916WHHRDya/HTqAOPHJrI8WgflHOqlKqaekTsFP/pv43uTYG5K0B9CasvENSB4hkK0JVKXTg7qm3P1mPA8K9CVUmnpkAdEjF7XMdEEtE9Ktb0vStfmnEL86KDcGgal1r9Jkj5Vin4Gj6uCMSPyhM/hsfla54cnlH4TeC+h43S6eC49E1JcU01JyGxPVDqb+boL9etR+1/Yc2UNYdtcUbAetHS32GjcETzcmpxO/gIfZxmq70tkWci+96o5qBzaItsBMTvUnlHu637W1PFzOG2tlhrgm1xttkfvUgTIlGcYSgFCaD2eIWuf561yCeJ7DTwQktl4rssAQDE8Rcvznu9gMNmJgAui61BfVbng+NiExSewsyOA5XwSRVc8G591+nBqvDEoQRo4ry+eKKFrM+SsDuSih3P+6HHS6Je+jw8R1ucSWfflT8P2jAH3B4c50uiWG0VeFF082dIXJvXiqT3XLCOh2KN/felGonqfzxbxN2XsCT6jdIZvXMKW8YirsYRF2uRR+zyDenId0iBcmtwhlK+1APYGvCi4Lqv0xjJoK3qUrHHOizcVp+tGokF/gEpUfx3pKWCLPYH2CB4UlHIt2yYFolwHFoFASsk0tp663U4vNm/W3Ft3TC322m5aoNWl319VeqGr5pgsqpanN1fXhVWxAa43XMEvCu1Bu/ScjUG7XQIITv6GtT5mt3E6SqsiSy4zRaV/IHXO5/mrxhLQcArvoxyhQeRdiQFCRrqADIAc3tEYijJyEA6RK5hFg4M6y8qYJG+fRFKiTADDC1Z5S4jH5k72GUjQ8ZmKW6Ta8hcZecAMoIvnKr+NBFs6qLgQSnUSp337muQIdjYKKvDObjO2i3FyDkKaGNEBFM4qAfFCQDICCxS7LZCaDjmQqkmR0CQIcih0rQ45OaaugeCnYBg4kYVMsDPRn6fXNbrNC4o9X3GEzRs8tq5HrxGmXW3Qr+ea0VQEcGhFWPFrqzb4ahRPBGQ/waxkHIZ8ARR3H3t0YTBGvBAGyvjY0SICNahU/jQDpjTIAzMv5B1XtfwVMY0YeuIOAUMmgYV+hgP9RaMA0KEv4KU0Prqed9ILI8gI7CID47LH1dcObT+ksR07MrcZBt2QAR3xLNTX/RFkzjjAF3ODdDXABkzimlrP98XL1wcd2x9nAXW3zEoPRaxIyfao30TBsx3XM7B/eukj3O45fu47whxQP7p/kaInANOLTmUTR1ThsVx/U7SUjZ4T4kKysElhbwTHGY9HjSKXY4uxipXBbi/ZQPmk047JOaUgagpCXsCtahMztaWwBPM42AdJeMGg0ZJp5OlgKtSzu2w343EDB5fUsg7NWZKCFyGuatuWFWBpwQ2vCR5uhymdezHIt5eOPIyLFbgqRHLMMQSkPLo8cdTBDtyjcTb40IvSb+nCDYL9jPAHhvYeOU0h2fnnp8ceLmM100QrFO2vz39miXUFPMmPa0wfnxGmBLrCYKzEmfec9KBP/3SvKcdBcodI8h6VglBKUU11kcA28taA20acN1OupltnGVeXnYjLyW6JcvbijicSaaDkvojGE26mugvlcUM3MAHYsPRdRWsjYot1rmHb6v1CSZHn9y9JkU45O3ADQq/DWPeGlniVVo3ORgZjL2qkHBg3FjIAKFYd7isRTojcX60sPeH9dyvk4B/CmAbYrI4RtgyzVQ+RkhPHPE13FvKLlP5WEErQJAQ4D8J4gqeOUwyPthqYWv63EHZEb5EjgdlDthKbzVdsy3YVjpahykjcoWbjZR64S8JFdgglJSRyj4QjLKDIDZDMG2UFfP56qx9XvscxiaQo2ynKUc+0L1b2Jge0zrYnrepbZ3DyBzssiZutYQ7Dx3YACi/2V3cClMdqkmBjn0z4eWacxBZg1aB7qI2ZEM2kkuTZJvs+4m8NJ+DIF1Ks5+j96N4omjmDmeFcSjFSb9Rqs77EIZbI4nPSPJ0H4hv0mZkvB23Q2uQ3c8kFi5PSAs4bZ5zJFSgHUejm2EAwuc1M3ZTJ89R6ogq8P1rtCHwZl6sHD8rHQw/BnNUz6riA5ltH+RNmQzbohM1GZ7Q41M89UUHW/Q5LAFVBYLPp1TBYlY8oRDUJXxACadJi1dXkjnfXWLzKnkQtBm+4vqqjWfer69yBIKXOJPW4RNFU9+GDWIFbvMpng9ZHmyJY+P7YdqpUOIjrU1z3VbkM58rcjUN/geU/3c0eMPNdAAAAABJRU5ErkJggg==",dotsOptions:{color:"black",type:"rounded"},imageOptions:{margin:5},cornersDotOptions:{color:"#f66a07"},qrOptions:{errorCorrectionLevel:"M"}}).append(o.current)}),[]),h(nt,null,h("div",null,h("div",{style:ne.backdrop,onClick:e.onClose}),h("div",{style:ne.modal},h("div",{style:ne.closeButtonContainer},h("div",{style:ne.right},h("span",{style:ne.closeButton,onClick:e.onClose},h(se,null)))),h("div",{style:ne.logoContainer},h($,null)),h("div",null,h("div",{style:ne.tabcontainer},h("div",{style:ne.flexContainer},h("div",{onClick:function(){return t(1)},style:rt(rt(rt({},ne.tab),1===n?ne.tabactive:{}),ne.flexItem)},"Desktop"),h("div",{onClick:function(){return t(2)},style:rt(rt(rt({},ne.tab),2===n?ne.tabactive:{}),ne.flexItem)},"Mobile"))),h("div",{style:{display:1===n?"none":"block"}},h("div",{style:ne.flexContainer},h("div",{style:rt({textAlign:"center",marginTop:4},ne.flexItem)},h("div",{ref:o,style:ne.center}),h("div",{style:ne.connectMobileText},"Scan to connect and sign with ",h("br",null),h("span",{style:ne.blue},h("b",null,"MetaMask mobile app")))))),h("div",{style:{display:2===n?"none":"block"}},h("div",{style:ne.item},h(oe,{Icon:re,text:"\n      Trusted by over 30 million users to buy, store, send and swap crypto\n      securely"})),h("div",{style:ne.item},h(oe,{Icon:te,text:"\n        The leading crypto wallet & gateway to blockchain apps built\n        on Ethereum Mainnet, Polygon, Optimism, and many other\n        networks"})),h("div",{style:ne.item},h(oe,{Icon:ee,text:"\n      Puts1 you in control of your digital interactions by making power\n            of cryptography more accessible"})),h("button",{style:ne.button,onClick:function(){e.ManageMetaMaskInstallation.startDesktopOnboarding()}},h(ue,null),h("span",{style:ne.installExtensionText},"Install MetaMask Extension")))))))}const ot=JSON.parse('{"s":"InstallModalWeb"}');var at=function(){return(at=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const st=function(){var e=this;this.render=function(t){if(void 0===t&&(t=null),e.el)throw new Error(ot.s+" is already mounted, call unmount() first");e.el=document.createElement("div"),(t||document.body).appendChild(e.el),t=t||document.body,R(e.component,t)},this.mount=function(t){e.component=h(it,at({},t));var r=t.parentElement;"complete"===document.readyState?e.render(r):window.addEventListener("load",(function(){e.render(r)}))},this.unmount=function(){if(!e.el)throw new Error(ot.s+" is not mounted, call mount() first");R(null,e.el),e.el.parentNode.removeChild(e.el),e.el=null}}}},FP={};function qP(e){var t=FP[e];return void 0!==t||(t=FP[e]={exports:{}},UP[e](t,t.exports,qP)),t.exports}qP.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return qP.d(t,{a:t}),t},qP.d=(e,t)=>{for(var r in t)qP.o(t,r)&&!qP.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},qP.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var WP=qP(38).Z,zP=function(e){var t=e.link,r=document.createElement("div");document.body.appendChild(r);var n=new WP,i=function(){n.unmount(),document.body.removeChild(r)};return n.mount({parentElement:r,link:t,ManageMetaMaskInstallation:YB,onClose:i}),{installModal:n,onClose:i}},VP={WalletConnectInstance:null,connector:null,universalLink:null,getConnector:function(){if(!this.connector){var e=this.WalletConnectInstance;if(!e)throw new Error("WalletConnectInstance must be provided");this.connector=new e({bridge:"https://bridge.walletconnect.org"})}return this.connector},forceRestart:!1,isConnected:function(){return this.getConnector().connected},sentFirstConnect:!1,startConnection:function(){var e=this;return this.universalLink=null,new Promise((function(t,r){e.getConnector().connected?t(!0):e.getConnector().createSession().then((function(){var r=null,n="uri=".concat(encodeURIComponent(e.getConnector().uri)),i="".concat("https://metamask.app.link/wc?").concat(n),o="metamask://wc?".concat(n);CP.getPlatform()===yP.DesktopWeb||CP.getPlatform()===yP.NonBrowser?r=zP({link:i}):CP.openDeeplink(i,o,"_self"),e.universalLink=i,e.getConnector().on("connect",(function(){null==r||r.onClose(),e.sentFirstConnect||(t(!0),e.sentFirstConnect=!0)}))})).catch((function(e){return r(e)}))}))}},HP=function(e){return e||"undefined"!=typeof window&&window.navigator.brave},KP={},YP={},GP={},ZP={exports:{}},QP={exports:{}};!nS.version||0===nS.version.indexOf("v0.")||0===nS.version.indexOf("v1.")&&0!==nS.version.indexOf("v1.8.")?QP.exports=function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return VM(e);case 2:return VM((function(){e.call(null,t)}));case 3:return VM((function(){e.call(null,t,r)}));case 4:return VM((function(){e.call(null,t,r,n)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return VM((function(){e.apply(null,i)}))}}:QP.exports=VM;var JP,XP,$P=TS().EventEmitter,eB={exports:{}};function tB(){if(XP)return JP;XP=1;var e=eB.exports.Buffer;function t(e,t,r){e.copy(t,r)}return JP=function(){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.head=null,this.tail=null,this.length=0}return r.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},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.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}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.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},r.prototype.concat=function(r){if(0===this.length)return e.alloc(0);if(1===this.length)return this.head.data;for(var n=e.allocUnsafe(r>>>0),i=this.head,o=0;i;)t(i.data,n,o),o+=i.data.length,i=i.next;return n},r}(),JP}!function(e,t){var r=ME,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(eB,eB.exports);var rB=QP.exports;function nB(e,t){e.emit("error",t)}var iB,oB,aB,sB,uB={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;n||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||rB(nB,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(rB(nB,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})))},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 fB(){if(oB)return iB;oB=1;var e=QP.exports;function t(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)}}iB=d;var r,n=e;d.WritableState=l;var i=NE();i.inherits=qE();var o={deprecate:tk()},a=$P,s=eB.exports.Buffer,u=q_.Uint8Array||function(){};var f,h=uB;function c(){}function l(i,o){r=r||hB(),i=i||{},this.objectMode=!!i.objectMode,o instanceof r&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,s=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:s,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 u=!1===i.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var i=t._writableState,o=i.sync,a=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),r)!function(t,r,n,i,o){--r.pendingcb,n?(e(o,i),e(v,t,r),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),v(t,r))}(t,i,o,r,a);else{var s=y(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||b(t,i),o?n(g,t,i,s,a):g(t,i,s,a)}}(o,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(r=r||hB(),!(f.call(d,this)||this instanceof r))return new d(e);this._writableState=new l(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)),a.call(this)}function p(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 g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),v(e,t)}function b(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,p(e,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new t(r)}else{for(;n;){var f=n.chunk,h=n.encoding,c=n.callback;if(p(e,r,!1,r.objectMode?1:f.length,f,h,c),n=n.next,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequestCount=0,r.bufferedRequest=n,r.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function m(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),v(e,t)}))}function v(t,r){var n=y(r);return n&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e(m,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),n}return i.inherits(d,a),l.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(l.prototype,"buffer",{get:o.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(d,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||e&&e._writableState instanceof l}})):f=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,n){var i,o=this._writableState,a=!1,f=(i=t,(s.isBuffer(i)||i instanceof u)&&!o.objectMode);return f&&!s.isBuffer(t)&&(t=function(e){return s.from(e)}(t)),"function"==typeof r&&(n=r,r=null),f?r="buffer":r||(r=o.defaultEncoding),"function"!=typeof n&&(n=c),o.ended?function(t,r){var n=new Error("write after end");t.emit("error",n),e(r,n)}(this,n):(f||function(t,r,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),e(i,a),o=!1),o}(this,o,t,n))&&(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=s.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,u,n,i,o);return f}(this,o,f,t,r,n)),a},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},d.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},d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),null!=t&&this.write(t,r),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,r,n){r.ending=!0,v(t,r),n&&(r.finished?e(n):t.once("finish",n));r.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=h.destroy,d.prototype._undestroy=h.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},iB}function hB(){if(sB)return aB;sB=1;var e=QP.exports,t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};aB=u;var r=NE();r.inherits=qE();var n=bB(),i=fB();r.inherits(u,n);for(var o=t(i.prototype),a=0;a<o.length;a++){var s=o[a];u.prototype[s]||(u.prototype[s]=i.prototype[s])}function u(e){if(!(this instanceof u))return new u(e);n.call(this,e),i.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",f)}function f(){this.allowHalfOpen||this._writableState.ended||e(h,this)}function h(e){e.end()}return Object.defineProperty(u.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)}}),u.prototype._destroy=function(t,r){this.push(null),this.end(),e(r,t)},aB}var cB,lB,dB,pB={};function gB(){if(cB)return pB;cB=1;var e=eB.exports.Buffer,t=e.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 r(r){var n;switch(this.encoding=function(r){var n=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}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=s,this.end=u,n=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);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 o(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 a(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 s(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 u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}return pB.StringDecoder=r,r.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||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},r.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var o=n(t[i]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--i<r)return 0;if((o=n(t[i]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--i<r)return 0;if((o=n(t[i]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.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},pB}function bB(){if(dB)return lB;dB=1;var e=QP.exports;lB=g;var t,r=AE();g.ReadableState=p,TS().EventEmitter;var n=function(e,t){return e.listeners(t).length},i=$P,o=eB.exports.Buffer,a=q_.Uint8Array||function(){};var s=NE();s.inherits=qE();var u=JE,f=void 0;f=u&&u.debuglog?u.debuglog("stream"):function(){};var h,c=tB(),l=uB;s.inherits(g,i);var d=["error","close","destroy","pause","resume"];function p(e,r){t=t||hB(),e=e||{},this.objectMode=!!e.objectMode,r instanceof t&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new c,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&&(h||(h=gB().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function g(e){if(t=t||hB(),!(this instanceof g))return new g(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function b(e,t,r,n,i){var s,u=e._readableState;null===t?(u.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,A(e)}(e,u)):(i||(s=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(u,t)),s?e.emit("error",s):u.objectMode||t&&t.length>0?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?y(e,u,t,!1):_(e,u)):y(e,u,t,!1))):n||(u.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(u)}function y(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&&A(e)),_(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=l.destroy,g.prototype._undestroy=l.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.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=o.from(e,t),t=""),r=!0),b(this,e,t,!1,r)},g.prototype.unshift=function(e){return b(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return h||(h=gB().StringDecoder),this._readableState.decoder=new h(e),this._readableState.encoding=e,this};var m=8388608;function v(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 A(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(f("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e(w,t):w(t))}function w(e){f("emit readable"),e.emit("readable"),k(e)}function _(t,r){r.readingMore||(r.readingMore=!0,e(M,t,r))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function S(e){f("readable nexttick read 0"),e.read(0)}function E(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function C(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=o.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,s),0===(e-=s)){s===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e(x,r,t))}function x(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return g.prototype.read=function(e){f("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 f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):A(this),null;if(0===(e=v(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=v(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,i){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,i);var s=(!i||!1!==i.end)&&t!==nS.stdout&&t!==nS.stderr?h:m;function u(e,r){f("onunpipe"),e===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),t.removeListener("close",b),t.removeListener("finish",y),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",u),o.removeListener("end",h),o.removeListener("end",m),o.removeListener("data",p),l=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function h(){f("onend"),t.end()}a.endEmitted?e(s):o.once("end",s),t.on("unpipe",u);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,k(e))}}(o);t.on("drain",c);var l=!1;var d=!1;function p(e){f("ondata"),d=!1,!1!==t.write(e)||d||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==O(a.pipes,t))&&!l&&(f("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,d=!0),o.pause())}function g(e){f("onerror",e),m(),t.removeListener("error",g),0===n(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",y),m()}function y(){f("onfinish"),t.removeListener("close",b),m()}function m(){f("unpipe"),o.unpipe(t)}return o.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",b),t.once("finish",y),t.emit("pipe",o),a.flowing||(f("pipe resume"),o.resume()),t},g.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=O(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},g.prototype.on=function(t,r){var n=i.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&A(this):e(S,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e(E,t,r))}(this,t)),this},g.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){(f("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(n.push(i)||(r=!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<d.length;o++)e.on(d[o],n.emit.bind(n,d[o]));return n._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},n},g._fromList=C,lB}var yB=wB,mB=hB(),vB=NE();function AB(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=r&&e.push(r);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function wB(e){if(!(this instanceof wB))return new wB(e);mB.call(this,e),this._transformState=new AB(this);var t=this;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.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e,r){_B(t,e,r)})):_B(t)}))}function _B(e,t,r){if(t)return e.emit("error",t);null!=r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}vB.inherits=qE(),vB.inherits(wB,mB),wB.prototype.push=function(e,t){return this._transformState.needTransform=!1,mB.prototype.push.call(this,e,t)},wB.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},wB.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)}},wB.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},wB.prototype._destroy=function(e,t){var r=this;mB.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))};var MB=kB,SB=yB,EB=NE();function kB(e){if(!(this instanceof kB))return new kB(e);SB.call(this,e)}EB.inherits=qE(),EB.inherits(kB,SB),kB.prototype._transform=function(e,t,r){r(null,e)},function(e,t){(t=e.exports=bB()).Stream=t,t.Readable=t,t.Writable=fB(),t.Duplex=hB(),t.Transform=yB,t.PassThrough=MB}(ZP,ZP.exports),Object.defineProperty(GP,"__esModule",{value:!0}),GP.BasePostMessageStream=void 0;const CB=ZP.exports;function RB(){}const xB="ACK";class OB extends CB.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1}_handshake(){this._write("SYN",null,RB),this.cork()}_onData(e){if(this._init)try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(xB,null,RB)):e===xB&&(this._init=!0,this._haveSyn||this._write(xB,null,RB),this.uncork())}_read(){}_write(e,t,r){this._postMessage(e),r()}}GP.BasePostMessageStream=OB,Object.defineProperty(YP,"__esModule",{value:!0}),YP.WindowPostMessageStream=void 0;const PB=GP;class BB extends PB.BasePostMessageStream{constructor({name:e,target:t,targetWindow:r}){if(!e||!t)throw new Error("Invalid input.");super(),this._name=e,this._target=t,this._targetOrigin=r?"*":location.origin,this._targetWindow=r||window,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||"object"!=typeof t||t.target!==this._name||!t.data||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}YP.WindowPostMessageStream=BB;var IB={},LB={};Object.defineProperty(LB,"__esModule",{value:!0}),LB.DEDICATED_WORKER_NAME=void 0,LB.DEDICATED_WORKER_NAME="dedicatedWorker",Object.defineProperty(IB,"__esModule",{value:!0}),IB.WorkerPostMessageStream=void 0;const jB=GP,TB=LB;class DB extends jB.BasePostMessageStream{constructor(){super(),this._name=TB.DEDICATED_WORKER_NAME,self.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;"object"==typeof t&&t.target===this._name&&t.data&&this._onData(t.data)}_destroy(){}}IB.WorkerPostMessageStream=DB;var NB={};Object.defineProperty(NB,"__esModule",{value:!0}),NB.WorkerParentPostMessageStream=void 0;const UB=GP,FB=LB;class qB extends UB.BasePostMessageStream{constructor({worker:e}){if(!e)throw new Error("Invalid input.");super(),this._target=FB.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;"object"==typeof t&&t.data&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}NB.WorkerParentPostMessageStream=qB,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerParentPostMessageStream=e.WorkerPostMessageStream=e.WindowPostMessageStream=void 0;var t=YP;Object.defineProperty(e,"WindowPostMessageStream",{enumerable:!0,get:function(){return t.WindowPostMessageStream}});var r=IB;Object.defineProperty(e,"WorkerPostMessageStream",{enumerable:!0,get:function(){return r.WorkerPostMessageStream}});var n=NB;Object.defineProperty(e,"WorkerParentPostMessageStream",{enumerable:!0,get:function(){return n.WorkerParentPostMessageStream}})}(KP);var WB=function(e){function t(t){var r=t.name,n=e.call(this,{objectMode:!0})||this;return n._name=r,n.comm=KB.getConnector(),n._onMessage=n._onMessage.bind(n),n.comm.on("message",n._onMessage),n.comm.on("clients_ready",(function(){vP.ethereum._state.initialized=!0,vP.ethereum._initializeState()})),n.comm.on("clients_disconnected",(function(){vP.ethereum._handleAccountsChanged([]),vP.ethereum._handleDisconnect(!0)})),n}return j_(t,e),t.prototype._write=function(e,t,r){var n;if(!KB.isConnected())return r();try{var i=void 0;ME.Buffer.isBuffer(e)?(i=e.toJSON())._isBuffer=!0:i=e,this.comm.sendMessage(null==i?void 0:i.data);var o=CP.getPlatform()===yP.DesktopWeb;F_[null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.method]&&!o?CP.openDeeplink("https://metamask.app.link/","metamask://","_self"):KB.isPaused()&&!o&&CP.openDeeplink("https://metamask.app.link/connect?redirect=true","metamask://connect?redirect=true","_self")}catch(e){return r(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return r()},t.prototype._read=function(){},t.prototype._onMessage=function(e){var t=e.message;if(t&&"object"==typeof t&&t.data&&"object"==typeof t.data&&(!t.name||t.name===T_.PROVIDER))if(ME.Buffer.isBuffer(t)){delete msg._isBuffer;var r=ME.Buffer.from(t);this.push(r)}else this.push(t)},t.prototype.start=function(){},t}(BO),zB=function(e){function t(t){var r=t.name,n=e.call(this,{objectMode:!0})||this;return n._name=r,n}return j_(t,e),t.prototype._write=function(e,t,r){var n,i=this;if(!VP.isConnected())return r();try{var o;ME.Buffer.isBuffer(e)?(o=e.toJSON())._isBuffer=!0:o=e,VP.getConnector().sendCustomRequest(null==o?void 0:o.data).then((function(e){var t={data:{name:T_.PROVIDER,data:{id:o.data.id,jsonrpc:"2.0",result:e}},target:T_.INPAGE};i._onMessage(t)})).catch((function(e){var t={data:{name:T_.PROVIDER,data:{id:o.data.id,jsonrpc:"2.0",error:e.toString()}},target:T_.INPAGE};i._onMessage(t)}));var a=CP.getPlatform()===yP.DesktopWeb;F_[null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.method]&&!a&&CP.openDeeplink("https://metamask.app.link/","metamask://","_self")}catch(e){return r(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return r()},t.prototype._read=function(){},t.prototype._onMessage=function(e){var t=e.data;if(t&&"object"==typeof t&&t.data&&"object"==typeof t.data&&(!e.target||e.target===this._name))if(ME.Buffer.isBuffer(t)){delete t._isBuffer;var r=ME.Buffer.from(t);this.push(r)}else this.push(t)},t.prototype.setProviderState=function(e){var t=e.chainId,r=e.accounts,n={data:{name:T_.PROVIDER,data:{method:"metamask_chainChanged",params:{chainId:"0x".concat(parseInt(t,10).toString(16)),networkVersion:t.toString()}}},target:T_.INPAGE},i={data:{name:T_.PROVIDER,data:{method:"metamask_accountsChanged",params:[r[0]]}},target:T_.INPAGE};this._onMessage(n),this._onMessage(i),vP.ethereum._state.initialized=!0,vP.ethereum._initializeState()},t.prototype.subscribeToConnectionEvents=function(){var e=this;VP.forceRestart&&(VP.getConnector().killSession(),VP.forceRestart=!1),VP.isConnected()&&(vP.ethereum._state.initialized=!0,vP.ethereum._initializeState()),this._alreadySubscribed||(VP.getConnector().on("connect",(function(t,r){if(t)throw t;var n=r.params[0],i=n.accounts,o=n.chainId;e.setProviderState({chainId:o,accounts:i})})),VP.getConnector().on("session_update",(function(t,r){if(t)throw t;var n=r.params[0],i=n.accounts,o=n.chainId;e.setProviderState({accounts:i,chainId:o})})),VP.getConnector().on("disconnect",(function(e){if(e)throw e;location.reload()})),this._alreadySubscribed=!0)},t.prototype.start=function(){this.subscribeToConnectionEvents()},t}(BO),VB={communicationLayerPreference:null,getPostMessageStreamToUse:function(){return CP.getPlatform()===yP.MetaMaskMobileWebview?KP.WindowPostMessageStream:this.communicationLayerPreference===R_.WALLETCONNECT?zB:WB}},HB={RemoteCommunication:null,dappMetadata:null,transports:null,webRTCLib:null,timer:null,universalLink:null,getConnector:function(){var e,t,r=this;if(!this.RemoteCommunication){var n=VB.communicationLayerPreference,i="undefined";CP.getPlatform()===yP.DesktopWeb?i="web-desktop":CP.getPlatform()===yP.MobileWeb&&(i="web-mobile"),this.RemoteCommunication=new B_({platform:i,commLayer:n,webRTCLib:this.webRTCLib,dappMetadata:this.dappMetadata,transports:this.transports}),this.RemoteCommunication.on("clients_disconnected",(function(){r.sentFirstConnect=!1})),this.timer&&(null===(t=(e=this.timer).runBackgroundTimer)||void 0===t||t.call(e,(function(){return null}),5e3))}return this.RemoteCommunication},forceRestart:!1,isConnected:function(){return this.getConnector().connected},sentFirstConnect:!1,startConnection:function(){var e,t=this;this.universalLink=null;var r=null,n=this.getConnector().generateChannelId(),i=n.channelId,o=n.pubKey,a="channelId=".concat(encodeURIComponent(i),"&comm=").concat(encodeURIComponent(VB.communicationLayerPreference),"&pubkey=").concat(encodeURIComponent(o)),s="".concat("https://metamask.app.link/connect?").concat(a),u="metamask://connect?".concat(a);return CP.getPlatform()===yP.DesktopWeb||CP.getPlatform()===yP.NonBrowser?r=zP({link:s}):null===(e=CP.openDeeplink)||void 0===e||e.call(CP,s,u,"_self"),this.universalLink=s,new Promise((function(e){t.getConnector().once("clients_ready",(function(){null==r||r.onClose(),t.sentFirstConnect||(e(!0),t.sentFirstConnect=!0)}))}))},isPaused:function(){return this.RemoteCommunication.paused}},KB=HB,YB={isInstalling:!1,hasInstalled:!1,resendRequest:null,preferDesktop:!1,startDesktopOnboarding:function(){vP.ethereum=null,delete window.ethereum,(new NP).startOnboarding()},redirectToProperInstall:function(){return N_(this,void 0,void 0,(function(){var e,t,r;return U_(this,(function(n){return(e=CP.getPlatform())===yP.MetaMaskMobileWebview?(alert("Please save your seedphrase and try to reinstall MetaMask Mobile"),[2,!1]):e===yP.DesktopWeb&&(this.isInstalling=!0,this.preferDesktop)?(this.startDesktopOnboarding(),[2,!1]):(t=VB.communicationLayerPreference===R_.WALLETCONNECT?VP:KB,this.isInstalling=!0,(r=t.startConnection())&&(this.isInstalling=!1,this.hasInstalled=!0),[2,r])}))}))},checkInstallation:function(){return N_(this,void 0,void 0,(function(){return U_(this,(function(e){return MP()?[2,!0]:[2,this.redirectToProperInstall()]}))}))},start:function(e){var t=e.wait,r=void 0!==t&&t;return N_(this,void 0,void 0,(function(){return U_(this,(function(e){switch(e.label){case 0:return r?[4,(t=1e3,new Promise((function(e){setTimeout((function(){e(!0)}),t)})))]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,this.checkInstallation()]}var t}))}))}},GB={exports:{}};!function(e,t){var r=FO;"disable"===nS.env.READABLE_STREAM&&r?(e.exports=r,(t=e.exports=r.Readable).Readable=r.Readable,t.Writable=r.Writable,t.Duplex=r.Duplex,t.Transform=r.Transform,t.PassThrough=r.PassThrough,t.Stream=r):((t=e.exports=dk()).Stream=r||t,t.Readable=t,t.Writable=rk(),t.Duplex=nk(),t.Transform=pk(),t.PassThrough=gk())}(GB,GB.exports);const{Duplex:ZB}=GB.exports,QB=lS,JB=iS.exports,XB={};class $B extends ZB{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}var eI=class extends ZB{constructor(e={}){super(Object.assign({},e,{objectMode:!0})),this._substreams={}}createStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error('ObjectMultiplex - Substream for name "${name}" already exists');const t=new $B({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=JB(t);QB(e,{readable:!1},r),QB(e,{writable:!1},r)}(this,(e=>{t.destroy(e)})),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error('ObjectMultiplex - Substream for name "${name}" already exists');this._substreams[e]=XB}_read(){}_write(e,t,r){const n=e.name,i=e.data;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const o=this._substreams[n];if(!o)return console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r();o!==XB&&o.push(i),r()}};function tI(e){var t=new KP.WindowPostMessageStream({name:T_.CONTENT_SCRIPT,target:T_.INPAGE}),r=new e({name:T_.CONTENT_SCRIPT}),n=new eI;n.setMaxListeners(25);var i,o,a,s,u=new eI;u.setMaxListeners(25),MS(n,t,n,(function(e){return rI("MetaMask Inpage Multiplex",e)})),MS(u,r,u,(function(e){rI("MetaMask Background Multiplex",e),window.postMessage({target:T_.INPAGE,data:{name:T_.PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),i=T_.PROVIDER,o=u,a=n.createStream(i),s=o.createStream(i),MS(a,s,a,(function(e){return rI('MetaMask muxed traffic for channel "'.concat(i,'" failed.'),e)}))}function rI(e,t){var r="MetamaskContentscript - lost connection to ".concat(e);t&&(r+="\n".concat(t.stack)),console.warn(r),console.error(t)}var nI=function(e){function t(t){var r=e.call(this)||this;return BO.call(r,{objectMode:!0}),r._name=t.name,r._targetWindow=window,r._port=t,r._origin=location.origin,window.addEventListener("message",r._onMessage.bind(r),!1),r}return j_(t,e),t}(BO);nI.prototype._onMessage=function(e){var t,r=e.data;if(("*"===this._origin||e.origin===this._origin)&&r&&"object"==typeof r&&r.data&&"object"==typeof r.data&&!(r.target&&r.target!==this._name||(null===(t=r.data.data)||void 0===t?void 0:t.toNative)))if(ME.Buffer.isBuffer(r)){delete r._isBuffer;var n=ME.Buffer.from(r);this.push(n)}else this.push(r)},nI.prototype._onDisconnect=function(){this.destroy()},nI.prototype._read=function(){},nI.prototype._write=function(e,t,r){try{if(ME.Buffer.isBuffer(e)){var n=e.toJSON();n._isBuffer=!0,window.ReactNativeWebView.postMessage(JSON.stringify(D_(D_({},n),{origin:window.location.href})))}else e.data&&(e.data.toNative=!0),window.ReactNativeWebView.postMessage(JSON.stringify(D_(D_({},e),{origin:window.location.href})))}catch(e){return r(new Error("MobilePortStream - disconnected"))}return r()};var iI,oI={portStream:null,getPortStreamToUse:function(){return this.portStream||(this.portStream=CP.getPlatform()===yP.MetaMaskMobileWebview&&nI),this.portStream}};!function(e){e.ECDH="ECDH",e.ECIES="ECIES"}(iI||(iI={}));var aI=function(){function e(e){var t=void 0===e?{}:e,r=t.dappMetadata,n=t.injectProvider,i=void 0===n||n,o=t.forceInjectProvider,a=t.forceDeleteProvider,s=t.shouldShimWeb3,u=void 0===s||s,f=t.checkInstallationImmediately,h=t.checkInstallationOnAllCalls,c=t.preferDesktop,l=t.openDeeplink,d=t.useDeeplink,p=t.wakeLockType,g=t.communicationLayerPreference,b=void 0===g?R_.SOCKET:g,y=t.WalletConnectInstance,m=t.forceRestartWalletConnect,v=t.webRTCLib,A=t.transports,w=t.timer;this.getWalletConnectConnector=function(){return VP.getConnector()};var _=CP.getPlatform();if(HP(o)||_===yP.NonBrowser||I_()){HP(o)&&a&&(vP.ethereum=null,delete window.ethereum),VB.communicationLayerPreference=b,VP.WalletConnectInstance=y,KB.webRTCLib=v,l&&(CP.preferredOpenLink=l),d&&(CP.useDeeplink=d),p&&(CP.wakeLockType=p),r&&(KB.dappMetadata=r),A&&(KB.transports=A),w&&(KB.timer=w),VP.forceRestart=Boolean(m),YB.preferDesktop=Boolean(c),this.provider=function(e){var t,r=e.checkInstallationOnAllCalls,n=void 0!==r&&r,i=e.injectProvider,o=e.shouldShimWeb3,a=VB.getPostMessageStreamToUse(),s=CP.getPlatform(),u=new a({name:T_.INPAGE,target:T_.CONTENT_SCRIPT}),f=vP.initializeProvider({shouldSetOnWindow:!(!i||s===yP.NonBrowser),connectionStream:u,shouldShimWeb3:o});null===(t=u.start)||void 0===t||t.call(u);var h=function(e,t,r){return N_(void 0,void 0,void 0,(function(){return U_(this,(function(i){switch(i.label){case 0:return MP()||"metamask_getProviderState"===e?[3,3]:"eth_requestAccounts"===e||n?[4,YB.start({wait:!1})]:[3,2];case 1:if(i.sent())return[2,r.apply(void 0,t)];i.label=2;case 2:throw new Error("MetaMask is not connected/installed, please call eth_requestAccounts to connect first.");case 3:return[2,r.apply(void 0,t)]}}))}))},c=f.request;f.request=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N_(void 0,void 0,void 0,(function(){return U_(this,(function(t){return[2,h(null==e?void 0:e[0].method,e,c)]}))}))};var l=f.send;return f.send=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N_(void 0,void 0,void 0,(function(){return U_(this,(function(t){return[2,h(null==e?void 0:e[0],e,l)]}))}))},f}({checkInstallationOnAllCalls:h,injectProvider:i,shouldShimWeb3:u});var M=oI.getPortStreamToUse();M&&tI(M),f&&YB.start({wait:!0})}else this.provider=window.ethereum}return e.prototype.getProvider=function(){return this.provider},e.prototype.getUniversalLink=function(){if(KB.universalLink)return KB.universalLink;if(VP.universalLink)return VP.universalLink;throw new Error("No Universal Link available, please call eth_requestAccounts first.")},e}();return aI}();

export default MetaMaskSDK