diff --git "a/_next/static/chunks/pages/_app-01f2793ad86eff65.js" "b/_next/static/chunks/pages/_app-01f2793ad86eff65.js" new file mode 100644--- /dev/null +++ "b/_next/static/chunks/pages/_app-01f2793ad86eff65.js" @@ -0,0 +1,193 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{13083:function(e,t,r){"use strict";var n;let i;r.d(t,{Tb:function(){return ef},s3:function(){return eh},nZ:function(){return ep}});let o=Object.prototype.toString;function a(e,t){return o.call(e)===`[object ${t}]`}function s(e){return a(e,"Object")}function u(e){return!!(e&&e.then&&"function"==typeof e.then)}function c(e){return e&&e.Math==Math?e:void 0}let l="object"==typeof globalThis&&c(globalThis)||"object"==typeof window&&c(window)||"object"==typeof self&&c(self)||"object"==typeof r.g&&c(r.g)||function(){return this}()||{};function d(e,t,r){let n=r||l,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}function f(){let e=l,t=e.crypto||e.msCrypto,r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&r())>>e/4).toString(16))}function h(e){return Array.isArray(e)?e:[e]}let p=1e3;function m(){return Date.now()/p}let y=function(){let{performance:e}=l;if(!e||!e.now)return m;let t=Date.now()-e.now(),r=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(r+e.now())/p}();(()=>{let{performance:e}=l;if(!e||!e.now){i="none";return}let t=36e5,r=e.now(),n=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,a=o{let n=w[e];r[e]=t[e],t[e]=n});try{return e()}finally{n.forEach(e=>{t[e]=r[e]})}}let _=function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return g?v.forEach(r=>{t[r]=(...t)=>{e&&S(()=>{l.console[r](`${b}[${r}]:`,...t)})}}):v.forEach(e=>{t[e]=()=>void 0}),t}(),A="production",E="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;!function(e){let t=0;e[e.PENDING=t]="PENDING";let r=1;e[e.RESOLVED=r]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"}(n||(n={}));class k{constructor(e){k.prototype.__init.call(this),k.prototype.__init2.call(this),k.prototype.__init3.call(this),k.prototype.__init4.call(this),this._state=n.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new k((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new k((t,r)=>{let n,i;return this.then(t=>{i=!1,n=t,e&&e()},t=>{i=!0,n=t,e&&e()}).then(()=>{if(i){r(n);return}t(n)})})}__init(){this._resolve=e=>{this._setResult(n.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(n.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===n.PENDING){if(u(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===n.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===n.RESOLVED&&e[1](this._value),this._state===n.REJECTED&&e[2](this._value),e[0]=!0)})}}}function M(){return d("globalEventProcessors",()=>[])}function P(e,t,r,n=0){return new k((i,o)=>{let a=e[n];if(null===t||"function"!=typeof a)i(t);else{let s=a({...t},r);E&&a.id&&null===s&&_.log(`Event processor "${a.id}" dropped event`),u(s)?s.then(t=>P(e,t,r,n+1).then(i)).then(null,o):P(e,s,r,n+1).then(i).then(null,o)}})}function x(e){return I(e,new Map)}function I(e,t){if(T(e)){let r=t.get(e);if(void 0!==r)return r;let n={};for(let r of(t.set(e,n),Object.keys(e)))void 0!==e[r]&&(n[r]=I(e[r],t));return n}if(Array.isArray(e)){let r=t.get(e);if(void 0!==r)return r;let n=[];return t.set(e,n),e.forEach(e=>{n.push(I(e,t))}),n}return e}function T(e){if(!s(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}function C(e){let t=y(),r={sid:f(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>j(r)};return e&&O(r,e),r}function O(e,t={}){if(!t.user||(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||y(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:f()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function R(e,t){let r={};t?r={status:t}:"ok"===e.status&&(r={status:"exited"}),O(e,r)}function j(e){return x({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function D(e){return e.transaction}let N=1;function L(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:o,status:a,tags:s,origin:u}=U(e);return x({data:n,op:i,parent_span_id:o,span_id:t,status:a,tags:s,trace_id:r,origin:u})}function U(e){return B(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function B(e){return"function"==typeof e.getSpanJSON}function W(e){let{traceFlags:t}=e.spanContext();return!!(t&N)}function F(e,t,r){let n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=r&&r.getUser()||{},a=x({environment:n.environment||A,release:n.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function H(e){let t=eh();if(!t)return{};let r=F(U(e).trace_id||"",t,ep()),n=D(e);if(!n)return r;let i=n&&n._frozenDynamicSamplingContext;if(i)return i;let{sampleRate:o,source:a}=n.metadata;null!=o&&(r.sample_rate=`${o}`);let s=U(n);return a&&"url"!==a&&(r.transaction=s.description),r.sampled=String(W(n)),t.emit&&t.emit("createDsc",r),r}function K(e,t){let{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:o}=t;z(e,t),n&&Z(e,n),J(e,r),q(e,i),G(e,o)}function z(e,t){let{extra:r,tags:n,user:i,contexts:o,level:a,transactionName:s}=t,u=x(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});let c=x(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});let l=x(i);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=x(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),s&&(e.transaction=s)}function q(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function G(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Z(e,t){e.contexts={trace:L(t),...e.contexts};let r=D(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:H(t),...e.sdkProcessingMetadata};let n=U(r).description;n&&(e.tags={transaction:n,...e.tags})}}function J(e,t){e.fingerprint=e.fingerprint?h(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}let $=100;class V{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Y()}static clone(e){return e?e.clone():new V}clone(){let e=new V;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&O(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){let t=e(this);return t instanceof V?t:this}return e instanceof V?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):s(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Y(),this}addBreadcrumb(e,t){let r="number"==typeof t?t:$;if(r<=0)return this;let n={timestamp:m(),...e},i=this._breadcrumbs;return i.push(n),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:e,_attachments:t,_contexts:r,_tags:n,_extra:i,_user:o,_level:a,_fingerprint:s,_eventProcessors:u,_propagationContext:c,_sdkProcessingMetadata:l,_transactionName:d,_span:f}=this;return{breadcrumbs:e,attachments:t,contexts:r,tags:n,extra:i,user:o,level:a,fingerprint:s||[],eventProcessors:u,propagationContext:c,sdkProcessingMetadata:l,transactionName:d,span:f}}applyToEvent(e,t={},r=[]){return K(e,this.getScopeData()),P([...r,...M(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let r=t&&t.event_id?t.event_id:f();if(!this._client)return _.warn("No client configured on scope - will not capture exception!"),r;let n=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){let n=r&&r.event_id?r.event_id:f();if(!this._client)return _.warn("No client configured on scope - will not capture message!"),n;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n},this),n}captureEvent(e,t){let r=t&&t.event_id?t.event_id:f();return this._client?this._client.captureEvent(e,{...t,event_id:r},this):_.warn("No client configured on scope - will not capture event!"),r}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function Y(){return{traceId:f(),spanId:f().substring(16)}}let X=parseFloat("7.101.1"),Q=100;class ee{constructor(e,t,r,n=X){let i,o;this._version=n,t?i=t:(i=new V).setClient(e),r?o=r:(o=new V).setClient(e),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let r=this._lastEventId=t&&t.event_id?t.event_id:f(),n=Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:n,...t,event_id:r}),r}captureMessage(e,t,r){let n=this._lastEventId=r&&r.event_id?r.event_id:f(),i=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n}),n}captureEvent(e,t){let r=t&&t.event_id?t.event_id:f();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...t,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:r,client:n}=this.getStackTop();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Q}=n.getOptions&&n.getOptions()||{};if(o<=0)return;let a={timestamp:m(),...e},s=i?S(()=>i(a,t)):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:r}=this.getStackTop();r&&e(t)}run(e){let t=er(this);try{e(this)}finally{er(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return E&&_.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let r=this._callExtensionMethod("startTransaction",e,t);return E&&!r&&(this.getClient()?_.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': +Sentry.addTracingExtensions(); +Sentry.init({...}); +`):_.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&R(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:r}=this.getStackTop(),{release:n,environment:i=A}=r&&r.getOptions()||{},{userAgent:o}=l.navigator||{},a=C({release:n,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&"ok"===s.status&&O(s,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),r=e.getSession();r&&t&&t.captureSession&&t.captureSession(r)}_callExtensionMethod(e,...t){let r=et().__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[e])return r.extensions[e].apply(this,t);E&&_.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function et(){return l.__SENTRY__=l.__SENTRY__||{extensions:{},hub:void 0},l}function er(e){let t=et(),r=ea(t);return es(t,e),r}function en(){let e=et();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return ei(e)}function ei(e=et()){return(!eo(e)||ea(e).isOlderThan(X))&&es(e,new ee),ea(e)}function eo(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ea(e){return d("hub",()=>new ee,e)}function es(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function eu(e){return e?ec(e)||ed(e)?{captureContext:e}:e:void 0}function ec(e){return e instanceof V||"function"==typeof e}new WeakMap;let el=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function ed(e){return Object.keys(e).some(e=>el.includes(e))}function ef(e,t){return en().captureException(e,eu(t))}function eh(){return en().getClient()}function ep(){return en().getScope()}},79742:function(e,t){"use strict";t.byteLength=c,t.toByteArray=d,t.fromByteArray=p;for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function c(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n}function l(e,t,r){return(t+r)*3/4-r}function d(e){var t,r,o=u(e),a=o[0],s=o[1],c=new i(l(e,a,s)),d=0,f=s>0?a-4:a;for(r=0;r>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c}function f(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function h(e,t,r){for(var n=[],i=t;iu?u:s+a));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},88500:function(e,t,r){"use strict";var n=r(48764).Buffer,i=r(48764).SlowBuffer;function o(e,t){if(!n.isBuffer(e)||!n.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i + * @license MIT + */let n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=w,t.INSPECT_MAX_BYTES=50;let a=2147483647;function s(){try{let 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}}function u(e){if(e>a)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return y(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ea(e,ArrayBuffer)||e&&ea(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(ea(e,SharedArrayBuffer)||e&&ea(e.buffer,SharedArrayBuffer)))return g(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);let i=b(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function f(e,t,r){return(d(e),e<=0)?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}function h(e){return d(e),u(e<0?0:0|v(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|S(e,t),n=u(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function m(e){let t=e.length<0?0:0|v(e.length),r=u(t);for(let n=0;n=a)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function S(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ea(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ei(e).length;default:if(i)return n?-1:et(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return D(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function A(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function E(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),es(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:k(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):k(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function k(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;no&&(n=o):n=o;let a=t.length;for(n>a/2&&(n=a/2),i=0;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(u=(31&t)<<6|63&r)>127&&(o=u);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(u=(15&t)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return j(n)}t.kMaxLength=a,c.TYPED_ARRAY_SUPPORT=s(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return f(e,t,r)},c.allocUnsafe=function(e){return h(e)},c.allocUnsafeSlow=function(e){return h(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(ea(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),ea(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(c.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},c.byteLength=S,c.prototype._isBuffer=!0,c.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(ea(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw 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 RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,a=r-t,s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return M(this,e,t,r);case"utf8":case"utf-8":return P(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return I(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let R=4096;function j(e){let t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let n=t;nr)throw RangeError("Trying to access beyond buffer length")}function W(e,t,r,n,i,o){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function F(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function H(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function K(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function z(e,t,r,n,o){return t=+t,r>>>=0,o||K(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||K(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=ec(function(e){Y(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return(e>>>=0,t||B(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=ec(function(e){Y(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;W(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;W(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||W(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||W(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},c.prototype.writeBigUInt64LE=ec(function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ec(function(e,t=0){return H(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);W(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);W(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||W(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||W(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||W(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},c.prototype.writeBigInt64LE=ec(function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ec(function(e,t=0){return H(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw 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=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function $(e,t,r){Y(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&X(t,e.length-(r+1))}function V(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new G.ERR_OUT_OF_RANGE("value",n,e)}$(n,i,o)}function Y(e,t){if("number"!=typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,r){if(Math.floor(e)!==e)throw Y(e,r),new G.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),Z("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=J(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=J(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let Q=/[^+/0-9A-Za-z-_]/g;function ee(e){if((e=(e=e.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function et(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319||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=(i-55296<<10|r-56320)+65536}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){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function er(e){let t=[];for(let r=0;r>8,i.push(r%256),i.push(n);return i}function ei(e){return n.toByteArray(ee(e))}function eo(e,t,r,n){let i;for(i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function ea(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function es(e){return e!=e}let eu=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ec(e){return"undefined"==typeof BigInt?el:e}function el(){throw Error("BigInt not supported")}},40487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],n=0,i=0;n>>6-2*i);return r}};e.exports=r}()},12296:function(e,t,r){"use strict";var n=r(31044)(),i=r(76308),o=n&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(e){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),u=r(27296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!u&&u(e,t);if(o)o(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===n&&d?d.enumerable:!n,value:r,writable:null===i&&d?d.writable:!i});else if(!l&&(n||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},24087:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],A(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=S(c,p),c=c[p];h&&!l&&(y[s]=c)}}return c}},35015:function(e,t,r){"use strict";var n=r(89509).Buffer,i=r(6972),o=128,a=48,s=2;function u(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function l(e,t){e=c(e);var r=i(t),l=r+1,d=e.length,f=0;if(e[f++]!==a)throw Error('Could not find expected "seq"');var h=e[f++];if(h===(1|o)&&(h=e[f++]),d-f=o&&--n,n}function f(e,t){e=c(e);var r=i(t),u=e.length;if(u!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+u+'"');var l=d(e,0,r),f=d(e,r,e.length),h=r-l,p=r-f,m=2+h+1+1+p,y=m0&&s.length>o&&!s.warned){s.warned=!0;var o,a,s,l=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,i(l)}return e}function d(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function h(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?g(i):m(i,i.length)}function p(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 m(e,t){for(var r=Array(t),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var a,s=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)n(u,this,t);else for(var c=u.length,l=m(u,c),r=0;r=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():y(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.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=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},17648:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o,a=this;if("function"!=typeof a||n.call(a)!==i)throw TypeError(t+a);for(var s=r.call(arguments,1),u=function(){if(!(this instanceof o))return a.apply(e,s.concat(r.call(arguments)));var t=a.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this},c=Math.max(0,a.length-s.length),l=[],d=0;d1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],A(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=S(c,p),c=c[p];h&&!l&&(y[s]=c)}}return c}},27296:function(e,t,r){"use strict";var n=r(40210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},31044:function(e,t,r){"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},28185:function(e){"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},41405:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(55419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},55419:function(e){"use strict";e.exports=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||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},17642:function(e,t,r){"use strict";var n=r(58612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},48824:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(24753);e.exports=o.call(n,i)},61454:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?5960464477539062e-23:0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},5826:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},67266:function(e,t,r){"use strict";var n=("undefined"!=typeof JSON?JSON:r(58418)).stringify,i=r(5826),o=r(82215),a=r(46009),s=r(62911),u=s("Array.prototype.join"),c=s("Array.prototype.push"),l=function(e,t){for(var r="",n=0;n1?arguments[1]:void 0,r=t&&t.space||"";"number"==typeof r&&(r=l(r," "));var s=!!t&&"boolean"==typeof t.cycles&&t.cycles,f=t&&t.replacer?a(t.replacer):d,h="function"==typeof t?t:t&&t.cmp,p=h&&function(e){var t=h.length>2&&function(t){return e[t]};return function(r,n){return h({key:r,value:e[r]},{key:n,value:e[n]},t?{__proto__:null,get:t}:void 0)}},m=[];return function e(t,a,d,h){var y=r?"\n"+l(h,r):"",g=r?": ":":";if(d&&d.toJSON&&"function"==typeof d.toJSON&&(d=d.toJSON()),void 0!==(d=f(t,a,d))){if("object"!=typeof d||null===d)return n(d);if(i(d)){for(var b=[],v=0;v-1?i(r):r}},46009:function(e,t,r){"use strict";var n=r(26473),i=r(85660),o=r(67771),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,s),l=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},3570:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],A(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=S(c,p),c=c[p];h&&!l&&(y[s]=c)}}return c}},58418:function(e,t,r){"use strict";t.parse=r(51396),t.stringify=r(66177)},51396:function(e){"use strict";var t,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};function o(e){throw{name:"SyntaxError",message:e,at:t,text:n}}function a(e){return e&&e!==r&&o("Expected '"+e+"' instead of '"+r+"'"),r=n.charAt(t),t+=1,r}function s(){var e,t="";for("-"===r&&(t="-",a("-"));r>="0"&&r<="9";)t+=r,a();if("."===r)for(t+=".";a()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,a(),("-"===r||"+"===r)&&(t+=r,a());r>="0"&&r<="9";)t+=r,a();return isFinite(e=Number(t))||o("Bad number"),e}function u(){var e,t,n,s="";if('"'===r)for(;a();){if('"'===r)return a(),s;if("\\"===r){if(a(),"u"===r){for(t=0,n=0;t<4&&isFinite(e=parseInt(a(),16));t+=1)n=16*n+e;s+=String.fromCharCode(n)}else if("string"==typeof i[r])s+=i[r];else break}else s+=r}o("Bad string")}function c(){for(;r&&r<=" ";)a()}function l(){switch(r){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null;default:o("Unexpected '"+r+"'")}}function d(){var e=[];if("["===r){if(a("["),c(),"]"===r)return a("]"),e;for(;r;){if(e.push(h()),c(),"]"===r)return a("]"),e;a(","),c()}}o("Bad array")}function f(){var e,t={};if("{"===r){if(a("{"),c(),"}"===r)return a("}"),t;for(;r;){if(e=u(),c(),a(":"),Object.prototype.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=h(),c(),"}"===r)return a("}"),t;a(","),c()}}o("Bad object")}function h(){switch(c(),r){case"{":return f();case"[":return d();case'"':return u();case"-":return s();default:return r>="0"&&r<="9"?s():l()}}e.exports=function(e,i){var a;return n=e,t=0,r=" ",a=h(),c(),r&&o("Syntax error"),"function"==typeof i?function e(t,r){var n,o,a=t[r];if(a&&"object"==typeof a)for(n in h)Object.prototype.hasOwnProperty.call(a,n)&&(void 0===(o=e(a,n))?delete a[n]:a[n]=o);return i.call(t,r,a)}({"":a},""):a}},66177:function(e){"use strict";var t,r,n,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,i){var o,u,c,l,d,f=t,h=i[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof n&&(h=n.call(i,e,h)),typeof h){case"string":return a(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=r,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(o=0,l=h.length;o=15.7.0")},14964:function(e,t,r){var n=r(70046),i=r(82946);e.exports=i.satisfies(n.version,"^6.12.0 || >=8.0.0")},91564:function(e,t,r){var n=r(70046);let i=r(82946);e.exports=i.satisfies(n.version,">=16.9.0")},68034:function(e,t,r){var n=r(57824);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=n(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},47566:function(e,t,r){let n=r(85599),i=r(91564),o={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},a={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let s=o[r];if(!s)throw Error(`Unknown key type "${r}".`);if(!s.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${s.join(", ")}.`);if(n)switch(r){case"ec":let u=t.asymmetricKeyDetails.namedCurve,c=a[e];if(u!==c)throw Error(`"alg" parameter "${e}" requires curve "${c}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:n,mgf1HashAlgorithm:i,saltLength:o}=t.asymmetricKeyDetails;if(n!==`sha${r}`||i!==n)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==o&&o>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},51464:function(e,t,r){var n=r(88500),i=r(89509).Buffer,o=r(42474),a=r(35015),s=r(79720),u='"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',c="secret must be a string or buffer",l="key must be a string or a buffer",d="key must be a string, a buffer or an object",f="function"==typeof o.createPublicKey;function h(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!f||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw b(l)}function p(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw b(d)}function m(e){if(!i.isBuffer(e)){if("string"==typeof e)return e;if(!f||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw b(c)}}function y(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function g(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let o=r(68186),{safeRe:a,t:s}=r(71734),u=r(35957),c=r(89447),l=r(26277),d=r(13801)},13801:function(e,t,r){class n{constructor(e,t){if(t=o(t),e instanceof n){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;return new n(e.raw,t)}if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];s("hyphen replace",e=e.replace(o,I(this.options.includePrerelease))),s("comparator trim",e=e.replace(c[l.COMPARATORTRIM],d)),s("tilde trim",e=e.replace(c[l.TILDETRIM],f)),s("caret trim",e=e.replace(c[l.CARETTRIM],h));let u=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>x(e,this.options));n&&(u=u.filter(e=>(s("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),s("range list",u);let g=new Map;for(let e of u.map(e=>new a(e,this.options))){if(y(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");let b=[...g.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,g=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},v=(e,t)=>(s("comp",e,t),s("caret",e=A(e,t)),s("tildes",e=S(e,t)),s("xrange",e=k(e,t)),s("stars",e=P(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{let r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,(t,r,n,i,o)=>{let a;return s("tilde",e,t,r,n,i,o),w(r)?a="":w(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(s("replaceTilde pr",o),a=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,s("tilde return",a),a})},A=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{s("caret",e,t);let r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,o,a)=>{let u;return s("caret",e,t,r,i,o,a),w(r)?u="":w(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(o)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(s("replaceCaret pr",a),u="0"===r?"0"===i?`>=${r}.${i}.${o}-${a} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${a} <${+r+1}.0.0-0`):(s("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),s("caret return",u),u})},k=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>M(e,t)).join(" ")),M=(e,t)=>{e=e.trim();let r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,(r,n,i,o,a,u)=>{s("xRange",e,r,n,i,o,a,u);let c=w(i),l=c||w(o),d=l||w(a),f=d;return"="===n&&f&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(o=0),a=0,">"===n?(n=">=",l?(i=+i+1,o=0):o=+o+1,a=0):"<="===n&&(n="<",l?i=+i+1:o=+o+1),"<"===n&&(u="-0"),r=`${n+i}.${o}.${a}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),s("xRange return",r),r})},P=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),x=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),I=e=>(t,r,n,i,o,a,s,u,c,l,d,f)=>(r=w(n)?"":w(i)?`>=${n}.0.0${e?"-0":""}`:w(o)?`>=${n}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,u=w(c)?"":w(l)?`<${+c+1}.0.0-0`:w(d)?`<${c}.${+l+1}.0-0`:f?`<=${c}.${l}.${d}-${f}`:e?`<${c}.${l}.${+d+1}-0`:`<=${u}`,`${r} ${u}`.trim()),T=(e,t,r)=>{for(let r=0;r0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},26277:function(e,t,r){let n=r(89447),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(3967),{safeRe:a,t:s}=r(71734),u=r(68186),{compareIdentifiers:c}=r(51149);class l{constructor(e,t){if(t=u(t),e instanceof l){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},53914:function(e,t,r){let n=r(72980),i=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=i},35957:function(e,t,r){let n=r(50250),i=r(76527),o=r(79434),a=r(96788),s=r(17079),u=r(10958),c=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return i(e,r,c);case">":return o(e,r,c);case">=":return a(e,r,c);case"<":return s(e,r,c);case"<=":return u(e,r,c);default:throw TypeError(`Invalid operator: ${t}`)}};e.exports=c},97054:function(e,t,r){let n=r(26277),i=r(72980),{safeRe:o,t:a}=r(71734),s=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n;let i=t.includePrerelease?o[a.COERCERTLFULL]:o[a.COERCERTL];for(;(n=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i.lastIndex=n.index+n[1].length+n[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?o[a.COERCEFULL]:o[a.COERCE]);if(null===r)return null;let s=r[2],u=r[3]||"0",c=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${s}.${u}.${c}${l}${d}`,t)};e.exports=s},41004:function(e,t,r){let n=r(26277),i=(e,t,r)=>{let i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)};e.exports=i},41820:function(e,t,r){let n=r(62781),i=(e,t)=>n(e,t,!0);e.exports=i},62781:function(e,t,r){let n=r(26277),i=(e,t,r)=>new n(e,r).compare(new n(t,r));e.exports=i},21215:function(e,t,r){let n=r(72980),i=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;let a=o>0,s=a?r:i,u=a?i:r,c=!!s.prerelease.length;if(u.prerelease.length&&!c)return u.patch||u.minor?s.patch?"patch":s.minor?"minor":"major":"major";let l=c?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"};e.exports=i},50250:function(e,t,r){let n=r(62781),i=(e,t,r)=>0===n(e,t,r);e.exports=i},79434:function(e,t,r){let n=r(62781),i=(e,t,r)=>n(e,t,r)>0;e.exports=i},96788:function(e,t,r){let n=r(62781),i=(e,t,r)=>n(e,t,r)>=0;e.exports=i},52203:function(e,t,r){let n=r(26277),i=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}};e.exports=i},17079:function(e,t,r){let n=r(62781),i=(e,t,r)=>0>n(e,t,r);e.exports=i},10958:function(e,t,r){let n=r(62781),i=(e,t,r)=>0>=n(e,t,r);e.exports=i},56033:function(e,t,r){let n=r(26277),i=(e,t)=>new n(e,t).major;e.exports=i},77563:function(e,t,r){let n=r(26277),i=(e,t)=>new n(e,t).minor;e.exports=i},76527:function(e,t,r){let n=r(62781),i=(e,t,r)=>0!==n(e,t,r);e.exports=i},72980:function(e,t,r){let n=r(26277),i=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}};e.exports=i},11409:function(e,t,r){let n=r(26277),i=(e,t)=>new n(e,t).patch;e.exports=i},29238:function(e,t,r){let n=r(72980),i=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=i},71212:function(e,t,r){let n=r(62781),i=(e,t,r)=>n(t,e,r);e.exports=i},6397:function(e,t,r){let n=r(41004),i=(e,t)=>e.sort((e,r)=>n(r,e,t));e.exports=i},25809:function(e,t,r){let n=r(13801),i=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)};e.exports=i},22844:function(e,t,r){let n=r(41004),i=(e,t)=>e.sort((e,r)=>n(e,r,t));e.exports=i},53455:function(e,t,r){let n=r(72980),i=(e,t)=>{let r=n(e,t);return r?r.version:null};e.exports=i},82946:function(e,t,r){let n=r(71734),i=r(3967),o=r(26277),a=r(51149),s=r(72980),u=r(53455),c=r(53914),l=r(52203),d=r(21215),f=r(56033),h=r(77563),p=r(11409),m=r(29238),y=r(62781),g=r(71212),b=r(41820),v=r(41004),w=r(22844),S=r(6397),_=r(79434),A=r(17079),E=r(50250),k=r(76527),M=r(96788),P=r(10958),x=r(35957),I=r(97054),T=r(98273),C=r(13801),O=r(25809),R=r(29104),j=r(61679),D=r(88067),N=r(92415),L=r(37236),U=r(85604),B=r(69057),W=r(35918),F=r(21845),H=r(15224),K=r(25320);e.exports={parse:s,valid:u,clean:c,inc:l,diff:d,major:f,minor:h,patch:p,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:S,gt:_,lt:A,eq:E,neq:k,gte:M,lte:P,cmp:x,coerce:I,Comparator:T,Range:C,satisfies:O,toComparators:R,maxSatisfying:j,minSatisfying:D,minVersion:N,validRange:L,outside:U,gtr:B,ltr:W,intersects:F,simplifyRange:H,subset:K,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},3967:function(e){let t="2.0.0",r=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,o=250,a=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:a,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},89447:function(e,t,r){var n=r(70046);let i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=i},51149:function(e){let t=/^[0-9]+$/,r=(e,r)=>{let n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:n}},37149:function(e){class t{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=t},68186:function(e){let t=Object.freeze({loose:!0}),r=Object.freeze({}),n=e=>e?"object"!=typeof e?t:e:r;e.exports=n},71734:function(e,t,r){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(3967),a=r(89447),s=(t=e.exports={}).re=[],u=t.safeRe=[],c=t.src=[],l=t.t={},d=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[f,i]],p=e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},m=(e,t,r)=>{let n=p(t),i=d++;a(e,i,t),l[e]=i,c[i]=t,s[i]=new RegExp(t,r?"g":void 0),u[i]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),m("FULL",`^${c[l.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),m("LOOSE",`^${c[l.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",c[l.COERCE],!0),m("COERCERTLFULL",c[l.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},69057:function(e,t,r){let n=r(85604),i=(e,t,r)=>n(e,t,">",r);e.exports=i},21845:function(e,t,r){let n=r(13801),i=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r));e.exports=i},35918:function(e,t,r){let n=r(85604),i=(e,t,r)=>n(e,t,"<",r);e.exports=i},61679:function(e,t,r){let n=r(26277),i=r(13801),o=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||-1===a.compare(e))&&(a=new n(o=e,r))}),o};e.exports=o},88067:function(e,t,r){let n=r(26277),i=r(13801),o=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||1===a.compare(e))&&(a=new n(o=e,r))}),o};e.exports=o},92415:function(e,t,r){let n=r(26277),i=r(13801),o=r(79434),a=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||o(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||o(r,a))&&(r=a)}return r&&e.test(r)?r:null};e.exports=a},85604:function(e,t,r){let n=r(26277),i=r(98273),{ANY:o}=i,a=r(13801),s=r(25809),u=r(79434),c=r(17079),l=r(10958),d=r(96788),f=(e,t,r,f)=>{let h,p,m,y,g;switch(e=new n(e,f),t=new a(t,f),r){case">":h=u,p=l,m=c,y=">",g=">=";break;case"<":h=c,p=d,m=u,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(let r=0;r{e.semver===o&&(e=new i(">=0.0.0")),a=a||e,s=s||e,h(e.semver,a.semver,f)?a=e:m(e.semver,s.semver,f)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&p(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0};e.exports=f},15224:function(e,t,r){let n=r(25809),i=r(62781);e.exports=(e,t,r)=>{let o=[],a=null,s=null,u=e.sort((e,t)=>i(e,t,r));for(let e of u)n(e,t,r)?(s=e,a||(a=e)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);let c=[];for(let[e,t]of o)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");let l=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(let n of e.set){for(let e of t.set){let t=d(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},c=[new i(">=0.0.0-0")],l=[new i(">=0.0.0")],d=(e,t,r)=>{let n,i,u,d,p,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?c:l}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=l}let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=f(n,t,r):"<"===t.operator||"<="===t.operator?i=h(i,t,r):g.add(t.semver);if(g.size>1||n&&i&&((u=s(n.semver,i.semver,r))>0||0===u&&(">="!==n.operator||"<="!==i.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||i&&!a(e,String(i),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===i.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((d=f(n,e,r))===e&&d!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(i){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((p=h(i,e,r))===e&&p!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||n)&&0!==u)return!1}return(!n||!m||!!i||0===u)&&(!i||!y||!!n||0===u)&&!v&&!b},f=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0?t:">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0?t:"<"===t.operator&&"<="===e.operator?t:e};e.exports=u},29104:function(e,t,r){let n=r(13801),i=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=i},37236:function(e,t,r){let n=r(13801),i=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}};e.exports=i},22506:function(e,t,r){var n=r(48764).Buffer;let i=r(68034),o=r(14964),a=r(47566),s=r(39828),{includes:u,isBoolean:c,isInteger:l,isNumber:d,isPlainObject:f,isString:h,once:p}=r(96486),{KeyObject:m,createSecretKey:y,createPrivateKey:g}=r(42474),b=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];o&&b.splice(3,0,"PS256","PS384","PS512");let v={expiresIn:{isValid:function(e){return l(e)||h(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return l(e)||h(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return h(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:u.bind(null,b),message:'"algorithm" must be a valid string enum value'},header:{isValid:f,message:'"header" must be an object'},encoding:{isValid:h,message:'"encoding" must be a string'},issuer:{isValid:h,message:'"issuer" must be a string'},subject:{isValid:h,message:'"subject" must be a string'},jwtid:{isValid:h,message:'"jwtid" must be a string'},noTimestamp:{isValid:c,message:'"noTimestamp" must be a boolean'},keyid:{isValid:h,message:'"keyid" must be a string'},mutatePayload:{isValid:c,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:c,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:c,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},w={iat:{isValid:d,message:'"iat" should be a number of seconds'},exp:{isValid:d,message:'"exp" should be a number of seconds'},nbf:{isValid:d,message:'"nbf" should be a number of seconds'}};function S(e,t,r,n){if(!f(r))throw Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){let o=e[i];if(!o){if(!t)throw Error('"'+i+'" is not allowed in "'+n+'"');return}if(!o.isValid(r[i]))throw Error(o.message)})}function _(e){return S(v,!1,e,"options")}function A(e){return S(w,!0,e,"payload")}let E={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},k=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,o){"function"==typeof r?(o=r,r={}):r=r||{};let u="object"==typeof e&&!n.isBuffer(e),c=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function l(e){if(o)return o(e);throw e}if(!t&&"none"!==r.algorithm)return l(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof m))try{t=g(t)}catch(e){try{t=y("string"==typeof t?n.from(t):t)}catch(e){return l(Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&"secret"!==t.type)return l(Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if("private"!==t.type)return l(Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return l(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(void 0===e)return l(Error("payload is required"));if(u){try{A(e)}catch(e){return l(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=k.filter(function(e){return void 0!==r[e]});if(t.length>0)return l(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return l(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return l(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{_(r)}catch(e){return l(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{a(c.alg,t)}catch(e){return l(e)}let d=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:u&&(e.iat=d),void 0!==r.notBefore){try{e.nbf=i(r.notBefore,d)}catch(e){return l(e)}if(void 0===e.nbf)return l(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=i(r.expiresIn,d)}catch(e){return l(e)}if(void 0===e.exp)return l(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(E).forEach(function(t){let n=E[t];if(void 0!==r[t]){if(void 0!==e[n])return l(Error('Bad "options.'+t+'" option. The payload already has an "'+n+'" property.'));e[n]=r[t]}});let f=r.encoding||"utf8";if("function"==typeof o)o=o&&p(o),s.createSign({header:c,privateKey:t,payload:e,encoding:f}).once("error",o).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&e.length<256)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));o(null,e)});else{let n=s.sign({header:c,payload:e,secret:t,encoding:f});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&n.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return n}}},17030:function(e,t,r){var n=r(48764).Buffer;let i=r(58619),o=r(8956),a=r(2340),s=r(97626),u=r(68034),c=r(47566),l=r(14964),d=r(39828),{KeyObject:f,createSecretKey:h,createPublicKey:p}=r(42474),m=["RS256","RS384","RS512"],y=["ES256","ES384","ES512"],g=["RS256","RS384","RS512"],b=["HS256","HS384","HS512"];l&&(m.splice(m.length,0,"PS256","PS384","PS512"),g.splice(g.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,l){let v,w,S;if("function"!=typeof r||l||(l=r,r={}),r||(r={}),r=Object.assign({},r),v=l||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new i("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new i("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new i("allowInvalidAsymmetricKeyTypes must be a boolean"));let _=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return v(new i("jwt must be provided"));if("string"!=typeof e)return v(new i("jwt must be a string"));let A=e.split(".");if(3!==A.length)return v(new i("jwt malformed"));try{w=s(e,{complete:!0})}catch(e){return v(e)}if(!w)return v(new i("invalid token"));let E=w.header;if("function"==typeof t){if(!l)return v(new i("verify must be called asynchronous if secret or public key is provided as a callback"));S=t}else S=function(e,r){return r(null,t)};return S(E,function(t,s){let l;if(t)return v(new i("error in secret or public key callback: "+t.message));let S=""!==A[2].trim();if(!S&&s)return v(new i("jwt signature is required"));if(S&&!s)return v(new i("secret or public key must be provided"));if(!S&&!r.algorithms)return v(new i('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=s&&!(s instanceof f))try{s=p(s)}catch(e){try{s=h("string"==typeof s?n.from(s):s)}catch(e){return v(new i("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===s.type?r.algorithms=b:["rsa","rsa-pss"].includes(s.asymmetricKeyType)?r.algorithms=g:"ec"===s.asymmetricKeyType?r.algorithms=y:r.algorithms=m),-1===r.algorithms.indexOf(w.header.alg))return v(new i("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==s.type)return v(new i(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==s.type)return v(new i(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{c(E.alg,s)}catch(e){return v(e)}try{l=d.verify(e,w.header.alg,s)}catch(e){return v(e)}if(!l)return v(new i("invalid signature"));let k=w.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return v(new i("invalid nbf value"));if(k.nbf>_+(r.clockTolerance||0))return v(new o("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return v(new i("invalid exp value"));if(_>=k.exp+(r.clockTolerance||0))return v(new a("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return v(new i("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return v(new i("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return v(new i("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return v(new i("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return v(new i("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return v(new i("iat required when maxAge is specified"));let e=u(r.maxAge,k.iat);if(void 0===e)return v(new i('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(_>=e+(r.clockTolerance||0))return v(new a("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?v(null,{header:E,payload:k,signature:w.signature}):v(null,k)})}},96486:function(e,t,r){var n;e=r.nmd(e),(function(){var i,o="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,m=4,y=1,g=2,b=1,v=2,w=4,S=8,_=16,A=32,E=64,k=128,M=256,P=512,x=30,I="...",T=800,C=16,O=1,R=2,j=3,D=1/0,N=9007199254740991,L=17976931348623157e292,U=0/0,B=4294967295,W=4294967294,F=2147483647,H=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],K="[object Arguments]",z="[object Array]",q="[object AsyncFunction]",G="[object Boolean]",Z="[object Date]",J="[object DOMException]",$="[object Error]",V="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",Q="[object Number]",ee="[object Null]",et="[object Object]",er="[object Promise]",en="[object Proxy]",ei="[object RegExp]",eo="[object Set]",ea="[object String]",es="[object Symbol]",eu="[object Undefined]",ec="[object WeakMap]",el="[object WeakSet]",ed="[object ArrayBuffer]",ef="[object DataView]",eh="[object Float32Array]",ep="[object Float64Array]",em="[object Int8Array]",ey="[object Int16Array]",eg="[object Int32Array]",eb="[object Uint8Array]",ev="[object Uint8ClampedArray]",ew="[object Uint16Array]",eS="[object Uint32Array]",e_=/\b__p \+= '';/g,eA=/\b(__p \+=) '' \+/g,eE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ek=/&(?:amp|lt|gt|quot|#39);/g,eM=/[&<>"']/g,eP=RegExp(ek.source),ex=RegExp(eM.source),eI=/<%-([\s\S]+?)%>/g,eT=/<%([\s\S]+?)%>/g,eC=/<%=([\s\S]+?)%>/g,eO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eR=/^\w*$/,ej=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eD=/[\\^$.*+?()[\]{}|]/g,eN=RegExp(eD.source),eL=/^\s+/,eU=/\s/,eB=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,eW=/\{\n\/\* \[wrapped with (.+)\] \*/,eF=/,? & /,eH=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eK=/[()=,{}\[\]\/\s]/,ez=/\\(\\)?/g,eq=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,eG=/\w*$/,eZ=/^[-+]0x[0-9a-f]+$/i,eJ=/^0b[01]+$/i,e$=/^\[object .+?Constructor\]$/,eV=/^0o[0-7]+$/i,eY=/^(?:0|[1-9]\d*)$/,eX=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,eQ=/($^)/,e0=/['\n\r\u2028\u2029\\]/g,e1="\ud800-\udfff",e2="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",e4="\\u2700-\\u27bf",e6="a-z\\xdf-\\xf6\\xf8-\\xff",e3="A-Z\\xc0-\\xd6\\xd8-\\xde",e8="\\ufe0e\\ufe0f",e5="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",e7="['’]",e9="["+e1+"]",te="["+e5+"]",tt="["+e2+"]",tr="\\d+",tn="["+e4+"]",ti="["+e6+"]",to="[^"+e1+e5+tr+e4+e6+e3+"]",ta="\ud83c[\udffb-\udfff]",ts="[^"+e1+"]",tu="(?:\ud83c[\udde6-\uddff]){2}",tc="[\ud800-\udbff][\udc00-\udfff]",tl="["+e3+"]",td="\\u200d",tf="(?:"+ti+"|"+to+")",th="(?:"+tl+"|"+to+")",tp="(?:"+e7+"(?:d|ll|m|re|s|t|ve))?",tm="(?:"+e7+"(?:D|LL|M|RE|S|T|VE))?",ty="(?:"+tt+"|"+ta+")?",tg="["+e8+"]?",tb="(?:"+td+"(?:"+[ts,tu,tc].join("|")+")"+tg+ty+")*",tv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tS=tg+ty+tb,t_="(?:"+[tn,tu,tc].join("|")+")"+tS,tA="(?:"+[ts+tt+"?",tt,tu,tc,e9].join("|")+")",tE=RegExp(e7,"g"),tk=RegExp(tt,"g"),tM=RegExp(ta+"(?="+ta+")|"+tA+tS,"g"),tP=RegExp([tl+"?"+ti+"+"+tp+"(?="+[te,tl,"$"].join("|")+")",th+"+"+tm+"(?="+[te,tl+tf,"$"].join("|")+")",tl+"?"+tf+"+"+tp,tl+"+"+tm,tw,tv,tr,t_].join("|"),"g"),tx=RegExp("["+td+e1+e2+e8+"]"),tI=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tC=-1,tO={};tO[eh]=tO[ep]=tO[em]=tO[ey]=tO[eg]=tO[eb]=tO[ev]=tO[ew]=tO[eS]=!0,tO[K]=tO[z]=tO[ed]=tO[G]=tO[ef]=tO[Z]=tO[$]=tO[V]=tO[X]=tO[Q]=tO[et]=tO[ei]=tO[eo]=tO[ea]=tO[ec]=!1;var tR={};tR[K]=tR[z]=tR[ed]=tR[ef]=tR[G]=tR[Z]=tR[eh]=tR[ep]=tR[em]=tR[ey]=tR[eg]=tR[X]=tR[Q]=tR[et]=tR[ei]=tR[eo]=tR[ea]=tR[es]=tR[eb]=tR[ev]=tR[ew]=tR[eS]=!0,tR[$]=tR[V]=tR[ec]=!1;var tj={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tD={"&":"&","<":"<",">":">",'"':""","'":"'"},tN={"&":"&","<":"<",">":">",""":'"',"'":"'"},tL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tU=parseFloat,tB=parseInt,tW="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,tF="object"==typeof self&&self&&self.Object===Object&&self,tH=tW||tF||Function("return this")(),tK=t&&!t.nodeType&&t,tz=tK&&e&&!e.nodeType&&e,tq=tz&&tz.exports===tK,tG=tq&&tW.process,tZ=function(){try{var e=tz&&tz.require&&tz.require("util").types;if(e)return e;return tG&&tG.binding&&tG.binding("util")}catch(e){}}(),tJ=tZ&&tZ.isArrayBuffer,t$=tZ&&tZ.isDate,tV=tZ&&tZ.isMap,tY=tZ&&tZ.isRegExp,tX=tZ&&tZ.isSet,tQ=tZ&&tZ.isTypedArray;function t0(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function t1(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function t5(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function rE(e,t){for(var r=e.length;r--&&ru(t,e[r],0)>-1;);return r}function rk(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var rM=rh(tj),rP=rh(tD);function rx(e){return"\\"+tL[e]}function rI(e,t){return null==e?i:e[t]}function rT(e){return tx.test(e)}function rC(e){return tI.test(e)}function rO(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function rR(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function rj(e,t){return function(r){return e(t(r))}}function rD(e,t){for(var r=-1,n=e.length,i=0,o=[];++r-1}function nd(e,t){var r=this.__data__,n=nR(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function nf(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function nW(e,t,r,n,o,a){var s,u=t&h,c=t&p,l=t&m;if(r&&(s=o?r(e,n,o,a):r(e)),i!==s)return s;if(!uX(e))return e;var d=uN(e);if(d){if(s=o3(e),!u)return ou(e,s)}else{var f=o1(e),y=f==V||f==Y;if(uF(e))return i7(e,u);if(f==et||f==K||y&&!o){if(s=c||y?{}:o8(e),!u)return c?od(e,nN(s,e)):ol(e,nD(s,e))}else{if(!tR[f])return o?e:{};s=o5(e,f,u)}}a||(a=new nS);var g=a.get(e);if(g)return g;a.set(e,s),ct(e)?e.forEach(function(n){s.add(nW(n,t,r,n,e,a))}):u0(e)&&e.forEach(function(n,i){s.set(i,nW(n,t,r,i,e,a))});var b=l?c?oz:oK:c?cF:cW,v=d?i:b(e);return t2(v||e,function(n,i){v&&(n=e[i=n]),nO(s,i,nW(n,t,r,i,e,a))}),s}function nF(e){var t=cW(e);return function(r){return nH(r,e,t)}}function nH(e,t,r){var n=r.length;if(null==e)return!n;for(e=e2(e);n--;){var o=r[n],a=t[o],s=e[o];if(i===s&&!(o in e)||!a(s))return!1}return!0}function nK(e,t,r){if("function"!=typeof e)throw new e3(u);return av(function(){e.apply(i,r)},t)}function nz(e,t,r,n){var i=-1,o=t8,s=!0,u=e.length,c=[],l=t.length;if(!u)return c;r&&(t=t7(t,rw(r))),n?(o=t5,s=!1):t.length>=a&&(o=r_,s=!1,t=new nb(t));t:for(;++io?0:o+r),(n=i===n||n>o?o:cf(n))<0&&(n+=o),n=r>n?0:ch(n);r0&&r(s)?t>1?nY(s,t-1,r,n,i):t9(i,s):n||(i[i.length]=s)}return i}var nX=om(),nQ=om(!0);function n0(e,t){return e&&nX(e,t,cW)}function n1(e,t){return e&&nQ(e,t,cW)}function n2(e,t){return t3(t,function(t){return u$(e[t])})}function n4(e,t){t=i6(t,e);for(var r=0,n=t.length;null!=e&&rt}function n5(e,t){return null!=e&&tt.call(e,t)}function n7(e,t){return null!=e&&t in e2(e)}function n9(e,t,r){return e>=tL(t,r)&&e=120&&f.length>=120)?new nb(u&&f):i}f=e[0];var h=-1,p=c[0];t:for(;++h-1;)s!==e&&tm.call(s,u,1),tm.call(e,u,1);return e}function iC(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;ae(i)?tm.call(e,i,1):iV(e,i)}}return e}function iO(e,t){return e+tM(tK()*(t-e+1))}function iR(e,t,n,i){for(var o=-1,a=tN(tA((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}function ij(e,t){var r="";if(!e||t<1||t>N)return r;do t%2&&(r+=e),(t=tM(t/2))&&(e+=e);while(t);return r}function iD(e,t){return aw(ap(e,t,lU),e+"")}function iN(e){return nx(c3(e))}function iL(e,t){var r=c3(e);return aA(r,nB(t,0,r.length))}function iU(e,t,r,n){if(!uX(e))return e;t=i6(t,e);for(var o=-1,a=t.length,s=a-1,u=e;null!=u&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!cn(a)&&(r?a<=t:a=a){var l=t?null:oR(e);if(l)return rN(l);s=!1,i=r_,c=new nb}else c=t?[]:u;t:for(;++n=n?e:iH(e,t,r)}var i5=tw||function(e){return tH.clearTimeout(e)};function i7(e,t){if(t)return e.slice();var r=e.length,n=td?td(r):new e.constructor(r);return e.copy(n),n}function i9(e){var t=new e.constructor(e.byteLength);return new tl(t).set(new tl(e)),t}function oe(e,t){var r=t?i9(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function ot(e){var t=new e.constructor(e.source,eG.exec(e));return t.lastIndex=e.lastIndex,t}function or(e){return r0?e2(r0.call(e)):{}}function on(e,t){var r=t?i9(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function oi(e,t){if(e!==t){var r=i!==e,n=null===e,o=e==e,a=cn(e),s=i!==t,u=null===t,c=t==t,l=cn(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||n&&s&&c||!r&&c||!o)return 1;if(!n&&!a&&!l&&e=s)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}function oa(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=t.length,l=tN(a-s,0),d=r(c+l),f=!i;++u1?r[o-1]:i,s=o>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&at(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=e2(t);++n-1?o[a?t[s]:s]:i}}function o_(e){return oH(function(t){var r=t.length,n=r,o=r3.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new e3(u);if(o&&!s&&"wrapper"==oG(a))var s=new r3([],!0)}for(n=s?n:r;++n1&&b.reverse(),f&&lu))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=r&g?new nb:i;for(a.set(e,t),a.set(t,e);++f1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(eB,"{\n/* [wrapped with "+t+"] */\n")}function o9(e){return uN(e)||uD(e)||!!(ty&&e&&e[ty])}function ae(e,t){var r=typeof e;return!!(t=null==t?N:t)&&("number"==r||"symbol"!=r&&eY.test(e))&&e>-1&&e%1==0&&e0){if(++t>=T)return arguments[0]}else t=0;return e.apply(i,arguments)}}function aA(e,t){var r=-1,n=e.length,o=n-1;for(t=i===t?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,sw(e,r)});function sI(e){var t=r2(e);return t.__chain__=!0,t}function sT(e,t){return t(e),e}function sC(e,t){return t(e)}var sO=oH(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nU(t,e)};return!(t>1)&&!this.__actions__.length&&n instanceof r8&&ae(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:sC,args:[o],thisArg:i}),new r3(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});function sR(){return sI(this)}function sj(){return new r3(this.value(),this.__chain__)}function sD(){i===this.__values__&&(this.__values__=cl(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function sN(){return this}function sL(e){for(var t,r=this;r instanceof r6;){var n=ax(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t}function sU(){var e=this.__wrapped__;if(e instanceof r8){var t=e;return this.__actions__.length&&(t=new r8(this)),(t=t.reverse()).__actions__.push({func:sC,args:[a7],thisArg:i}),new r3(t,this.__chain__)}return this.thru(a7)}function sB(){return iQ(this.__wrapped__,this.__actions__)}var sW=of(function(e,t,r){tt.call(e,r)?++e[r]:nL(e,r,1)});function sF(e,t,r){var n=uN(e)?t6:nZ;return r&&at(e,t,r)&&(t=i),n(e,oJ(t,3))}function sH(e,t){return(uN(e)?t3:nV)(e,oJ(t,3))}var sK=oS(aW),sz=oS(aF);function sq(e,t){return nY(s0(e,t),1)}function sG(e,t){return nY(s0(e,t),D)}function sZ(e,t,r){return r=i===r?1:cf(r),nY(s0(e,t),r)}function sJ(e,t){return(uN(e)?t2:nq)(e,oJ(t,3))}function s$(e,t){return(uN(e)?t4:nG)(e,oJ(t,3))}var sV=of(function(e,t,r){tt.call(e,r)?e[r].push(t):nL(e,r,[t])});function sY(e,t,r,n){e=uU(e)?e:c3(e),r=r&&!n?cf(r):0;var i=e.length;return r<0&&(r=tN(i+r,0)),cr(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&ru(e,t,r)>-1}var sX=iD(function(e,t,n){var i=-1,o="function"==typeof t,a=uU(e)?r(e.length):[];return nq(e,function(e){a[++i]=o?t0(t,e,n):ir(e,t,n)}),a}),sQ=of(function(e,t,r){nL(e,r,t)});function s0(e,t){return(uN(e)?t7:iw)(e,oJ(t,3))}function s1(e,t,r,n){return null==e?[]:(uN(t)||(t=null==t?[]:[t]),uN(r=n?i:r)||(r=null==r?[]:[r]),iM(e,t,r))}var s2=of(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function s4(e,t,r){var n=uN(e)?re:rp,i=arguments.length<3;return n(e,oJ(t,4),r,i,nq)}function s6(e,t,r){var n=uN(e)?rt:rp,i=arguments.length<3;return n(e,oJ(t,4),r,i,nG)}function s3(e,t){return(uN(e)?t3:nV)(e,um(oJ(t,3)))}function s8(e){return(uN(e)?nx:iN)(e)}function s5(e,t,r){return t=(r?at(e,t,r):i===t)?1:cf(t),(uN(e)?nI:iL)(e,t)}function s7(e){return(uN(e)?nT:iF)(e)}function s9(e){if(null==e)return 0;if(uU(e))return cr(e)?rW(e):e.length;var t=o1(e);return t==X||t==eo?e.size:ig(e).length}function ue(e,t,r){var n=uN(e)?rr:iK;return r&&at(e,t,r)&&(t=i),n(e,oJ(t,3))}var ut=iD(function(e,t){if(null==e)return[];var r=t.length;return r>1&&at(e,t[0],t[1])?t=[]:r>2&&at(t[0],t[1],t[2])&&(t=[t[0]]),iM(e,nY(t,1),[])}),ur=tS||function(){return tH.Date.now()};function un(e,t){if("function"!=typeof t)throw new e3(u);return e=cf(e),function(){if(--e<1)return t.apply(this,arguments)}}function ui(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,oD(e,k,i,i,i,i,t)}function uo(e,t){var r;if("function"!=typeof t)throw new e3(u);return e=cf(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ua=iD(function(e,t,r){var n=b;if(r.length){var i=rD(r,oZ(ua));n|=A}return oD(e,n,t,r,i)}),us=iD(function(e,t,r){var n=b|v;if(r.length){var i=rD(r,oZ(us));n|=A}return oD(t,n,e,r,i)});function uu(e,t,r){t=r?i:t;var n=oD(e,S,i,i,i,i,i,t);return n.placeholder=uu.placeholder,n}function uc(e,t,r){t=r?i:t;var n=oD(e,_,i,i,i,i,i,t);return n.placeholder=uc.placeholder,n}function ul(e,t,r){var n,o,a,s,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new e3(u);function m(t){var r=n,a=o;return n=o=i,d=t,s=e.apply(a,r)}function y(e){return d=e,c=av(v,t),f?m(e):s}function g(e){var r=e-l,n=e-d,i=t-r;return h?tL(i,a-n):i}function b(e){var r=e-l,n=e-d;return i===l||r>=t||r<0||h&&n>=a}function v(){var e=ur();if(b(e))return w(e);c=av(v,g(e))}function w(e){return(c=i,p&&n)?m(e):(n=o=i,s)}function S(){i!==c&&i5(c),d=0,n=l=o=c=i}function _(){return i===c?s:w(ur())}function A(){var e=ur(),r=b(e);if(n=arguments,o=this,l=e,r){if(i===c)return y(l);if(h)return i5(c),c=av(v,t),m(l)}return i===c&&(c=av(v,t)),s}return t=cp(t)||0,uX(r)&&(f=!!r.leading,a=(h="maxWait"in r)?tN(cp(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),A.cancel=S,A.flush=_,A}var ud=iD(function(e,t){return nK(e,1,t)}),uf=iD(function(e,t,r){return nK(e,cp(t)||0,r)});function uh(e){return oD(e,P)}function up(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new e3(u);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(up.Cache||nf),r}function um(e){if("function"!=typeof e)throw new e3(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function uy(e){return uo(2,e)}up.Cache=nf;var ug=i3(function(e,t){var r=(t=1==t.length&&uN(t[0])?t7(t[0],rw(oJ())):t7(nY(t,1),rw(oJ()))).length;return iD(function(n){for(var i=-1,o=tL(n.length,r);++i=t}),uD=ii(function(){return arguments}())?ii:function(e){return uQ(e)&&tt.call(e,"callee")&&!tp.call(e,"callee")},uN=r.isArray,uL=tJ?rw(tJ):io;function uU(e){return null!=e&&uY(e.length)&&!u$(e)}function uB(e){return uQ(e)&&uU(e)}function uW(e){return!0===e||!1===e||uQ(e)&&n3(e)==G}var uF=tx||l2,uH=t$?rw(t$):ia;function uK(e){return uQ(e)&&1===e.nodeType&&!u7(e)}function uz(e){if(null==e)return!0;if(uU(e)&&(uN(e)||"string"==typeof e||"function"==typeof e.splice||uF(e)||ci(e)||uD(e)))return!e.length;var t=o1(e);if(t==X||t==eo)return!e.size;if(as(e))return!ig(e).length;for(var r in e)if(tt.call(e,r))return!1;return!0}function uq(e,t){return is(e,t)}function uG(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return i===n?is(e,t,i,r):!!n}function uZ(e){if(!uQ(e))return!1;var t=n3(e);return t==$||t==J||"string"==typeof e.message&&"string"==typeof e.name&&!u7(e)}function uJ(e){return"number"==typeof e&&tI(e)}function u$(e){if(!uX(e))return!1;var t=n3(e);return t==V||t==Y||t==q||t==en}function uV(e){return"number"==typeof e&&e==cf(e)}function uY(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=N}function uX(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function uQ(e){return null!=e&&"object"==typeof e}var u0=tV?rw(tV):ic;function u1(e,t){return e===t||il(e,t,oV(t))}function u2(e,t,r){return r="function"==typeof r?r:i,il(e,t,oV(t),r)}function u4(e){return u5(e)&&e!=+e}function u6(e){if(aa(e))throw new eU(s);return id(e)}function u3(e){return null===e}function u8(e){return null==e}function u5(e){return"number"==typeof e||uQ(e)&&n3(e)==Q}function u7(e){if(!uQ(e)||n3(e)!=et)return!1;var t=tf(e);if(null===t)return!0;var r=tt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&te.call(r)==to}var u9=tY?rw(tY):ih;function ce(e){return uV(e)&&e>=-N&&e<=N}var ct=tX?rw(tX):ip;function cr(e){return"string"==typeof e||!uN(e)&&uQ(e)&&n3(e)==ea}function cn(e){return"symbol"==typeof e||uQ(e)&&n3(e)==es}var ci=tQ?rw(tQ):im;function co(e){return i===e}function ca(e){return uQ(e)&&o1(e)==ec}function cs(e){return uQ(e)&&n3(e)==el}var cu=oT(iv),cc=oT(function(e,t){return e<=t});function cl(e){if(!e)return[];if(uU(e))return cr(e)?rF(e):ou(e);if(tg&&e[tg])return rO(e[tg]());var t=o1(e);return(t==X?rR:t==eo?rN:c3)(e)}function cd(e){return e?(e=cp(e))===D||e===-D?(e<0?-1:1)*L:e==e?e:0:0===e?e:0}function cf(e){var t=cd(e),r=t%1;return t==t?r?t-r:t:0}function ch(e){return e?nB(cf(e),0,B):0}function cp(e){if("number"==typeof e)return e;if(cn(e))return U;if(uX(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=uX(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=rv(e);var r=eJ.test(e);return r||eV.test(e)?tB(e.slice(2),r?2:8):eZ.test(e)?U:+e}function cm(e){return oc(e,cF(e))}function cy(e){return e?nB(cf(e),-N,N):0===e?e:0}function cg(e){return null==e?"":iJ(e)}var cb=oh(function(e,t){if(as(t)||uU(t)){oc(t,cW(t),e);return}for(var r in t)tt.call(t,r)&&nO(e,r,t[r])}),cv=oh(function(e,t){oc(t,cF(t),e)}),cw=oh(function(e,t,r,n){oc(t,cF(t),e,n)}),cS=oh(function(e,t,r,n){oc(t,cW(t),e,n)}),c_=oH(nU);function cA(e,t){var r=r4(e);return null==t?r:nD(r,t)}var cE=iD(function(e,t){e=e2(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&at(t[0],t[1],o)&&(n=1);++r1),t}),oc(e,oz(e),r),n&&(r=nW(r,h|p|m,oU));for(var i=t.length;i--;)iV(r,t[i]);return r});function cZ(e,t){return c$(e,um(oJ(t)))}var cJ=oH(function(e,t){return null==e?{}:iP(e,t)});function c$(e,t){if(null==e)return{};var r=t7(oz(e),function(e){return[e]});return t=oJ(t),ix(e,r,function(e,r){return t(e,r[0])})}function cV(e,t,r){t=i6(t,e);var n=-1,o=t.length;for(o||(o=1,e=i);++nt){var n=e;e=t,t=n}if(r||e%1||t%1){var o=tK();return tL(e+o*(t-e+tU("1e-"+((o+"").length-1))),t)}return iO(e,t)}var le=ob(function(e,t,r){return t=t.toLowerCase(),e+(r?lt(t):t)});function lt(e){return lx(cg(e).toLowerCase())}function lr(e){return(e=cg(e))&&e.replace(eX,rM).replace(tk,"")}function ln(e,t,r){e=cg(e),t=iJ(t);var n=e.length,o=r=i===r?n:nB(cf(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t}function li(e){return(e=cg(e))&&ex.test(e)?e.replace(eM,rP):e}function lo(e){return(e=cg(e))&&eN.test(e)?e.replace(eD,"\\$&"):e}var la=ob(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),ls=ob(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),lu=og("toLowerCase");function lc(e,t,r){e=cg(e);var n=(t=cf(t))?rW(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return oP(tM(i),r)+e+oP(tA(i),r)}function ll(e,t,r){e=cg(e);var n=(t=cf(t))?rW(e):0;return t&&n>>0)?(e=cg(e))&&("string"==typeof t||null!=t&&!u9(t))&&!(t=iJ(t))&&rT(e)?i8(rF(e),0,r):e.split(t,r):[]}var lg=ob(function(e,t,r){return e+(r?" ":"")+lx(t)});function lb(e,t,r){return e=cg(e),r=null==r?0:nB(cf(r),0,e.length),t=iJ(t),e.slice(r,r+t.length)==t}function lv(e,t,r){var n=r2.templateSettings;r&&at(e,t,r)&&(t=i),e=cg(e),t=cw({},t,n,oN);var o,a,s=cw({},t.imports,n.imports,oN),u=cW(s),l=rS(s,u),d=0,f=t.interpolate||eQ,h="__p += '",p=e4((t.escape||eQ).source+"|"+f.source+"|"+(f===eC?eq:eQ).source+"|"+(t.evaluate||eQ).source+"|$","g"),m="//# sourceURL="+(tt.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tC+"]")+"\n";e.replace(p,function(t,r,n,i,s,u){return n||(n=i),h+=e.slice(d,u).replace(e0,rx),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=u+t.length,t}),h+="';\n";var y=tt.call(t,"variable")&&t.variable;if(y){if(eK.test(y))throw new eU(c)}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(e_,""):h).replace(eA,"$1").replace(eE,"$1;"),h="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=lT(function(){return eH(u,m+"return "+h).apply(i,l)});if(g.source=h,uZ(g))throw g;return g}function lw(e){return cg(e).toLowerCase()}function lS(e){return cg(e).toUpperCase()}function l_(e,t,r){if((e=cg(e))&&(r||i===t))return rv(e);if(!e||!(t=iJ(t)))return e;var n=rF(e),o=rF(t),a=rA(n,o),s=rE(n,o)+1;return i8(n,a,s).join("")}function lA(e,t,r){if((e=cg(e))&&(r||i===t))return e.slice(0,rH(e)+1);if(!e||!(t=iJ(t)))return e;var n=rF(e),o=rE(n,rF(t))+1;return i8(n,0,o).join("")}function lE(e,t,r){if((e=cg(e))&&(r||i===t))return e.replace(eL,"");if(!e||!(t=iJ(t)))return e;var n=rF(e),o=rA(n,rF(t));return i8(n,o).join("")}function lk(e,t){var r=x,n=I;if(uX(t)){var o="separator"in t?t.separator:o;r="length"in t?cf(t.length):r,n="omission"in t?iJ(t.omission):n}var a=(e=cg(e)).length;if(rT(e)){var s=rF(e);a=s.length}if(r>=a)return e;var u=r-rW(n);if(u<1)return n;var c=s?i8(s,0,u).join(""):e.slice(0,u);if(i===o)return c+n;if(s&&(u+=c.length-u),u9(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=e4(o.source,cg(eG.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,i===f?u:f)}}else if(e.indexOf(iJ(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+n}function lM(e){return(e=cg(e))&&eP.test(e)?e.replace(ek,rK):e}var lP=ob(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),lx=og("toUpperCase");function lI(e,t,r){return(e=cg(e),t=r?i:t,i===t)?rC(e)?rG(e):ro(e):e.match(t)||[]}var lT=iD(function(e,t){try{return t0(e,i,t)}catch(e){return uZ(e)?e:new eU(e)}}),lC=oH(function(e,t){return t2(t,function(t){nL(e,t=ak(t),ua(e[t],e))}),e});function lO(e){var t=null==e?0:e.length,r=oJ();return e=t?t7(e,function(e){if("function"!=typeof e[1])throw new e3(u);return[r(e[0]),e[1]]}):[],iD(function(r){for(var n=-1;++nN)return[];var r=B,n=tL(e,B);t=oJ(t),e-=B;for(var i=rg(n,t);++r0||t<0)?new r8(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),i!==t&&(r=(t=cf(t))<0?r.dropRight(-t):r.take(t-e)),r)},r8.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},r8.prototype.toArray=function(){return this.take(B)},n0(r8.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=r2[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(r2.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof r8,c=s[0],l=u||uN(t),d=function(e){var t=o.apply(r2,t9([e],s));return n&&f?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,m=u&&!h;if(!a&&l){t=m?t:new r8(this);var y=e.apply(t,s);return y.__actions__.push({func:sC,args:[d],thisArg:i}),new r3(y,f)}return p&&m?e.apply(this,s):(y=this.thru(d),p?n?y.value()[0]:y.value():y)})}),t2(["pop","push","shift","sort","splice","unshift"],function(e){var t=e8[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);r2.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(uN(i)?i:[],e)}return this[r](function(r){return t.apply(uN(r)?r:[],e)})}}),n0(r8.prototype,function(e,t){var r=r2[t];if(r){var n=r.name+"";tt.call(rq,n)||(rq[n]=[]),rq[n].push({name:t,func:r})}}),rq[oA(i,v).name]=[{name:"wrapper",func:i}],r8.prototype.clone=r5,r8.prototype.reverse=r7,r8.prototype.value=r9,r2.prototype.at=sO,r2.prototype.chain=sR,r2.prototype.commit=sj,r2.prototype.next=sD,r2.prototype.plant=sL,r2.prototype.reverse=sU,r2.prototype.toJSON=r2.prototype.valueOf=r2.prototype.value=sB,r2.prototype.first=r2.prototype.head,tg&&(r2.prototype[tg]=sN),r2}();tH._=rZ,i!==(n=(function(){return rZ}).call(t,r,t,e))&&(e.exports=n)}).call(this)},88918:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let o=i(r(63931));function a(e,t="maxAge"){let r,i,a;let s=()=>n(this,void 0,void 0,function*(){if(void 0!==r)return;let s=s=>n(this,void 0,void 0,function*(){a=o.default();let n=s[1][t]-Date.now();if(n<=0){e.delete(s[0]),a.resolve();return}return r=s[0],"function"==typeof(i=setTimeout(()=>{e.delete(s[0]),a&&a.resolve()},n)).unref&&i.unref(),a.promise});try{for(let t of e)yield s(t)}catch(e){}r=void 0}),u=()=>{r=void 0,void 0!==i&&(clearTimeout(i),i=void 0),void 0!==a&&(a.reject(void 0),a=void 0)},c=e.set.bind(e);return e.set=(t,n)=>{e.has(t)&&e.delete(t);let i=c(t,n);return r&&r===t&&u(),s(),i},s(),e}t.default=a,e.exports=a,e.exports.default=a},2568:function(e,t,r){!function(){var t=r(71012),n=r(40487).utf8,i=r(70076),o=r(40487).bin,a=function(e,r){e.constructor==String?e=r&&"binary"===r.encoding?o.stringToBytes(e):n.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,d=-1732584194,f=271733878,h=0;h>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360;s[u>>>5]|=128<>>9<<4)+14]=u;for(var p=a._ff,m=a._gg,y=a._hh,g=a._ii,h=0;h>>0,l=l+v>>>0,d=d+w>>>0,f=f+S>>>0}return t.endian([c,l,d,f])};a._ff=function(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+(i>>>0)+a;return(s<>>32-o)+t},a._gg=function(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+(i>>>0)+a;return(s<>>32-o)+t},a._hh=function(e,t,r,n,i,o,a){var s=e+(t^r^n)+(i>>>0)+a;return(s<>>32-o)+t},a._ii=function(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+(i>>>0)+a;return(s<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,r){if(null==e)throw Error("Illegal argument "+e);var n=t.wordsToBytes(a(e,r));return r&&r.asBytes?n:r&&r.asString?o.bytesToString(n):t.bytesToHex(n)}}()},70076:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */e.exports=function(e){return null!=e&&(t(e)||r(e)||!!e._isBuffer)}},57824:function(e){var t=1e3,r=6e4,n=36e5,i=864e5,o=6048e5,a=315576e5;function s(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var u=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function u(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var o=Math.abs(e);return o>=i?l(e,o,i,"day"):o>=n?l(e,o,n,"hour"):o>=r?l(e,o,r,"minute"):o>=t?l(e,o,t,"second"):e+" ms"}function l(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return s(e);if("number"===r&&isFinite(e))return t.long?c(e):u(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},85793:function(e,t,r){"use strict";r.d(t,{NZ:function(){return s},ZP:function(){return u},yZ:function(){return o}});var n=r(67294),i=r(85893),o={OK:"OK",SLOW:"SLOW",ERROR:"ERROR"},a=(0,n.createContext)(),s=function(){return(0,n.useContext)(a)};function u(e){var t=e.children,r=(0,n.useState)(o.OK),s=r[0],u=r[1],c=(0,n.useMemo)(function(){return{openAIStatus:s,setOpenAIStatus:u}},[s]);return(0,i.jsx)(a.Provider,{value:c,children:t})}},71501:function(e,t,r){"use strict";r.d(t,{Z:function(){return s},o:function(){return a}});var n=r(67294),i=r(85893),o=(0,n.createContext)(),a=function(){return(0,n.useContext)(o)};function s(e){var t=e.children,r=(0,n.useState)([]),a=r[0],s=r[1],u=(0,n.useMemo)(function(){return{openingPopupIDs:a,setOpeningPopupIDs:s}},[a,s]);return(0,i.jsx)(o.Provider,{value:u,children:t})}},10245:function(e,t,r){"use strict";r.d(t,{Z:function(){return eI},n:function(){return eP}});var n=r(90116),i=r(50029),o=r(17674),a=r(59499),s=r(64687),u=r.n(s),c=r(96486),l=r.n(c),d=r(67266),f=r.n(d),h=r(13083),p=r(67294),m=r(19261),y=r(24855),g=r(31955),b=r(4361),v=r(78798),w=r(134),S=r(33129),_=r(72152),A=r(79544),E=r(85893);function k(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 M(e){for(var t=1;t1&&void 0!==el[1]?el[1]:{}).resync)&&s,f=o.lastSyncBySections,e.prev=1,I=function(){var e=(0,i.Z)(u().mark(function e(){var t,r,n,i,o,a,s;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,t=O.chats,n=(r=(0,m.tB)(t,R,{excludeExceededItems:!0})).chunks,eV({ignoredCount:r.ignoredCount,ignoredChatIDs:r.ignoredChatIDs}),o=0;case 5:if(!(oR)){e.next=22;break}if(!(null!==(N=O.chats)&&void 0!==N&&N.length)){e.next=21;break}return e.next=17,I();case 17:D=e.sent,j=JSON.stringify({allData:M(M({},O),{},{chats:[]}),syncBufferID:D,lastSyncAt:t}),e.next=22;break;case 21:console.error("data exceeded max payload size",j.length,R,j);case 22:return null!==(p=O.deletedChatIDs)&&void 0!==p&&p.length&&ez([]),null!==(b=O.deletedFolderIDs)&&void 0!==b&&b.length&&eF([]),null!==(v=O.deletedPromptIDs)&&void 0!==v&&v.length&&e4([]),null!==(w=O.deletedCharacterIDs)&&void 0!==w&&w.length&&te([]),null!==(S=O.deletedPluginIDs)&&void 0!==S&&S.length&&tc([]),e.next=29,fetch((0,m.wV)()+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+g.Z.get("typingmindcloud_token"),"x-license-token":nh()||""},body:j});case 29:if(!(L=e.sent).ok&&(null!==(U=O.deletedChatIDs)&&void 0!==U&&U.length&&ez(function(e){return Array.from(new Set([].concat((0,n.Z)(e),(0,n.Z)(O.deletedChatIDs))))}),null!==(B=O.deletedFolderIDs)&&void 0!==B&&B.length&&eF(function(e){return Array.from(new Set([].concat((0,n.Z)(e),(0,n.Z)(O.deletedFolderIDs))))}),null!==(W=O.deletedPromptIDs)&&void 0!==W&&W.length&&e4(function(e){return Array.from(new Set([].concat((0,n.Z)(e),(0,n.Z)(O.deletedPromptIDs))))}),null!==(F=O.deletedCharacterIDs)&&void 0!==F&&F.length&&te(function(e){return Array.from(new Set([].concat((0,n.Z)(e),(0,n.Z)(O.deletedCharacterIDs))))}),null!==(H=O.deletedPluginIDs)&&void 0!==H&&H.length&&tc(function(e){return Array.from(new Set([].concat((0,n.Z)(e),(0,n.Z)(O.deletedPluginIDs))))})),!(L.status>=400)){e.next=54;break}if(503!==L.status){e.next=38;break}return eD("Sorry, cloud sync is temporarily disabled. We will resume cloud sync service as soon as possible. Sorry for the inconvenience."),eZ("error"),d(!0),eO(!1),e.abrupt("return");case 38:return e.prev=38,e.next=41,L.json();case 41:q=e.sent,e.next=48;break;case 44:e.prev=44,e.t0=e.catch(38),console.error("failed to parse json",e.t0),h.Tb(Error("Sync Response Error"),{extra:{source:"sync-error-response"}});case 48:return eD((null===(K=q)||void 0===K?void 0:K.userMessage)||tm._(P)),eZ("error"),d(!0),eO(!1),null!==(z=q)&&void 0!==z&&z.syncStats&&eI(q.syncStats),e.abrupt("return");case 54:if(L.ok){e.next=60;break}return eD(tm._(P)),eZ("error"),d(!0),eO(!1),e.abrupt("return");case 60:return e.next=62,L.json();case 62:if(Z=(G=e.sent).updatedFolders,J=G.updatedPrompts,$=G.newToken,V=G.updatedUserSettings,Y=G.updatedChats,X=G.updatedCharacters,Q=G.updatedPlugins,!(null!==(_=G.updatedChatsChunks)&&void 0!==_&&_.length)){e.next=71;break}return e.next=70,T(G.updatedChatsChunks);case 70:Y=e.sent;case 71:if(!(null!==(E=G.updatedPluginsChunks)&&void 0!==E&&E.length)){e.next=75;break}return e.next=74,T(G.updatedPluginsChunks);case 74:Q=e.sent;case 75:if(!(null!==(k=G.updatedCharactersChunks)&&void 0!==k&&k.length)){e.next=79;break}return e.next=78,T(G.updatedCharactersChunks);case 78:X=e.sent;case 79:if($&&g.Z.set("typingmindcloud_token",$,{expires:180,sameSite:"none",secure:!0}),!(Y&&Y.length)){e.next=90;break}return ee=Y.map(function(e){return M(M({},e.data),{},{deletedAt:e.deletedAt})}),e.next=84,Promise.all(ee.map(function(){var e=(0,i.Z)(u().mark(function e(t){var r,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.deletedAt){e.next=6;break}return e.next=3,(0,y.CQ)().del("CHAT_"+t.chatID);case 3:case 19:return e.abrupt("return",t);case 6:return e.next=8,(0,y.CQ)().get("CHAT_"+t.chatID);case 8:if(!((r=e.sent)&&null===r.syncedAt)){e.next=17;break}return void 0===r.folderID&&void 0!==t.folderID&&(r.folderID=t.folderID),t.tokenUsage=(0,m.lk)(t.tokenUsage),r.tokenUsage=(0,m.lk)(r.tokenUsage),n=M(M({},r),{},{syncedAt:ex(t,r)?t.syncedAt:null}),e.next=16,(0,y.CQ)().set("CHAT_"+t.chatID,n);case 16:return e.abrupt("return",n);case 17:return e.next=19,(0,y.CQ)().set("CHAT_"+t.chatID,t);case 20:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()));case 84:et=e.sent,er=(0,m.FW)(et),en=(0,m.dC)((0,y.cF)().getItem("TM_useChatList"))||[],ei=[].concat((0,n.Z)(er),(0,n.Z)(en)).filter(function(e,t,r){return t===r.findIndex(function(t){return t.chatID===e.chatID})}).filter(function(e){return!e.deletedAt}),(0,y.cF)().setItem("TM_useChatList",JSON.stringify(ei));case 90:Z&&Z.length&&(eo=(0,m.dC)((0,y.cF)().getItem("TM_useFolderList"))||[],ea=[].concat((0,n.Z)(Z.map(function(e){return M(M({},e.data),{},{deletedAt:e.deletedAt})})),(0,n.Z)(eo)),es=(0,m.dC)((0,y.cF)().getItem("TM_useDeletedFolderIDs"))||[],(eu=ea.filter(function(e,t,r){return t===r.findIndex(function(t){return t.id===e.id})}).filter(function(e){return!e.deletedAt}).filter(function(e){return -1===es.indexOf(e.id)}).map(function(e){return M(M({},e),{},{chatIDs:void 0})})).sort(function(e,t){return e.order-t.order}),eU(eu)),J&&J.length&&eQ(function(e){return[].concat((0,n.Z)(J.map(function(e){return M(M({},e.data),{},{deletedAt:e.deletedAt})})),(0,n.Z)(e)).filter(function(e,t,r){return t===r.findIndex(function(t){return t.id===e.id})}).filter(function(e){return!e.deletedAt}).filter(function(e){return -1===e2.indexOf(e.id)})}),X&&X.length&&e8(function(e){return[].concat((0,n.Z)(X.map(function(e){return M(M({},e.data),{},{deletedAt:e.deletedAt})})),(0,n.Z)(e)).filter(function(e,t,r){return t===r.findIndex(function(t){return t.id===e.id})}).filter(function(e){return!e.deletedAt}).filter(function(e){return -1===e9.indexOf(e.id)})}),Q&&Q.length&&tf(function(e){return[].concat((0,n.Z)(Q.map(function(e){return M(M({},e.data),{},{deletedAt:e.deletedAt})})),(0,n.Z)(e)).filter(function(e,t,r){return t===r.findIndex(function(t){return t.uuid===e.uuid})}).filter(function(e){return!e.deletedAt}).filter(function(e){return -1===tu.indexOf(e.id)})}),V&&Object.keys(V).forEach(function(e){var t,r,n=(null===(t=np[e])||void 0===t?void 0:t.updater)||function(){console.error("Updater for this setting not found",e,V)};C[null===(r=np[e])||void 0===r?void 0:r.section]&&(ty.current[e]=!0,n(V[e]))}),eI({lastSyncAt:G.lastSyncAt,totalUsageBytes:G.totalUsageBytes,limitUsageBytes:G.limitUsageBytes,subscriptions:G.subscriptions,isPaid:G.isPaid,apis:G.apis,lastSyncBySections:m.EA.reduce(function(e,t){return M(M({},e),{},(0,a.Z)({},t,C[t]?null==eP?void 0:eP.lastSyncAt:null!=eP&&eP.lastSyncBySections?null==eP?void 0:eP.lastSyncBySections[t]:null))},{})}),ec=Object.keys(np),rh(function(e){var t=M({},e);return ec.forEach(function(e){!t[e]&&C[np[e].section]&&(t[e]=new Date().toISOString())}),t}),eZ("ready"),d(!0),e.next=108;break;case 102:e.prev=102,e.t1=e.catch(1),console.error(e.t1),h.Tb(e.t1,{extra:{source:"sync-error"}}),eD(tm._({id:"cNnfG2"})),eZ("error");case 108:eO(!1);case 109:case"end":return e.stop()}},e,null,[[1,102],[38,44]])}));return function(t){return e.apply(this,arguments)}}(),[eI,eU,eF,ez,tn,to,tf,tu,tc,np,e8,eQ,null==r?void 0:r.maxSyncPayloadSize]),nv=(0,p.useMemo)(function(){return{syncLoading:eC,syncError:ej,syncStats:eP,setSyncStats:eI,sync:ng,reSyncEverything:ny,scheduleSync:nm,syncStatus:eG,syncDetails:e$,lastVerifiedToken:tn}},[eC,ej,eP,eI,ng,nm,eG,e$,tn]);return(0,E.jsx)(I.Provider,{value:nv,children:t})}},53154:function(e,t,r){"use strict";r.d(t,{Z:function(){return y},e:function(){return p}});var n=r(50029),i=r(64687),o=r.n(i),a=r(49704),s=r.n(a),u=r(67294),c=r(31955),l=r(4361),d=r(19261),f=r(85893),h=(0,u.createContext)(),p=function(){return(0,u.useContext)(h)},m={id:"lkE00/"};function y(e){var t=e.children,r=(0,u.useState)(null),i=r[0],a=r[1],p=(0,u.useState)(null),y=p[0],g=p[1],b=(0,u.useState)(!0),v=b[0],w=b[1],S=(0,u.useState)(null),_=(S[0],S[1]),A=(0,l.mV)().i18n,E=(0,u.useCallback)((0,n.Z)(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),_(""),e.prev=2,e.next=5,fetch("/api/hosted/users/self",{headers:{"Content-Type":"application/json"}});case 5:if(403!==(t=e.sent).status){e.next=10;break}return e.next=9,k();case 9:return e.abrupt("return");case 10:if(!(t.status>=400)){e.next=17;break}return e.next=13,t.json();case 13:return _(e.sent.userMessage||A._(m)),w(!1),e.abrupt("return");case 17:if(t.ok){e.next=21;break}return _(A._(m)),w(!1),e.abrupt("return");case 21:return e.next=23,t.json();case 23:g(e.sent),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(2),_(A._(m)),console.error(e.t0);case 31:w(!1);case 32:case"end":return e.stop()}},e,null,[[2,27]])})),[]),k=(0,u.useCallback)((0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c.Z.remove("org_token"),c.Z.remove("typingmindcloud_token"),e.next=4,M();case 4:window.location.reload();case 5:case"end":return e.stop()}},e)})),[]),M=(0,u.useCallback)((0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.clear(),e.next=3,(0,d.KJ)();case 3:case"end":return e.stop()}},e)})),[]),P=(0,u.useCallback)(function(){var e=c.Z.get("typingmindcloud_token");a(s().decode(e))},[]),x=(0,u.useCallback)(function(){c.Z.remove("typingmindcloud_token"),a(null)},[]);(0,u.useEffect)(function(){P()},[]);var I=(0,u.useMemo)(function(){return{user:y,loading:v,loadUser:E,logout:k,setUser:g,cloudTokenPayload:i,loadCloudSyncTokenFromCookie:P,logoutCloudSyncOnly:x,clearAllLocalData:M}},[y,v,E,k,g,i,P,x,M]);return(0,f.jsx)(h.Provider,{value:I,children:t})}},134:function(e,t,r){"use strict";r.d(t,{$:function(){return u}});var n=r(50029),i=r(64687),o=r.n(i),a=r(67294),s=r(24855),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.useState)(e),r=t[0],i=t[1];return(0,a.useEffect)(function(){var e=function(){var e=(0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useChatPersistentMemory");case 2:i(e.sent||[]);case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return e(),window.addEventListener("update-chat-memory-entries",e),function(){window.removeEventListener("update-chat-memory-entries",e)}},[]),[r,(0,a.useCallback)(function(){var e=(0,n.Z)(o().mark(function e(t){var r,n,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useChatPersistentMemory");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:return r=e.t0,i(n="function"==typeof t?t(r):t),e.next=10,(0,s.CQ)().set("TM_useChatPersistentMemory",n);case 10:a=new Event("update-chat-memory-entries"),window.dispatchEvent(a);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),[])]}},72152:function(e,t,r){"use strict";r.d(t,{C:function(){return u}});var n=r(50029),i=r(64687),o=r.n(i),a=r(67294),s=r(24855),u=function(){var e=(0,a.useState)([]),t=e[0],r=e[1];return(0,a.useEffect)(function(){var e=function(){var e=(0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useInstalledPlugins");case 2:r(e.sent||[]);case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return e(),window.addEventListener("update-user-installed-plugins",e),function(){window.removeEventListener("update-user-installed-plugins",e)}},[]),[t,(0,a.useCallback)(function(){var e=(0,n.Z)(o().mark(function e(t){var n,i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useInstalledPlugins");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:return n=e.t0,r(i="function"==typeof t?t(n):t),e.next=10,(0,s.CQ)().set("TM_useInstalledPlugins",i);case 10:a=new Event("update-user-installed-plugins"),window.dispatchEvent(a);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),[])]}},33129:function(e,t,r){"use strict";r.d(t,{Q:function(){return u}});var n=r(50029),i=r(64687),o=r.n(i),a=r(67294),s=r(24855),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,a.useState)(e),r=t[0],i=t[1];return(0,a.useEffect)(function(){var e=function(){var e=(0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useUserCharacters");case 2:i(e.sent||[]);case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return e(),window.addEventListener("update-user-characters",e),function(){window.removeEventListener("update-user-characters",e)}},[]),[r,(0,a.useCallback)(function(){var e=(0,n.Z)(o().mark(function e(t){var r,n,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useUserCharacters");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:return r=e.t0,i(n="function"==typeof t?t(r):t),e.next=10,(0,s.CQ)().set("TM_useUserCharacters",n);case 10:a=new Event("update-user-characters"),window.dispatchEvent(a);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),[])]}},78798:function(e,t,r){"use strict";r.d(t,{A:function(){return u}});var n=r(50029),i=r(64687),o=r.n(i),a=r(67294),s=r(24855),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,a.useState)(e),r=t[0],i=t[1];return(0,a.useEffect)(function(){var e=function(){var e=(0,n.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useUserPrompts");case 2:i(e.sent||[]);case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return e(),window.addEventListener("update-user-prompts",e),function(){window.removeEventListener("update-user-prompts",e)}},[]),[r,(0,a.useCallback)(function(){var e=(0,n.Z)(o().mark(function e(t){var r,n,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.CQ)().get("TM_useUserPrompts");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:return r=e.t0,i(n="function"==typeof t?t(r):t),e.next=10,(0,s.CQ)().set("TM_useUserPrompts",n);case 10:a=new Event("update-user-prompts"),window.dispatchEvent(a);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),[])]}},82623:function(e){e.exports={messages:JSON.parse('{"xA+wuq":"- AI Assistant Chat","AlCw7T":"\'Listening...\'","4ZWIlk":["(",["0"],"% of total usage)"],"kS/gaE":"(All)","ghNpNS":"(Click Test API Key before saving)","nMAlk3":"(Default)","3ixyNq":"(Free)","cer5ho":"(Learn more)","8RknI/":"(Learn More)","fSOo0q":"(Leave empty if you already have an account)","Hjx5Vx":"(Locked)","rjoGU7":"(No instruction provided)","DzGwzA":"(No variables)","ZN0cYQ":"(Paste As Text)","fNqU0V":"(Show)","6KMTVy":[["0","plural",{"one":["#"," Archived Chat"],"other":["#"," Archived Chats"]}]],"IPXOXm":[["0","plural",{"one":["#"," character"],"other":["#"," characters"]}]],"myhHcE":[["0","plural",{"one":["#"," character"],"other":["#"," characters"]}]," per message."],"iwKytO":[["0","plural",{"one":["#"," chat"],"other":["#"," chats"]}]],"ao4ihU":[["0","plural",{"one":["#"," custom model"],"other":["#"," custom models"]}]],"Ftz/t9":[["0","plural",{"one":["#"," folder"],"other":["#"," folders"]}]],"M4fjIB":[["0","plural",{"one":["#"," hour"],"other":["#"," hours"]}]],"A8sVYP":[["0","plural",{"one":["#"," message will be queued"],"other":["#"," messages will be queued"]}]],"7dDfMK":[["0","plural",{"one":["#"," message"],"other":["#"," messages"]}]],"yxF19Y":[["0","plural",{"one":["#"," plugin"],"other":["#"," plugins"]}]],"WngjJs":[["0","plural",{"one":["#"," profile"],"other":["#"," profiles"]}]],"83la/n":[["0","plural",{"one":["#"," prompt"],"other":["#"," prompts"]}]],"Cwe7mf":[["0","plural",{"one":["#"," request"],"other":["#"," requests"]}]],"YVY9Iw":[["0","plural",{"one":["#"," saved prompt"],"other":["#"," saved prompts"]}]],"5xe2p4":[["0","plural",{"one":["#"," token"],"other":["#"," tokens"]}]],"G1lxoh":[["0","plural",{"one":["~","#"," token"],"other":["~","#"," tokens"]}]],"TuGMMD":[["0","plural",{"one":["Move ","#"," chat to"],"other":["Move ","#"," chats to"]}]],"Betvyb":[["0","plural",{"one":"per day","other":["every ","#"," days"]}]],"6UqxzA":[["0","plural",{"one":"per hour","other":["every ","#"," hours"]}]],"BRJBtW":[["0","plural",{"one":"per month","other":["every ","#"," months"]}]],"3dz4IW":[["0","plural",{"one":["You have ","#"," invite code left."],"other":["You have ","#"," invite codes left."]}]],"DsE/2T":[["0"]," context length"],"4cp8tX":[["0"]," is already selected"],"yN4Oln":[["0"]," more AI agents hidden..."],"2OP12J":[["0"],"/",["1"]," used."],"FCb/+G":[["1","plural",{"one":"every hour","other":["every ","#"," hours"]}]],"wGdwW4":[["2","plural",{"one":"every day","other":["every ","#"," days"]}]],"IYg/Ph":[["3","plural",{"one":"every month","other":["every ","#"," months"]}]],"+0skwN":[["availablePromptsCount","plural",{"one":["#"," propmt"],"other":["#"," prompts"]}]],"J3+TD7":[["count","plural",{"one":["#"," AI agent"],"other":["#"," AI agents"]}]],"BnhXW8":[["currentContextLength","plural",{"one":["#"," token"],"other":["#"," tokens"]}]],"MfPdYe":[["enabledCount"]," enabled"],"lo2Y4Y":[["estimatedTokens","plural",{"one":["~","#"," token"],"other":["~","#"," tokens"]}]],"MtlhoE":[["freeMessagesCount","plural",{"one":["You have ","#"," free message left today"],"other":["You have ","#"," free messages left today"]}]],"dQB853":[["i","plural",{"one":["#"," seat"],"other":["#"," seats"]}]],"rt+E3q":[["i","plural",{"one":["Last ","#"," message"],"other":["Last ","#"," messages"]}]],"MYfjvl":[["newAnthropicEndpoint"]," (Custom)"],"ltmlBy":[["totalTokensSpent","plural",{"one":["#"," token"],"other":["#"," tokens"]}]],"fmLRjM":[["trainingMessagesCount","plural",{"one":["#"," training message hidden"],"other":["#"," training messages hidden"]}]],"+VVCL3":"* Find more information about Whisper prompt <0>here","b1cX7J":"* Must be compatible with /v1/chat/completions","/wY+cS":"# Your JS code here","sxg+VN":"→ Chat with AI on TypingMind.com","0YSH2s":"→ Get your API key from Open AI dashboard.","t3MnOU":["→ Go to ",["hostname"]],"BdH0Jq":"→ How to get Search Engine ID and API Key","lugxJv":"→ I already have a License Key","vXqHoZ":"→ See FAQs for more information on device limits.","Y9TUSP":"→ Send","VlM+81":"→ View Plan Comparision","7HsnfO":["<0>",["totalSelected"]," selected"],"q1Iujb":["<0>⚠️ Important: You already have this plugin. <1/> (ID: ",["0"],").<2/><3/>Do you want to replace the old plugin with this new one?"],"JDdS6f":"<0>10MB free storage: You have 10MB of free storage. Upgrades are available for more storage. If you exceed this limit, you can still use the app but you won\'t be able to sync new data.","6wedmD":"<0>Automatic Backup/Sync: Your data is securely stored on TypingMind Cloud and automatically synced between devices.","iUALO0":"<0>Chat history is not saved and other premium features will be limited in the free trial version.","pKmr0j":"<0>Chat history is not saved and other premium features will be limited soon in the free trial version.","REMo8V":"<0>Data lost risk: If you lose your device or clear your browser cache/storage/cookies, you will lose all your data. Make sure to backup your data regularly using our export feature.","L5HMiK":"<0>Deleting your data from the cloud will also delete the corresponding local data.For example, if a chat is deleted from the cloud, it will be deleted from this device and any other devices with Cloud Sync enabled.","oJ7rYu":"<0>Login with email: Easily login to your account on any device using your registered email address.","reZ4Yn":"<0>Login with License Key: Use your license key to activate the app on a new device. If you lose your license key, recover it from your receipt email.","Njp4Fr":"<0>Microphone access is needed for voice input.","SLYcVl":"<0>NEW! Create a custom/private AI chat interface for your team:","Gnota0":"<0>Note: Enter API Key is optional. You have access to some free models by default. Only enter your API Key if you wish to use your own API Key and pay the cost by yourself.","TVbBhK":"<0>Please save this key in a safe place. You will need it when you use TypingMind on another device. You will also receive a receipt and a license key <1>in your email shortly.","ib3/yS":"<0>Stored on device: Your data is stored only on this device, no one else can see your data. If you need to use TypingMind on another device you need to export/import manually.","G8VkJu":"<0>Unlimited storage: You can store as much data as your device can handle. There is no limit set by the app.","G7dFid":["",["0","plural",{"one":["#"," chat"],"other":["#"," chats"]}]," with ",["messagesCount","plural",{"one":["#"," message"],"other":["#"," messages"]}]," on this device."],"U3RTaZ":["⚠️ ",["0"]," chat(s) are excluded from sync because they are too large."],"rk/03V":"✅ You have access to the compiled code of the app.","0DCczY":"✅ You have permission to deploy and use the compiled code on your own server.","csmgN6":"❌ You do not have permissions to modify or redistribute the compiled code.","6hLl3l":"❌ You do not have permissions to share or resell the compiled code.","uJfDIv":"\uD83C\uDF81 New feature: <0>Text-to-Speech","eDPfNj":"\uD83C\uDF89 Awesome. API Key is working!","Uautv5":"\uD83C\uDF89 It\'s done!","h3QnPS":"\uD83C\uDF89 Thank you for your purchase!","aTVsIr":"\uD83C\uDF99️ Voice Input","pM19tB":"\uD83D\uDC49 Click here to open your Email client with prefilled content","bGwrZ2":"\uD83D\uDC49 Don\'t see the receipt email? Click here.","08M6zB":"\uD83D\uDC4B Join #plugins on our Discord!","B1seby":"\uD83D\uDCD5 Read Developer Documentation","Dyot+U":["\uD83D\uDD12 ",["0"]," is not available for your current plan ",["1"],". Please buy or upgrade your license key to unlock this feature"],"voMgY+":"1 month","3vtzIH":"1 week","GKWMv+":"10MB Free","dmfyiH":"14-day money-back guarantee. All plans are one-time payments. Upgrade between plans anytime. Price does not include the API cost","He1Q8M":"18,000+ Happy Customers","HCLj1r":"2 months","O2B4EJ":"2 weeks","VaA9mu":"24 hours","7ZrpGs":"3 days","x1VeBD":"3 months","B/1Qzd":"3 weeks","UtXEjp":"48 hours","n6p4ka":"A better UI for ChatGPT, Claude, and Gemini","73O0MY":"A ChatGPT Plus Subscription is not needed.","tOO5PC":"A ChatGPT Plus Subscription is NOT needed.","hedKHR":"A custom model","i39oBj":"A JSON string that describes to the AI assistant what the function does and how to use it. Must strictly follow OpenAI\'s document about function call. See <0>Instructions & Examples here.","LGyzFK":"A powerful frontend for LLMs","6iJX/K":"A shared License Key for up to 10 users on 50 different devices. comes with <0>Premium plan\'s benefits at <1>only half the price!","uyJsf6":"About","2lad0+":"About Me","n3bn7r":"About This Chat","ChasOQ":"Academic","LuXP9q":"Access","VuFDmS":"Access the Web Search plugin that allows AI assistant to access the internet and look up information.","AeXO77":"Account","FMUJSP":"Account & Data","FQBaXG":"Activate","VzNizi":"Activate License","JEv05s":"Activated","gj6qzs":["Activated Devices: ",["0"]],"F6pfE9":"Active","m16xKo":"Add","+7MTQz":"Add Conversation Starters","6clT5o":"Add Custom Body Params","iT8p0P":"Add Custom Headers","d2W4ef":"Add Custom Model","JRnw1i":"Add Custom Voice","axHfqA":"Add Endpoint","qtYf+J":"Add Limit","B+nQnj":"Add Plugin","QGP6it":"Add Post-Processing","aoFVdB":"Add profile","GGnNgC":"Add Profile","VrxS4o":"Add Prompt","KVJGUP":"Add Request Body","Ghn0ZA":"Add Request Headers","IKoyMv":"Add Tags","WD6ttL":"Add Test Variables","OF0JQ8":"Add Training Examples","YoxD8i":"Add your JS code here...","Yj2/Tk":"Add your JSON here...","hp8OtS":"Added","cRj6CO":"Additional Purchase Available","U3pytU":"Admin","mGLgVd":"Advanced Model Parameters","NFIOKv":"Advanced Options","JiIKww":"Advanced Settings","8Uv5e6":"Agents","AP0pC3":"Agents are pre-built AI assistants for specific tasks.","MnmJG1":"AI Agent","uHkL3b":"AI Agents","IwdUX/":"All costs are <0>estimated, please refer to your <1>OpenAI dashboard for the most accurate cost of your API key.","NdMF3Q":"All Dynamic Context Endpoints must have a name and a URL","OZbbiL":"All feedback, suggestions, feature requests, and bug reports are welcomed!","24snR+":"All of your chat data is stored locally by default","9jrTB+":"All of your data is stored locally in your browser. Each browser has a different limit of how much data you can store. If you are running out of space, you can delete some of your old chats.","G+I1gE":"All plugins","98vSRA":"All Previous Messages","Wkdy65":"Already purchased?","pcjU7W":"Always show interactive content from this plugin without asking.","p1aRIt":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.","stJ7GC":"An extension that allows AI assistant to speak out loud using ElevenLabs or Browser Text-to-Speech API.","+Bu/ke":"Analytical","AeMmrL":"and will be disabled after the Beta period","2s9w88":"Answer as concise as possible","Q973qV":"Answer in Blog format","vcFcLH":"Answer in Brochure format","FLWul7":"Answer in Case Study format","DukIlz":"Answer in eBook format","5LhHEt":"Answer in Email Campaign format","QdS+ah":"Answer in Essay format","uK5lNr":"Answer in FAQ format","jvU/at":"Answer in Infographic format","IBOZK1":"Answer in Interview format","ZtDtia":"Answer in Listicle format","I7V64k":"Answer in Memo format","CbfT1F":"Answer in News format","K+YMKx":"Answer in Newsletter format","0NE/hu":"Answer in Opinion format","iaWE1y":"Answer in painstakingly detail","lHgh9B":"Answer in Podcast Script format","iAYeUy":"Answer in Poem format","2BJ8/W":"Answer in Policy Document format","5+tfGx":"Answer in Presentation format","kWCukR":"Answer in Press Release format","NVybHC":"Answer in Product Description format","jnWaqI":"Answer in Profile format","tko26I":"Answer in Proposal format","M3LgmF":"Answer in Q&A format","4NCF/2":"Answer in Report format","O91zzn":"Answer in Research Paper format","VYCzS4":"Answer in Review format","sh/MHB":"Answer in Script format","x1WQ8C":"Answer in Social Media Post format","3Bd6y5":"Answer in Speech format","aRLf6W":"Answer in Summary format","BgxwOT":"Answer in Table format","6IjH1R":"Answer in Technical Documentation format","pd07qc":"Answer in Tutorial format","KQ5YyF":"Answer in User Guide format","FAYtw/":"Answer in Webinar format","9Mjf1u":"Answer in Whitepaper format","OpAwo5":"Anthropic API Key","8xI/bl":"Anthropic Chat Completions Endpoint (V1)","zMV8th":"Anywhere! You can deploy it on your own server, or on a static web cloud service like GitHub Pages, Cloudflare Pages, AWS S3, Vercel, Netlify, Heroku, etc. You can even run it on localhost.","1xrXA1":"API Key not working? Click Here.","FfSJ1Y":"API Keys","5ghbeJ":"API Keys & License Key","HXdJo7":"API keys are locked","SHvKkv":"API Missing","dPIVSq":"App Data","2BpVx/":"App Data & Storage","aAIQg2":"Appearance","DB8zMK":"Apply","AL93NF":"Apply for all future chats","5zTU9p":"Apply for current chat","vdM0PU":"Approved Languages","B495Gs":"Archive","WAOQ5J":"Archive chats older than","/ns5IT":"Are you sure you want to cancel this subscription?","aS8e0y":"Are you sure you want to clear all your storage? This will delete all cloud data and the corresponding local data as well. To prevent data loss, consider using Manual Backup to export your data into a file.","G7hiVV":["Are you sure you want to delete <0>",["0"]," <1/>and its chats?"],"KaKLHJ":"Are you sure you want to delete this agent? This is not undoable.","Pf89wO":"Are you sure you want to delete this chat? This is not undoable.","1vhl90":"Are you sure you want to delete this plugin? This is not undoable.","6foA8n":"Are you sure?","JeWEj+":"Argumentative","Jd1Cdw":"As of now, you cannot customize anything. You the self-host version will be exactly the same as the one you are using on TypingMind.com. If you are looking for a more flexible and customizable way to use TypingMind, check out https://custom.typingmind.com","F+vBv0":"Ask","CrlBwT":"Ask a question and see if it can answer it.","BwyPXx":"Ask a question...","CbOT+9":"Ask AI for domain name suggestions, then check the domain availability with 1 click.","BrM1bb":"Ask the AI assistant to generate a title based on the first message when starting a new chat. This will consume more tokens used in the first message. (All subsequent message tokens will not be affected).","LqNfc3":"Ask the AI assistant to suggest relevant keywords if the answer is more than 500 characters long. This will consume more of your token.","0CRwo2":"Assign a specific model to this AI agent","P2JOdR":"Assigned Advanced Model Parameters","Y9xqt2":"Assigned Model","PJ+Oxg":"Assigned Plugins","hICOwR":"Assigned Text-to-Speech API:","dR6shC":"Assigned Text-to-Speech Settings","4rpXj6":"Assistant response","fyOcj3":"Assistant Response:","tqcmtP":"Assistant:","pIrPsA":"At the moment, inactive devices will be revoked automatically after a short time, you don\'t need anything. In the future versions, you can access the License Manager from the app and manage your devices there.","5d7oGr":"Attach images and ask questions. GPT-4 Vision allows the AI assistant to see and understand images.","UY1vmE":"Attachment","JGrfzE":"Audio Input","1H+Sc2":"Audio input with OpenAI Whisper requires an OpenAI API Key. Please enter an OpenAI API Key to the app and try again.","M9+N8T":"Authoritative","Tppod2":"Auto archive old chats","+ZWSxY":"Auto delete archived chats","BSleER":"Auto fill content with AI","2Pa8mz":"Auto generate title for new chats","rXlXlr":"Auto play assistant messages","bE4siw":"Auto send the message after speaking","4ryaAZ":"Auto start recording when open","ZK5+g/":"Auto suggest relevant keywords after each message","j+fvUf":"Auto-Translated Languages","UrPLkb":"Automatic audio playback was prevented by the browser. Tap the play button to start playing audio.","4iqlgG":"Automatically archive chats that are older than a specific period. Exceptions: Favorited chats, chats in folders, or chats with tags will not be archived automatically.","OSt5XJ":"Automatically delete archived chats after they have been archived for a specific period.","NL1iX0":"Automatically resume your most recent chat when you reopen the app.","4/IEEY":"Available Integrations","TJCWpw":"Available variables","f0rbKh":"Awesome! You can start chatting now!","hksWkB":"Azure OpenAI","iH8pgl":"Back","qn5Xo4":"Back to active chats","tgg7/2":"Back to profiles","kJygHz":"Balanced","RIaiD3":"Basic Chat Features","YBt9YP":"Beta","astDB+":"Blog","jxmDgh":"Bot\'s answer","z2gcLy":"Brochure","ZtCLxJ":"Browser (Web Speech API)","7zrNaY":["Bulk Action (",["0"],")"],"ldcOo7":"Buy / Upgrade License","ggrnf1":"Buy a License Key","0nqkr3":"Buy Add-on","lAkf2Q":"Buy Another","oPWFMP":"Buy Extended","oqsSYB":"Buy Here","YX7STt":"Buy More Seats","m2pyX2":"Buy Now","dMT0t2":"Buy now to get it included for free!","HPC6Gz":"Buy or Upgrade Here","Ae1t/2":"Buy Premium","Betuyn":"Buy Standard","nn8KcR":"By default, the AI agent\'s instruction will be appended to the app\'s default system instruction (set in the model settings popup). Check this box if you want to skip the previous system instruction for this AI agent.","DkI3Vf":"By default, the AI agent\'s instruction will be appended to the global default system instruction (set in Training Data → Global System Instruction). Check this box if you want to skip the Global System Instruction for this AI agent.","tQht86":"By default, the plugin\'s output will be given to the AI and then the AI will decide how to respond to the user. You can change this behavior by selecting another output option below.","YjZITy":"By default, your API Key is stored locally on your browser and never sent anywhere else.","sNAHE5":"By signing up, you agree to our <0>Privacy Policy and <1>Terms of Service.","KiUAH8":"Cache Expire Time","uL2j1y":"Cache Refresh Policy","vTVaGb":"Can I embed my License Key/API key to the self-host version somehow and let my team/community/customers use it?","aVZ9yc":"Can I get a refund?","8o1RNk":"Can I have support on technical issues if I self-host?","hcGgve":"Can I let me team/community/customers use the self-host version?","ecAC9I":"Can I receive new updates after I buy a license key?","Go/vEu":"Can I self-host it?","rldNey":"Can I self-host TypingMind?","Qf9Ee9":"Can I use GPT-4 in TypingMind?","dEgA5A":"Cancel","vv7kpg":"Cancelled","g6Qo8V":"Case Study","RHRuDI":"Categories help you organize your AI agents. You can assign multiple categories to an AI agent.","07FUrc":"change","o+XJ9D":"Change","h3vADk":"Change API Key","SDhZUV":"Change Character","rZf6Qw":"Change Key","CWe7wB":"Changelog","P+2e0U":"Changes are saved only for the current chat","87RRXI":"characters","wQoVcC":"Characters","AHZflp":"Chat","tQ4OxD":"Chat Not Found","lO1Uso":"Chat Profiles","2B2riu":"Chat profiles help the AI understand more about you. You can create multiple profiles for different scenarios (Personal, Work, etc.).","pQg6X8":"Chat with AI using your API keys. Pay only for what you use. GPT-4, Gemini, Claude, and other LLMs supported. The best chat frontend UI for all AI models.","N+il+Q":"Chat with built-in AI agents on various topics.","5j4DOc":"chats","8Q+lLG":"Chats","wgJrZU":"Chats are not saved in free trial. Please buy a license to unlock all features.","q9j23+":"Check API Key","1gDRRp":"Check Domain","hlKjs/":"Check Key","4fbZwm":"Choose how the plugin will be run.","KrokRF":"Choose how your data is stored","x3hlms":"Choose one of the following methods","SqIaK+":"Clarity + Similarity Enhancement:","xCJdfg":"Clear","zljzWo":"Clear All Storage","z/5ptt":"Clear API Key and Password","Blz3jW":"Clear Context","UK3fsk":["Clear Selections (",["0"],")"],"GdhD7H":"Click again to confirm","qk7MVx":"Click here to help with translation","lcFzRd":"Click here to unlink old devices","mWkeNy":"Click Record to start recording audio. Text transcription will be provided by OpenAI\'s Whisper API.","zOYG6Z":"Click the button above to start a new chat","cktsCs":"Click to calculate size","8J70rq":"Click to deselect the profile","J9vOlR":"Click to explore all features available \uD83D\uDC47","7Zfhs6":"Clinical","9UQ730":"Clone","yz7wBu":"Close","vrtcD8":"Cloud Data","s4xjn0":"Cloud Storage","Bp/aCq":"Cloud Sync","UbVRmW":"Cloud Sync & Backup","RK1xy9":"Cloud Sync Mode","sVBJ9u":"Code implementation is required.","sfhXn4":"Code Implementation:","3Nxy1n":"CodePen","56QffO":"Cold","H86f9p":"Collapse","wKlyxL":"Color Highlight","AUYALh":"Coming soon","q93mA4":"Community Prompts","9S4Fiy":"Compact","AzFAXz":"Concise","zNPkaU":"Confident","7VpPHA":"Confirm","twilsj":["Connected via <0>",["0"],""],"jfC/xh":"Contact","ArkuA2":"Content is blocked based on the probability that it is harmful.","wmnTZp":"Context Length","HQF+Mf":"Context Length Limit","OI8spO":"Context length limit reached","Od+YcO":["Context length: ",["0"]," tokens"],"w7l4QY":"Context Limit:","tbb3wK":"Context Name","xGVfLh":"Continue","TSjITo":"Continue without Backup & Sync","fUFexU":"Continuously Updated","iqQ0P3":"Conversation Starters","hzExWo":"Conversational","PiH3UR":"Copied!","NmPNJJ":"Copy code","iVm46+":"Copy Code","EXTouI":"Copy Content","TZ5uLO":"Copy Last Message","7mai6W":"Cost are estimated and will not be 100% accurate. Please refer to the billing section of your AI provider dashboard for the actual cost. See FAQs below for more information.","jefIoa":"Cost associated with a chat includes the token cost for the chat messages AND all of the <0>enhanced features used for that chat.","bW1s55":"Cost estimation will be less accurate when stream response is enabled.","jM5g6I":"Could not connect to Anthropic API from your browser. This could be a network issue or adblock. Please try again or contact support. Open Developer Console to see more details.","SQw4QB":"Could not connect to Anthropic API. Please try again later. Error code:","atnPxc":"Could not connect to Anthropic API. Please try again later. Error details:","JkaJIP":"Could not connect to ElevenLabs from your browser. This could be a network issue or adblock. Please try again or contact support. Open Developer Console to see more details.","qoF6OQ":"Could not connect to Google Gemini API from your browser. This could be a network issue or adblock. Please try again or contact support. Open Developer Console to see more details.","NIkO92":"Could not connect to Google Gemini API. Please try again later. Error code:","Ukcq58":"Could not connect to Google Gemini API. Please try again later. Error message:","0O2epA":"Could not connect to License Server. Please try again later.","rPok8F":"Could not connect to OpenAI API from your browser. This could be a network issue or adblock. Please try again or contact support. Open Developer Console to see more details.","VMesfk":"Could not connect to OpenAI API. Please try again later. This could be because OpenAI\'s server is experiencing high demand and rejected your request. Go to https://status.openai.com/ to check their status. Error code:","m13MD6":"Create AI Agent","Z3mBOA":"Create new category","F1ebYf":"Create New Plugin","uFQF6u":"Create new tag:","oJhw1l":"Create plugin manually","0xD/Jm":"Creative","J5nbej":"Critical","HpGMZX":"Current Context Length:","8Tg/JR":"Custom","pC7150":"Custom Body Params","GnfGTT":"Custom Headers","vE8qON":"Custom Instruction","07Y2l2":"Custom model guides:","4OzRwX":"Custom Models","Bav+e0":"Custom Models:","/xJLUo":"Custom Voices:","6eagIY":"Cynical","+xHY/f":"Dangerous","pvnfJD":"Dark","Mb1IHF":["Deal ends in <0>",["timeLeftString"],"."],"Iy+/7K":"Deal ends soon.","ovBPCi":"Default","23umQ0":"DEFAULT","ztm4oE":"Default Model:","cnGeoo":"Delete","KZN4Lc":"Delete All","DmiLNr":"Delete all data on this device","mP/ptm":"Delete All Local Data","be4IUs":"Delete archived chats after","lcqFCW":"Delete everything","Q6Z4Kc":"Delete Folder & Chats","1oxiwc":"Delete Folder, Keep Chats","LtSIKU":"Delete This Agent","Wsu4Xu":"Delete This Chat","J4It23":"Delete This Plugin","uNTuV6":"Deleted successfully!","C3l213":"Depends on the license key you buy. The Premium License Key is valid forever and includes all updates forever.","i5udnt":"Describe to the users what your plugin does and how to use it with examples.","Nu4oKW":"Description","jQFhbL":"Description (optional):","bIFrSy":"Description for the function","aH0Gbo":"Description of the first parameter","Dvc8Qg":"Description:","42aQMm":"Descriptive","cO9+2L":"Disable","E/QGRL":"Disabled","OdPOhy":"Discord","NnjDLd":"Do I have access to the full source code if I want to self-host?","OfaLQ8":"Do I need to have ChatGPT Plus ($20/month) to use TypingMind.com?","75mwHY":"Do I need to pay for ChatGPT Plus ($20/month) to use TypingMind.com?","OK9+n5":"Do I need to pay for OpenAI for a ChatGPT API Key?","xkeWcN":"Do I still need a License Key and Open API Key to use the self-hosted version?","pn+6yY":"Do not show this message again (you can enable Backup & Sync in settings later).","trpZLK":"Do you want to change the new character for this conversation?","TbjyhA":"Docs","wVeekH":"Document Attached","eCtitK":"Does Web Search require GPT-4? Can I use it with GPT-3.5?","bmPNEK":"Domain Check","gvy3rp":"Don\'t have one? <0>→ Buy A License Key","VbN7mk":"Don\'t show again","DPfwMq":"Done","7NkkFS":"Download .html","egdeNe":"Download .json","zQtsZm":"Download .md","XJyskP":"Download as JSON file that can be used for <0>fine-tuning","IFNYKF":"Download File","uOcnoU":"Download your recording","vEGzwu":["Duplicate function name: ",["parsedPluginID"],". The function name in your OpenAI Function Spec has already exists among your installed plugins. Please choose a new one."],"pi6L1F":"Dynamic Context via API","XBquZG":"E.g., A life coach who can help you set and achieve personal and professional goals.","xVkdoR":"E.g., A list of domain names based on topics","Yo1JjQ":"e.g., John","mLbNlk":"E.g., You are a life coach, you help the user identify and achieve their goals, motivate them, and provide support and encouragement.","OvyFOO":"Each item of \\"bodyRows\\" must include all required keys!","ZHX2Nv":"Each item of \\"headerRows\\" must include all required keys!","lZ6/UT":"Each license key can be used on 5 devices which is typically enough for 1 user. If you need to use it on for more devices, you can buy a new license keys or add more devices to your existing license key. \\"Device\\" is counted based on the number of places where the license key is entered and the chat history is saved for continuous use. For example, if you use the app on Chrome browser on your laptop and also on your phone, that will be 2 devices. Note that the license key and chat history is saved locally per browser, so if you use the app on Chrome and also on Firefox, you will need to enter the license key 2 times, have 2 separate chat histories, and that counts as 2 devices. If you need to use the license key on a new device but have reached the device limit, you can unlink the previous devices first using the License Manager (this is done online, access to the previous devices not needed). This device limit is put in place to avoid license key abuse and pirate.","HPqWYc":"Easily review color codes in the AI response.","+WvWWW":"eBook","ePK91l":"Edit","Dx6IaP":"Edit Info","QjH+ZX":"Edit message","QJQd1J":"Edit Profile","alTZor":"Edit the message without regenerating the rest of the conversation.","MMcsI2":"Edit this message","8V61zL":"Edit Title","GKJsTg":"Edited at","9r6uEg":"ElevenLabs (Beta)","gJaAE1":"ElevenLabs API Key","u2ugP9":"ElevenLabs requires an ElevenLabs API Key. Please enter an ElevenLabs API Key to the app and try again.","0GJN1u":"ELI5","poDAye":"Email Campaign","xCCCRp":"Emotional","rzMql/":"Empathetic","N2S1rs":"Empty","FZtBeR":["Enable ",["0"]],"7PDSeD":"Enable Cache","TmFE+J":"Enable Global Memory","CsVLg/":"Enable if the model supports image input (compatible with OpenAI API).","uOYIwm":"Enable if the model supports the \\"functions\\" parameter.","Nxc1QA":"Enable Plugins","7l5TV+":"Enable Web Search","6NbliF":"Encrypt API key with password","oGPAOk":"End of Chat","FCKppt":"Endpoint","kGCe95":"Endpoint saved! TypingMind will restart now.","sCG3Yu":"Endpoint Test Failed:","Wagt7O":"Endpoint Test Success:","T3juzf":"Endpoint URL","ZP7Y2s":"Enhance your chat experience x10 with our integrations.","5trAhQ":"Enter <0>License Key to unlock all premium features.","sbk2AF":"Enter any information you want the AI assistant to remember about you here:","YnCPVD":"Enter API Key","Eki/+i":"Enter API key to chat","17SKb6":"Enter categories or create new one","rcyeIO":"Enter extension URL","IRwH+C":"Enter License Key","ENWqZw":"Enter new tag","hITuUq":"Enter Open Router API Key","f7sXvi":"Enter password","JxXP1G":"Enter Password","yAReJj":"Enter Password:","B9mcRt":"Enter the code here:","99MXlb":"Enter Your Anthropic API Key","1Wa47i":"Enter your details so that your team can recognize you.","C3nD/1":"Enter your email","vUqMKV":"Enter your email:","4s7UWR":"Enter Your Gemini API Key","j/jUA8":"Enter your license key here","krqIN6":"Enter your license key here:","CVVC+5":"Enter your message...","/8zMx3":"Enter Your OpenAI API Key:","ZMHXQC":"Enter your prompt here...","npLws9":"Epigrammatic","QhCUtA":"Epistolary","uh+FNs":"Essay","zh1htt":"estimated","xEbu5z":"Estimated Cost:","sDp3Xz":"Estimated Size (for sync):","y8MW1k":"Example text...","d/uqej":"Excellent product. Continuously updated, with search, folders, prompts, and AI agents to make using GPT-4 much easier.","TqoOrQ":"Explain like I\'m five","osTdTP":"Explain what the AI agent does and how to use it. Will be shown to the user.","22oG2a":"Explore All Features","Gx2RJ7":"Explore more on the topic on Google with 1 click","wBXYto":"Explore Plugins","GS+Mus":"Export","7ONgDR":"Export Data From OpenAI","iTDzyV":"Export Selections","MHwMyE":"Expository","JToDwi":"Expression:","HtEG00":"Extended","0/BbGM":"Extends the capabilities of the AI with custom functions and workflows.","COlIpI":"Extensions","K8lalb":"Extensions allow you to load custom JavaScript into the application. This can be useful for adding custom functionality or integrating with other services.","ZbQrfp":"Extensions changed. Please restart the application to apply changes.","tIa0nY":"Extra Extra Large","vp6Yr4":"Extra Large","VfpfOY":"Extreme Detail","0aIV5B":["Failed to load extension: ",["url"]],"lKwla6":"Failed to render this response. Please contact support.","Avxzev":"Fair use bandwidth included. Upgrade or cancel anytime. By making a purchase, you agree with our <0><1>Privacy Policy and <2><3>Terms of Service.","sV1jTA":"false","/lDBHm":"FAQ","aJ4pMe":"FAQs","TgtE45":"FAQs about API Key","qmIOJX":"Faster","099VRC":"field 1","1Il5lG":"fill","oaz59c":"Filter by tags","JmZ/+d":"Finish","kODvZJ":"First Name","5TAuaz":"folders","HSh8u/":"Folders","cGeFup":"Font Size","VYIIuD":"For quick development and testing of a new plugin. You can also import a plugin from GitHub and modify it before saving it to use. For additional information on the plugin data format and instructions for sharing via GitHub, please refer to <0>this guide.","WsEnIq":"Force show login page","JRJf8U":"Fork Chat","uNHU5d":"Fork chat from here","BbNHZY":"Formal","sPODjJ":"Free Updates","p1i5jO":["Frequency Penalty: ",["0"]],"a3pVqb":"Frequently asked questions","Gq7H1m":"Friendly","gGUb6a":["Function name: ",["0"]," is not defined in your code. Please check your code."],"Weq9zb":"General","hxNoxI":"Generate images using the DALL-E 3 plugin. Simply describe the image you want the AI to generate. (Only available on supported models).","KLCCSP":"Get API key here","zCNvh1":"Get session link here","47jGM/":"Get sound notifications for AI responses when you are inactive.","ZDIydz":"Get started","c/xVhj":"Get the latest self-host update at https://github.com/TypingMind/typingmind","0uv2li":"Get your API key from Anthropic dashboard.","SitPcJ":"Get your API key from Google AI Studio dashboard.","Dedbjs":"Give plugin output to the AI","DzE6FV":"go to chat","gHSuV/":"Go to home page","b9KmAj":"Google Gemini API Key","76gPWk":"Got it","FPsvA8":"Got it!","vvDw4G":"Got Questions?","0u7U4p":"GPT-3.5 allows maximum of <0>4,096 tokens per chat. GPT-4 allows maximum of <1>8,192 tokens per chat in the 8K model and <2>32,768 tokens in the 32K model. OpenAI may increase the context length limit in the future.","72Hzfx":"GPT-3.5 Bot (Fast)","7SR6eZ":"GPT-4 Bot (Accurate)","Ooe1lZ":"Great job! You are now all set!","O1wAlQ":"Guest","R+05T4":"Guides:","+26uAM":["Handler for function ",["name"]," not found."],"EyQMHI":"Harassment","LoVB/U":"Hate speech","F6Go3M":"Header Key","BCL8Ot":"Header Value","C9r+t2":"Hello, I\'m a life coach. How can I help you today?","u3pv+W":"Hello, this is the test audio for the AI assistant.","kYLxGT":"Help & Information","GNJ1kd":"Help & Support","WW8EoW":"Here is your <0>License Key:","LFGDRf":"Here is your <0>License Key. <1>Please save this key in a safe place.","RFEi9f":"Here is your chat transcript","gmNQTg":"Here is your chat transcript:","/hc/Aq":"Here is your messages in JSON:","zTGSja":"Here is your plugin in JSON:","A+GCyx":"Hide Advanced","9aHqty":"Hide Advanced Options","2PtsU5":"Hide raw","ZUIr2+":"Hide this notification from the main page forever","yx/fMc":"High","1RkbIp":"High enhancement boosts overall voice clarity and target speaker similarity. Very high values can cause artifacts, so adjusting this setting to find the optimal value is encouraged.","bgYTxy":"Higher","ScdGLq":"Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.","TzBiUJ":"Hmm... it seems like your chats are corrupted.","cOkgyb":"How can I sync my chat conversations across devices?","E+1jcv":"How do I receive updates for the self-host version?","rq/EWc":"How do I remove a device from my license? How to access the License Manager?","D0hPsf":"How do you want to share this chat?","2/52pb":"How do you want to share this plugin?","ojrs7f":"How does this app work?","zSztZj":"How does TypingMind execute the search?","JNKgQJ":"How is the API key handled?","aPd0KC":"How is the cost calculated?","/tZEjV":"How it works?","OT18hB":"How many chats can I have?","ZX9OXO":"How many devices/users can I use the License Key on?","ucv4V3":"How much more tokens are used if I enable Web Search?","lIWqIu":"How much to penalize new tokens based on their existing frequency in the text so far. Decreases the model\'s likelihood to repeat the same line verbatim.","ED63fq":"How much to penalize new tokens based on whether they appear in the text so far. Increases the model\'s likelihood to talk about new topics.","IHD/ra":"How to export data from OpenAI?","OrpZKj":"How to use Azure OpenAI API","1fTVrT":"How to use local models (Vicuna, Alpaca, LLaMa, GPT4All, Dolly, etc.)","+u1nrq":"How to use Open Router models","bvG3QX":"How to use the Team License Key? How to add new users?","fN/3SW":"How tokens work?","4PbDoL":"How Web Search plugin works?","2N4F+A":"How Web Search works?","94nlq2":"HTML Webpage","qvRppp":"HTTP Action","bHXYoC":"HTTP Method","vXtlks":"https://","0X8rUE":"https://...","4Nl9R0":"Humorous","YFlz6q":"I have ChatGPT Plus, will it cost me more to use ChatGPT API via TypingMind?","TPNfdq":"I have purchased but forget my license key, how can I get it back?","ow9Olb":"I understand my chat will be made public","5LtjYx":"I understand that all of my data (chat messages, agents, prompts, etc.) will be lost if I clear my browser cache or site data.","eh6z/i":"I understand that my chat history will be lost if I clear my browser cache or site data.","OcU847":"I\'ll activate later","aMPH6M":["I\'ll do it later",["0"]],"bd1Kuw":"Icon URL","/hz2xp":"Icon URL (optional)","Ffcffi":"If \'FormData\' is selected, the request body JSON will be converted to FormData.","xZ40r1":"If this problem persists, please contact support.","FU00DH":"If this problem persists, please contact support@typingmind.com.","vmyQ2D":"If you <0>have been charged but still don\'t see the receipt email, please send your <1>Transaction ID or your bank transaction detail to <2>hello@lemonsqueezy.com and CC <3>support@typingmind.com . We will check this for you ASAP.","sJ6OIn":"If you already have an account, this will log you in.","mYZR41":"If you are using a custom model, make sure to set a correct Context Length and set the \\"max_tokens\\" body parameter to the recommended value by the provider. Contact your model provider for more information.","iK/LRS":"If you forgot or want to change your password, click \\"Change Key\\" and enter the API key again.","+hdF/5":"If you forgot your password, you can clear your API Key and password, then enter your API Key again.","xDic64":"If you have previously activated this license key on other devices, you must unlink those devices before continue.","bCDMZI":"If you reached the context length limit, you can delete some old messages to continue the chat, or start a new chat.","q+OiwQ":"If you think this is a mistake, please contact support.","1w2Cpf":"If you want to preserve this conversation, you can start a new chat from this point.","N1FnFw":"If your chat contains an <0>uploaded document or a custom <1>AI agent, those will also become publicly available.","HFASYW":"If your chats are not showing up, you can try to recover them here. This will find all of the existing chats available in your local storage and recover them. Usually, you don\'t need to do this, but in some extreme case where there is a browser bug, or the app\'s storage is corrupted by a other browser extensions, you can try to recover your chats here.","PVi43z":"Ignore the synced data from the cloud and create a new copy of the data from the file. This may create duplicate chats on your current device.","hG89Ed":"Image","m08Cos":"Image Generation","an5hVd":"Images","N4OVNn":"Implementation","l3s5ri":"Import","D8LFE+":["Import ",["0"]," model(s)"],"EILfvI":"Import & Clone","2iY5s/":"Import & Replace","m5Z2VD":"Import a plugin via URL:","FhMhTR":"Import Data","M0BKgX":"Import From GitHub","+wwQdk":"Import From OpenAI","T/YuOx":"Import Plugin","zjeHGx":["Import Plugin <0>",["0"],"?"],"HHxZa1":"Import plugin from JSON","z46NBz":"Import the data from the file to this device and keep them synced with the cloud version. Any existing duplicate chats will be replaced, then synced to the cloud.","j1RnC6":["Import to ",["0"]],"5yS40W":"Import to TypingMind","Bbn1qh":["Imported ",["0"]],"n1w4iu":["Importing new ",["0"],". Are you sure?"],"GdBrLi":["Importing new ",["0"],".<0><1>⚠️ Important: Some ",["1"]," in the imported file have been previously synced to Cloud Backup & Sync.<2/><3/>Do you want to replace those data with the synced version or create new cloned ones?"],"bN4bod":"Importing new data from a local file. Are you sure?","6xrUsk":"In the free plan, chat history will not be saved. You will be present with a popup every few minutes. Some other features may also be limited.","jZxGf9":"Incorrect password.","VoO3VA":"Incorrect password. All API keys must be encrypted with the same password. If you forgot your password, you can remove all API keys and add them again.","6sxUIo":"Increasing stability will make the voice more consistent between re-generations, but it can also make it sounds a bit monotone. On longer text fragments we recommend lowering this value.","BTNnlL":"IndexDB is unavailable in your current browser, and some features might not work. Please use a different browser for the best experience.","uSFHsO":"Infographic","n668ni":"Informal","xazJTP":"Informative","MfdckZ":"Initial System Instruction","TKQ7K+":"Install","zPsxDu":"Install Now","eQkgKV":"Installed","2oyZ/L":"Instructive","GUNLv1":"Interactive Content","4SUOez":"Interactive content may slow down your chat experience or be distracting.","umwQp0":"Interview","EPw/o1":"Invalid API key. Please make sure your API key is still working properly.","svQd1q":"Invalid OpenAI Function Spec. Please check your JSON.","e6Mc3R":"Invalid plugin. Please try again.","Tri+cM":"Invalid User Settings. Please check your JSON.","eJbPDS":"Invite code:","127v3Z":"Ironic","2zlZZS":"Is it ok to give my OpenAI API Key to TypingMind? Does OpenAI allow this use case?","9wNN3e":"Is my API Key encrypted in local storage?","CNe6lp":"Is the License Key one-time purchase? Do I need to renew it?","feGwUZ":"Is there a MacOS/Windows/Linux app?","1RMOfL":"Is there an Android/iOS/iPad app?","Po7tj6":"Is there an expiration date for the License Key?","xkuRyy":"is thinking","b5PxgQ":"Is this app free?","IWs4FI":"is typing","HsTJS/":"It\'s free and takes 2 minutes. You need a Google account.","KA/DjW":"It\'s trained with our FAQs, Privacy Policy, and Terms of Service.","uIjGvG":"JavaScript Code Implementation","lulNQ0":"Journalistic","B2Zb/F":"JSON","leS9hw":"JSON file","aABkGI":"Kagi Session Link","15ZLRx":"Keep the data","y+HKwM":"Keep your data safe!","h7MgpO":"Keyboard Shortcuts","DVMnO1":"Keyboard shortcuts are not avaiable on mobile","VHZsGc":"Known Issues in macOS app:","vXIe7J":"Language","k7rCa/":"Large","JwWiPD":"Last Created","UXBCwc":"Last Name","qF4jem":"Last Sync","zt4unR":"Last Sync: Never","tKCBU0":"Last Used","zwWKhA":"Learn more","NgeSlx":"Learn More","4nqCi7":"Learn more about OpenAI\'s model, tokens, and context length here.","ypjVz9":"Less Repetition","CcsE7w":"Let the AI know how to response when this profile is used.","iYRN9M":"License activated successfully!","4o/F78":"License Key","ttpgzw":"License Key is used to activate the premium features of TypingMind.com. API Key refers to OpenAI ChatGPT API Key, and is used to connect to OpenAI\'s API to interact with ChatGPT. You need an API Key to use the app. The License Key is only needed if you want to use the premium features.","h12eY8":"License Key vs. API Key","1njn7W":"Light","yRkqG9":"Limit","p1R7Bt":["Limit #",["0"]],"ml4bvW":"Limit:","tQU1G2":"Limitations","6BDqha":"Limits","uebWmA":"List More...","95r17U":"Listening...","UBSiBT":"Listicle","bqeTuo":"Llama, Mistral, Perplexity,...","VUP5qf":"Loading Configuration","r53GSi":"Loading Plugin...","Z3FXyt":"Loading...","d5zxa4":"Local","2tuzFd":"Local Chat Data:","dTa89z":"Local Only","rXS98F":"Local Only Mode","2iTmdZ":"Local Storage:","j8TVcH":"LocalAI (Vicuna, Alpaca, LLaMa, GPT4All, Dolly, etc.)","HD2Tiz":"Lock","FK/gUg":"Login / Signup","khlq+8":"Login Here","pzMtjG":"Login to","UjFbj1":"Login to sync your data","rpu3w+":"Login to sync your data across devices","5z2/lU":"Login to TypingMind Cloud","11JwGr":"Login with email","u62JiU":"Login with Email","nOhz3x":"Logout","4TQrIR":"Lost your license key?","nTWWCZ":"Low","pdO539":"Lower","OpIDIK":"Make sure you have your billing info added in <0>OpenAI Billing page. Without billing info, your API key will not work.","l51yT8":"Manage Cloud Sync","HjdyXC":"Manage License & Devices","KhaF0E":"Manage Models","UwHZGA":"Manage Plugins","2Q43sq":"Manage Shared Links","faXgrj":"Manage your API keys","7FWkv7":["Max Tokens: ",["0"]],"XNLbke":["Maximum Devices Allowed: ",["0"]],"agPptk":"Medium","Kbwvno":"Memo","v8o+Rn":"Memory","CARDy6":"Memory Entries","R8Ba3j":"Message Attachments (Images, Files, etc.)","6hMGSB":"Messages Count","0ivkbP":"Metadata & User Data:","Uo2nri":"Metaphorical","lRVSrT":"Missing required key:","lXJuyl":"Mistral AI","scu3wk":"Model","IzB3v0":"Model ID","0f8VF5":"Model Quick Selection","VdtyvK":"Model Settings","XDOReT":"Model Settings (Current Chat)","hDkkvu":"Model:","//nm2/":"Models","EvGHqi":"Models Visibility And Order","3xm05L":"More stable","SjsPQu":"More variable","mq//7G":["Move <0>",["chatTitle"]," to"],"/DMBqC":"Move To Folder","qhwV2C":"My Account","6YtxFj":"Name","Sn9236":"Narrative","KwhrYp":"Need help creating plugins?","6FUdfq":"Need setup","proQUv":"Neutral","q2+WzE":"New Chat","5jeS/s":"New Chat in Folder","5FLa/t":"New Chat Instance","5sQUqJ":"New features, improvements, and bug fixes.","tX5yOZ":"New Folder","Bjt2Wt":"New Plugin","qdyV/M":"News","5ACX4z":"Newsletter","UcAV3Q":"Nice, the endpoint is working! \uD83C\uDF89","2Pl7Xj":"No AI agents found","ypvWKm":["No AI agents found for \\"",["debouncedSearch"],"\\""],"cUyict":"No AI agents in your library yet.","CP6gDt":"No Chats Yet","gIikXc":"No data found on this device","INI7x0":"No information available","fnpUJJ":"No memory entries yet","Eo6Lg5":"No plugins available","uLNH6C":"No plugins found","PPDN8S":"No refresh. Use until cache expires.","tSEkZI":["No result found for \\"",["searchKeyword"],"\\""],"Ev2r9A":"No results","1dhpFr":"No results.","cCELIA":"No tags found!","7tSS3w":"No you can\'t, and you shouldn\'t. It\'s not safe to share your License Key and API Key to the public like that. The Static App Self-host version is meant for personal use. If you are looking to setup a custom deployment of TypingMind for your team/community/customers, please check out https://typingmind.com/custom","FTMbwN":"No, but you can add typingmind.com to your home screen. It works exaclty like an app!","z3hnVp":"No, I want to use my own API key","wIOBEk":"No! A ChatGPT Plus subscription is not needed. You just need to have an OpenAI\'s API Key. You can see more info on how to get one here: https://openai.com/blog/openai-api","dy1KlD":"No. The license key only grants you the permission to use and deploy the app on your own server. You do not have permissions to modify or redistribute the code. The full source code is not available for sale as the app is not open-source. You will only receive the compiled code of the app, you can deploy the app anywhere without having to update any code or settings.","EdQY6l":"None","QmOa3K":"Note: answer from the bot may include inaccurate information. Always verify the information you received. When in doubt, contact customer support.","2T68PV":"Note: Extensions have full access to the application and can read and modify any data. Only install extensions from sources you trust.","yA1cUG":"Note: only models with OpenAI compatible API are supported.","EuE1GI":"Note: Post-Processing only works with JSON responses.","CvvaRA":"Note: some voices have different character limits.","mIHRS/":"Note: The content of the API response will be injected to the system prompt, keep your API response short to avoid exceeding the context limit. The best response format is Markdown or Formatted JSON. API responses that are longer than 15% of the model context length will be truncated automatically.","rF9ATR":"Note: Web Search works best with the <0>GPT-4 model. Enable Web Search will consume more tokens. All web searches are private. Learn more below.","NnuIWZ":"Note: you may need to update your API key after changing the endpoint.","UIpYys":"Note: You pay for your own API usage directly to ElevenLabs. API requests to ElevenLabs are sent directly from your browser without any intermediate server. No one can see your chat content and audio. Enjoy your privacy!","dk+V/P":["Nothing found for \\"",["0"],"\\""],"Amd0C9":"Nothing to export.","qmm0gd":"Notify Me","zga9sT":"OK","NIhxhS":"Ollama (Local models: Llava, Llama2, Mistral, Orca, etc.)","FjIVLO":"Only sample from the top K options for each subsequent token. Used to remove \\"long tail\\" low probability responses. Min: 0","cf3IX1":"Only store your data on this device, no where else","v0YINs":"Open AI Agents","w9uz3G":"Open chat with this specific AI agent","lydwZP":"Open code in CodePen editor with 1 click.","wc9o2P":"Open Full Page →","jZlMgr":"Open in CodePen","N5skTB":"Open in separate window","N5tvE6":"Open Model Settings","zx1wgl":"Open Prompt Library","seLMUl":"Open Router models","s19V4z":"Open Search","OdnLE4":"Open sidebar","9ElpTL":"Open-minded","16pk+G":"OpenAI API Key","rNGD7J":"OpenAI API Org ID","Rde+o4":"OpenAI Chat Completions Endpoint (V1)","7HIUd6":"OpenAI Function Spec","4cpPCu":"OpenAI Function Spec is required.","/xxPLj":"OpenAI Function Spec must have a \\"description\\" property.","LWocrQ":"OpenAI Function Spec must have a \\"name\\" property.","dbxhNC":"OpenAI Function Spec:","7+CA6l":"OpenAI Status: OK","D0uUAb":"OpenAI Status: Slow","rmkBdt":"OpenAI Status: Unavailable","lKxYcA":"OpenAI Text-to-speech","BLqwK7":"OpenAI Text-to-speech requires an OpenAI API Key. Please enter an OpenAI API Key to the app and try again.","I3d9HX":"OpenAI Whisper","dV7X6u":"OpenAI Whisper Endpoint (V1)","2tVhma":"Opinion","rnF+lT":"Optimistic","N6xDy3":"Optimize your API usage by allowing resuming from specific prefixes in your prompts. <0/> This enables reuse of the large text across multiple API calls without reprocessing it each time.","AWA6XY":"optional","mp5yqd":"or <0>Upload an audio file","I8e+C7":"or anything","T7yhkH":"Output Format","2o7xcf":"Output Options","kzRPrD":"Override system instructions","6FSnpy":"Overview (Markdown Supported)","l9QF2Y":"Overview:","IgrLD/":"Pause","hgrGkS":"Perplexity AI","Lj9mvp":["persisted: ",["0"]],"jAz6//":"Persuasive","Dc1wVa":"Pessimistic","CGEos+":"Pick a color theme for the sidebar","qVkGWK":"Pin","NGcwCb":"Pin this AI agent on the main page","H/zYvy":"Pin this character on the main page","AURbCJ":"Pinned Messages","PBh8Vb":["Pitch: ",["0"]],"GdgCoi":"Plan","T91vKp":"Play","jzYyPY":"Playful","gRjjY7":"Please buy a license to add this character","QJz/m1":"Please buy a license to start chatting with this character.","mJOkX1":"Please confirm that you may lose your data if you clear the browser cache or site data.","rvyFY9":"Please enter your API key to get started.","jF//iB":"Please enter your ElevenLabs API key to start using text-to-speech.","kMEn8S":"Please export and backup your chats regularly to avoid data lost!","wwrAsK":"Please fill in all required fields","JOCX5y":"Please finish adding a Custom Model first (or click Cancel) before applying changes.","m1DS6L":"Please login to see all available prompts","49/2RF":"Please login to see this page.","36Sd6M":"Please make a copy of the links below, they will not be shown again.","V5qHtW":"Please make a copy of the links below, you can also manage all previous shared links in <0>Manage Shared Links","HcH0CK":"Please select a plugin from the list first.","k8Mebo":"Please select tags...","4dbClF":"Please try to close the app and reopen again.","cQKduU":"Please try to reload the app.","C1aFyX":"Please wait while we sync your data to this device","rYG2u6":"Please wait...","fOuPPd":"Plugin","VGOLXi":"Plugin Code Implementation not available","0dl2VR":"Plugin is running","ErRKov":"Plugin Name","4od74D":"Plugin name is required.","nqxUE9":"Plugin OpenAI Function Spec not available","LQLgsn":"Plugin overview not available","eKHY3W":"Plugin Settings","E+y9QY":"Plugin Store","heVD0V":"Plugin supported","eTB1Zi":"plugins","ohUJJM":"Plugins","bPwU1X":"Plugins are locked for this chat","m6koiy":"Plugins: Not Supported","LKmpE/":"Plugins: Supported","TsPLF1":"Podcast Script","HkrWZH":"Poem","mcGYQP":"Poetic","lXk/9o":"Policy Document","PfQA36":"Possible workarounds","gF9SeK":"Post-Processing","6LWacs":"Precise","Q6hhn8":"Preferences","RY5kDp":"Premium","J7wKTg":["Presence Penalty: ",["0"]],"FOoDGS":"Presentation","gBJdgA":"Press \\"/\\" to focus input","PeRQRx":"Press [Tab] to move to the next fill-in-the-blank position.","uy5i6n":"Press Release","R3vQ4L":"Print / PDF","8AUk5H":"Print this page or save as PDF","rjGI/Q":"Privacy","LcET2C":"Privacy Policy","k+M+xc":"Processing Engine:","me35xG":"Product Description","vERlcd":"Profile","xBzEtd":"Profile Image URL:","p7V64o":"Profile picture for the AI agent. Will be displayed along with the AI agent\'s messages.","NI0r0N":"Profile picture URL must starts with http:// or https://","xvRniw":"Profile Picture URL:","vrQQgz":"Profiles","1mnY67":"Programmable Search Engine (by Google)","pqNt/b":"Programmable Search Engine (by Google) is a customizable tool that allows developers to integrate Google\'s search capabilities into their applications or websites.","W9uQXX":"Prompt","hUq4IV":"Prompt Caching (Claude Only):","MqJtNb":"Prompt Library","3jrgtI":"Prompt Title (e.g., \'Domain Names Inspirations\')","o73FAt":"Prompt:","Ad1kG/":"prompts","Qmr3jO":"Prompts","JPFjAF":"Prompts are message templates that you can quickly fill in the chat input. Some prompts come with variables.","8B+pY5":"Property","i+CFi4":"Property Value","qcybNQ":"Proposal","AH5Ipl":"Proxy & Org ID","4bZkAM":"Put to background","T3l2/7":"Put your OpenAI Function Spec here...","z2HsPn":"Q&A","b24kPi":"Queue","RQWuCs":"Queue message","TAocpQ":["Rate: ",["0"]],"fqH5by":"Re-sync everything","pcGj5q":"Read our documentations to explore more awesome features of TypingMind, or click \\"Finish\\" to close this window.","4i4Xz6":"Read our reviews →","uUXlSw":"Recommendation: 128x128","YS2bZx":"Recommendation: 4 words or less.","WEYdDv":"Recommended","w80YWM":"Record","GyaNUA":"Record Again","9kEKKZ":"Recover License Key","PjpB64":"Refresh once per chat (or when cache expires)","rC5mbl":"Refresh once per message (or when cache expires)","6exX+8":"Regenerate","JhXfkQ":"Register Here","KXcI9P":"Remember details across all chats and all AI agents. Old chats before this setting is enabled will not be considered.","ykZ0jq":"Remembering details you discuss across chats saves you from having to repeat information and makes future conversations more helpful.","t/YqKh":"Remove","eLm251":"Remove All Ads","mTAnk+":"Remove API Key & Disable Web Search","+J8ouA":"Remove Key","u/WKTl":"Render plugin output as interactive HTML","HVm9F2":"Render plugin output as markdown","yjKqG9":"Reopen previous chat when app open","B81CYu":"Replace Only","gjpdaf":"Report","yWOswz":"Request Body (JSON)","dZjnSE":"Request Body Format","ArNNAV":"Request Headers (JSON)","lY4/S/":"Requests to the endpoint are sent directly from the browser. Make sure your endpoint is configurated correctly to avoid CORS related issues.","RIssSO":"Research Paper","OfhWJH":"Reset","kQlJyC":"Reset Chat","SFteAp":"Reset Default","L+rMC9":"Reset to default","cdQnFM":"Reset to defaults","u6QeR6":"Restart Now","heil9d":"Restart the app to update to the latest version.","mBkVGB":"Restore Now","RD6AE9":"Result","v39wLo":"Resume","6vm5iQ":"Retrieve content from an API and inject into the system prompt. This can be used to add live information to the AI or implement Retrieval-Augmented Generation (RAG) from your own data sources (e.g., vector store database).","5k0NLb":"Review","Wt3M+q":"Safety Settings (Gemini Only):","K6tmBZ":"Sarcastic","4uPDxA":"Satirical","tfDRzk":"Save","mxFYYR":"Save API Key","IUwGEM":"Save Changes","u1xg0F":"Saved successfully!","Zi7dyz":"Script","A1taO8":"Search","4IdIIf":"Search AI agents...","aDVBYo":"Search API","PtdI1b":"Search API Key","fsSQWV":"Search API Key is now working!","wRL7Wp":"Search chats...","5qSvKg":"Search Engine ID","50DcYA":"Search on the internet:","slq1pb":"Search plugins...","6u87ha":"Search prompts, characters, or chats...","xEEOHj":"Search Suggestions Link","lnWve4":"Search tags","9Bfco2":"Search your prompts","WNypG5":"Secret Link","V1fa9u":"See more","iqebkX":"See more FAQs","rG3WVm":"Select","uvUq+/":"Select a mode to continue","z9xdHh":"Select a tab","yM5jvp":"Select AI agent","c/+K+h":"Select AI Agents","mCB6Je":"Select All","YH4rCS":"Select an Identity Provider:","MHm/fc":"Select Language","gzNMI5":"Select number of characters to buy:","VNEe/a":"Select number of seats to buy:","UJpWwn":"Select one or more plugins to add to your chat portal.","euBEyc":"Select the profile you want to use","QdU0Z4":"Select what you want to sync","ylXj1N":"Selected","LTE+c6":"Self-host means you deploy the same version of TypingMind.com on your own web hosting server and domain name for your personal use.","7xHXyX":"Send Code","KgBK/c":"Send message on Enter key","Ls+eRP":"Send Test Request","QEQlnV":"Send your first message","3fV/9W":"Sent at","OI539Y":"Serious","qRsPIT":"Set default","1J28UM":"Setapp provides you with some free models, do you want to use free model instead?","Tz0i8g":"Settings","ah70YE":"Setup Backup & Sync","xwwTVi":"Sexually explicit","Z8lGw6":"Share","nntTLt":"Share & download as a JSON file","h+U8sH":["Share Agent: ",["0"]],"5zYChD":"Share conversation in HTML format","TwWdwu":"Share conversation in Markdown text format","QxxWAu":"Share Now","/9EVpH":["Share Plugin: ",["0"]],"uD5/Z+":"Share This Chat","Q600Ty":"Share to <0>Cloud","cY+WFi":"Share to <0>ShareGPT","4DIWvs":"Shared At","xMp08Q":"Shared Data","4+XAJf":"Shared Links","8vETh9":"Show","PUO6ed":"Show Advanced Options","TKt2IH":"Show Content","qsNpLL":"Show estimated tokens while typing","xgss0e":"Show in artifacts panel","sgzcYD":"Show labels","w1f7ZM":"Show on header and while typing","2xLA9y":"Show Play button after assistant messages","rlNC9x":"Show raw","5amG4X":"Show settings","6kuw9a":"Show, hide, sort models for quick selection on the navbar","pRcxFW":["Showing <0>",["0"]," to <1>",["1"]," of <2>",["totalResult"]," results"],"ebEv56":"Sidebar Color","tbgdI4":"Sidebar Style","e/ToF5":["Sign in with ",["0"]],"Cj2Gtd":"Size","CoiZM+":["Skipped ",["0"]," chats due to an unsupported format"],"Ada8m+":["Skipped ",["0"]," chats, see details"],"w625t8":"Slower","4Revpc":"Small","Kmbi2z":"Social Media Post","+iNEMI":"Some enhanced features on TypingMind will increase your token usage. You can always turn these features off in the Settings pannel (click the gear icon in the sidebar). The enhanced features include: Chat Title Suggestion, Search Keywords Suggestions, AI Agents, Upload Document, etc. Amount of tokens used depends on the AI agent and the length of your document.","ZgGAHI":"Some people prefer to run the software on their own server for privacy and availability reasons. For example, if TypingMind.com becomes inaccessible in the future, you can still access your own version of TypingMind from your server without any problem. The self-host version can also be run locally like an app.","lkE00/":"Something went wrong. Please try again later.","fWsBTs":"Something went wrong. Please try again.","UGi5Zs":"Something went wrong. Please try again. Open the console may reveal more information.","x2knav":"Something went wrong. This could be a temporary network connection issue. Please try again or contact support. Opening the console might help clarifying the issue.","+IoUcJ":"Sorry, audio input is not yet supported on your device/browser.","lYgpBY":"Sorry, that license key is invalid.","GAMnLq":"Sorry, the FAQ bot is currently experiencing high demand. Please try again later.","cNnfG2":"Sorry, there has been a problem with the sync process. Open the Console might clarify the issue.","04ofk2":"Sorry, your browser/device does not support Speech-to-Text API. Please select another Speech-to-Text service.","ZqFmVi":"Sorry. Voice input is not yet supported on your device/browser.","Sb94+G":"Sound notifications","dpGL2Q":"Source:","8BnJo9":"Speech","GPIMoy":"Speech API:","MbTAbA":"Speech-to-Text Provider:","UHgcpG":["Speed: ",["0"]],"CH0AaX":"Stability:","TJBHlP":"Standard","jDO+4L":"start a new chat","vPF04k":"Start a new chat","d9HU83":"Start a new chat from here","hYlkID":"Start talking...","JEGlfK":"Started","R1H72g":"Step-by-step","ygCKqB":"Stop","RlyAC4":"Storage Stats","oMGFep":"Storage upgrade","nd5PZx":"Store your data on the cloud and sync between devices","c7CCr7":"Stream AI responses word by word","3mDv0d":"Stream AI responses word by word (typing animation)","hQRttt":"Submit","FP9FYD":"Subscription ends at","0EHAOo":"Such an easy purchase. This tool makes interacting with ChatGPT so much nicer. The pre-built personas are fantastic and the prompt library is such a time saver.","ddnJmC":"Suggest Search Keywords","yAyOUJ":"Suggest some first messages for the user to select from in the beginning of the conversation.","dXoieq":"Summary","PDCXEl":"Support & Feedback","IHh1FJ":"Support OpenAI Vision","r41Eim":"Support Plugins (via OpenAI Functions)","Aqw8Kb":"Sure?","1+P9RR":["Switch to ",["0"]],"XerTC6":"Sympathetic","KmFUm2":"Sync Changes","OafbM3":"Sync will continue but you can start using the app right away.","sP8i1e":"Synced At","GYA8rj":"Syncing Data...","uHIPUT":"Syncing...","D+NlUC":"System","ZGzNem":"System Instruction (for the AI agent)","vawWq6":"System Instruction:","GGF/7/":"System Instructions:","4hJhzz":"Table","OYHzN1":"Tags","HurUmz":"Tags (optional):","n6bA7l":"Tags:","9SpTGy":["Talking to <0>",["0"],""],"IhEEon":"Team License 10 users – $395","mwQvwH":"Team Profile","CAL6E9":"Teams","wanXT9":"Technical","AGHoaB":"Technical detail:","8RB+0b":"Technical Documentation","r6Q6b1":["Temperature: ",["0"]],"8dEBSa":["Temperature: ",["temperature"]],"lHk6rb":"Template:","3WYP3r":"Tentative","4Y5H+g":"Terms","xowcRf":"Terms of Service","NnH3pK":"Test","ALQq49":"Test API Key","oRX7OJ":"Test audio:","NFYITQ":"Test Endpoint","V17zQG":"Test Missing Translation.","cQfI46":"Test Variables (JSON)","yJvxHg":"Text (Markdown)","TTBVi5":"Text-to-speech","CZer2q":"Text-to-Speech","M+BBlf":"Text-to-speech is disabled. Please select a Speech API above to enable.","nAl9s9":"Thank you for your purchase!","M8UX1B":"That endpoint is not working. Please check and try again. Open the console log may reveal more information.","vVD6Dy":"That\'s not a license key. It looks like an OpenAI API Key, not a License Key. Please enter your license key instead.","QS9Feg":"The AI assistant will remember your information on all future chats.","7egM0P":"The app will connect to Anthropic API server via our proxy to check if your API Key is working properly.","6NM9H1":"The app will connect to OpenAI API server to check if your API Key is working properly.","153KVj":"The app will connect to the license server to verify your license key. To manage your license keys and devices, click the button below.","gqbLFw":"The app will restart now.","u5hWpH":"The base instructions for Web Search contains ~600 tokens. The search result will be added to the context and will be used to answer your question. The more search results you get, the more tokens will be used. The average number of tokens used for Web Search is ~800 tokens.","0pm0cB":"The ChatGPT API costs soooooo little you won\'t even notice it. Typical chat conversation is about 1000 characters, which costs ~$0.001. That\'s less than a cent. You can have thousands of chats and it will only costs you like $1. See official pricing here: https://openai.com/pricing#language-models","30hLYa":"The code that will be executed when the plugin is called. Must be a valid JavaScript code. <0>Learn how the code is executed here.","gbk4fY":"The cost is calculated based on the <0>public pricing of OpenAI\'s API. Each model has its own pricing, each type of tokens in each model also has its own pricing.","4JRmPz":"The current chat may come with limitations. <0>See details","CH5FaG":["The custom model used for this chat is currently not available on your device. The default model <0>",["0"]," will be used for future messages of this chat."],"jbkRdE":"The default free plan of Programmable Search Engine includes 100 searches per day for free. If you need more, you may sign up for billing in the Google API Console. https://cloud.google.com/billing/docs/how-to/manage-billing-account","BmbkK/":["The first ",["skippedMessagesCount"]," messages are forgotten."],"jherDw":"The first message to send to the user when start a new chat.","pyyzCs":"The green dot indicates that OpenAI API services are working normally. When it turns red<0/>, that means OpenAI is slow or unresponsive due to high demand or other reasons.","FngNgl":"The license key is valid forever.","LSy+DK":"The maximum number of tokens to generate before stopping.","iJi00j":["The number of characters is limited to ",["0"]," ",["4"],".<0>Your usage: ",["5"],"/",["6"],"."],"tE4Rz2":["The number of characters is limited to ",["0"]," per message"],"5u+jhV":["The number of files exceed the limit (",["fileUploadMaxTokens"],")."],"k2UV77":"The number of messages to include in the context for the AI assistant. When set to 1, the AI assistant will only see and remember the most recent message.","kXFHYg":["The number of requests is limited to ",["0"]," ",["4"],".<0>Your usage: ",["5"],"/",["6"],"."],"Torea7":"The official website is https://developers.google.com/custom-search/v1/overview. Also, you can follow the instructions on this page https://tdinh.notion.site/How-to-get-Search-Engine-ID-and-API-Key-on-Programmable-Search-Engine-by-Google-b861a749b20f4fcdbc1449f92ad9ed9a","9r58AF":"The premium features include: Chat Search History, Access Prompt Library, Integrations, etc. Check the pricing page for the latest details of all the premium features.","Za69ud":"The search requests are sent directly from your browser to the search API without any intermediate servers. Your privacy is 100% protected. No one can see your search query and search result except you and the search engine itself.","UUd8gD":"The selected model is unavailable. Please select another option","zJpCEF":"The self-host version comes for free when you buy a license key. There is no support on technical issues if you self-host. If you don\'t have the technical skills to setup the self-host version, we recommend using the hosted version on https://typingmind.com instead. You can also checkout the Custom Deployment for easier setup with custom branding and manage team member: https://typingmind.com/custom (available as a separate purchase)","WQEjxZ":"The shared chat only contains the messages <0>at the time it was created. Future messages are not synced automatically. You can share a chat multiple times and have different links each time.","j123Pn":"The static self-host version does not offer any customizations. Check out https://custom.typingmind.com for a custom version of TypingMind that will allow you to customize almost everything.","pWBnET":"The Team License gives you a License Key that can be shared and used among your team members. Simply share your license key with your team members and they can use it on their devices.","FEr96N":"Theme","WhnWdJ":"Theme: Dark Mode","yTmIDf":"Theme: Light Mode","ide/cZ":"Theme: System Setting","i4CFDG":"There are way too many possible technical issues that could happen with various tech stacks and server configurations that are not in my control. That\'s why I cannot offer technical support if you have problem with your self-hosted version.","ZdIhm8":"There is a current temporary issue with our payment processor <0>Lemon Squeezy that causes the receipt emails to be lost for some customers. This happen more frequently with <1>PayPal users.","hzceqz":"There was an error syncing your data. Please try to sync again.","CGYYZ/":"Think step-by-step","U/7xR9":"Thinking... this may take up to 30 seconds.","3gfZ4K":"This agent can be installed by anyone who has the link.","k5Es8x":"This AI agent has an assigned voice","t77h0I":"This AI agent has assigned plugins","e50+si":"This archive file is empty.","mLHm5q":["This chat contains a plugin usage, but the AI agent \\"",["0"],"\\" does not support plugins and cannot be mentioned in this chat going forward."],"/tOeF0":"This could be because OpenAI\'s server is experiencing high demand or having an outage. Usually, the issue will goes away pretty quick. You can try to send your message again every few minutes. If it takes too long, go to <0>https://status.openai.com to check their service status.","6QICdW":"This device has been unlinked from your license key. Please enter your license key again to activate this device.","XvQUAU":"This device is currently linked with an existing license key. Please unlink it first before activating another license key.","Mwh/zr":"This extension has already been installed","FHVG+T":"This feature","ksNPZj":"This instance does\'t have any SSO connections yet. If you are an admin, you can add a new SSO connection in the Admin Panel.","HZu0OM":"This is a built-in plugin","XmhWD2":"This is a built-in system plugin, you can view the details but cannot edit or delete it.","cKOmN0":"This is a static web app, it doesn\'t have any backend server. When you enter your API key, it will be stored locally and securely on your browser. All API requests are sent directly from your browser to OpenAI server to interact with ChatGPT. Think of this as a HTTP client for your ChatGPT API with a lot of convenience features.","vBSaD3":"This is an example chat for demonstration purposes","UFFTVk":"This is not a valid archive file or it has been corrupted.","fnLwMQ":"This is the best ChatGPT client and I tested so many! So much better than the OpenAI user interface. Added my gpt4 API to bypass the 25 message cap PLUS have a better user experience.","C9R6Ya":"This is the total length of your current conversation. It is calculated by OpenAI\'s API when you send a message.","v7jVhI":"This library is empty","cTdBYz":"This license key is valid but it has reached the maximum number of activated devices.","dPvuoF":"This limitation is set by the model provider. Please check the model\'s context limit and ensure your message is within the limit.","M2+O2G":"This link is not valid","rzhN/v":"This means if you clear your browser cache or clear site data, <0>you will lose your chat history.","F1uW/d":"This plugin allows you to search the web...","xGQeda":"This plugin can be installed by anyone who has the link.","4AaI7a":"This plugin is assigned to the AI agent but could not be used. Please check if you have installed the plugin and make sure you are using a model with plugins support.","tAhtTZ":["This will <0>upload your chat conversation to <1>",["0"]," and become <2>publicly accessible for anyone on the internet."],"G2oQAJ":"This will <0>upload your chat conversation to <1>sharegpt.com and become <2>publicly accessible for anyone on the internet.","BHoBQr":"This will be used as the system instruction for the AI agent.","u7fI8q":"This will delete all of your local data from this device, including your chat messages, prompts, agents, custom models, API keys, license key, and reset everything app setting to default. This action is irreversible. Type \\"delete all\\" to the textbox below to confirm.","qZyW8X":"This will remove your license key from this device and you will not be able to use the premium features on this device. Are you sure?","7fH3I5":"Tip: Use exactly 4 dashes \\"----\\" as the separator to queue more than one message in one go.","MHrjPM":"Title","X5DieB":"Title and instruction cannot be empty!","oE9Wxh":"Title and prompt cannot be empty!","P2YRxu":"Title:","3fpIq1":["to ",["0"]],"UbVgIu":"to close","J5C0cq":"To delete the link above, go here:","rSHV7E":"To get started, select an AI agent","Xyoped":"To get started, we need to verify your email:","S0fQBK":"to navigate","TT5b0p":"To prevent this, you can enable <0>Backup & Sync. This will allow you to sync your chat history across devices and restore it if you ever lose it.","gLj//H":"To unlock your API Key","VbbNWn":"Toggle Plugins","6poLt9":"Toggle Sidebar","7ziKq7":"Token usages are not recorded when <0>streaming response is enabled. We will work on improving this soon.","uAQyzk":"Tone","VhAZmC":["Top K: ",["0"]],"fvdi5P":["Top P: ",["0"]],"SsfBpq":"Total cost:","p26txP":"Total Tokens Cached:","+mOvod":["Total tokens of the files exceed the limit (",["fileUploadMaxTokens"],")."],"AG4LZH":"Total Tokens Spent:","Dil/yn":"Total:","37zp8q":"Training Examples","srA3JN":"Training examples help the AI agent learn how to respond to users.","rOzgch":"Training Examples:","fp5rKh":"Transcribing...","vzAe+s":"Translations provided and approved by human.","nrlh+D":"Translations provided by AI and may not be accurate.","yPA2s0":"true","V/skAV":"Try your luck with the FAQ bot!","T7w4KT":"Tutorial","Kfz6IH":"Type \\"/\\" for menu","0wNwVE":"Type \\"/\\" for menu, \\"@\\" to mention an AI agent","O8x+FV":"Type \\"delete all\\" to confirm","4elSI1":"Type 2 or more characters to search...","qdQfLS":"TypingMind — The best chat UI for AI models (ChatGPT, Gemini, Claude, and more)","7zcVP2":"TypingMind currently only supports Google search engine. We will add more search engines in the future.","CHoY0X":"TypingMind is a PWA compatible web app, so you can install it to your device and it will work like a native app. Click the menu of your browser → Install on Home screen.","kwR92f":"TypingMind offers additional encryption for your API Key. You can enable encryption with a password by clicking the \\"OpenAI API Key\\" button in the sidebar and selecting \\"Encrypt API key...\\". Your API Key will be encrypted using the AES algorithm provided by the open-source CryptoJS library (https://github.com/brix/crypto-js). TypingMind only provides an encryption feature for your API key. Chat messages, prompts, AI agents, and other elements are stored using the standard local storage of your browser, which may or may not include encryption, depending on your browser. The encryption process are done entirely locally on your device, there is no backend server. If you use TypingMind on multiple devices, you will need to encrypt your API key on all of them, you can also set different passwords on different devices.","6nDmw9":"TypingMind respects your privacy. Your chat history is <0>only stored on this device by default and never sent to our servers.","YHikSC":"TypingMind uses the same underlying model as OpenAI\'s default chat app. For the same prompt, it can produce different responses each time. The default chat app by OpenAI may also have some initial prompt settings that are different from TypingMind. If you don\'t get the response you expects, try \\"Re-generate Response\\" or tweaking the prompt.","OnFMha":"TypingMind will ask for your password every time you open the app. If you forget your password, you will need to enter your API key again.","ZyBweS":"TypingMind will use the search engine\'s API to execute the search query. The search requests are sent directly from your browser to the search API without any intermediate servers. Your privacy is 100% protected. No one can see your search query and search result except you and the search engine itself.","cx6X5s":"TypingMind.com is free to use with some basic features. You will need to have a working OpenAI API Key in order to use the app. When you use the OpenAI API Key, you pay directly to OpenAI for the amount of credits/tokens you use. TypingMind.com has premium features that can be unlocked with a one-time purchase.","2sahWU":"Unable to import plugin. Please try again.","FzlEPS":"Unable to play audio:","Yyo7E4":"Unable to use the API. Check console logs and network requests for more information.","Rq8+VB":"Unable to use the API. Error message:","5JOLV9":"Unarchive","iGSBjq":"Under the hood, ChatGPT Plus and ChatGPT API offer the same model and the same quality. You can view this on their official announcement here: https://platform.openai.com/docs/guides/chat. The initial system instruction can be a little bit different, which can be configured to make the AI output different messages from time to time.","fo0VXg":"Uninstall","NIuIk1":"Unlimited","809od7":"Unlimited Plugins","W2RH+r":"Unlink this device","VAOn4r":"Unlock","/MikjG":"Unlock AI Agents","FKZXRo":"Unlock all premium features","tUYydg":"Unlock Now","MEIAzV":"Unnamed","nWMRxa":"Unpin","tsBoaf":"Unpin this character on the main page","/lmbYn":"Unsupported Browser","x87WPC":"Untitled Chat","EkH9pt":"Update","mlNp7q":"Update & Regenerate","2p/Kya":"Update Custom Model","XymtD/":"Update Payment Method","/LO3aj":"Update Plugin","3/+eGC":"Update Prompt","ZRx6Ce":"Update Tags","+b7T3G":"Updated","kwkhPe":"Upgrade","XZFk+E":"Upgrade to Premium","qedMtm":"Upload and create a secret link that can be viewed by anyone who has the link.","9Vfh5E":"Uploaded At","k39Ghd":"Uploading documents requires a license. Please buy a license to continue using this feature.","tb6hYw":"Uploading images requires a license with the Premium plan. Please buy or upgrade your license to continue using this feature.","9Rz3G/":"URL cannot be empty","Ug/Z77":"URL to chat with this specific AI agent:","7FaY4u":"Usage","jQkmDI":"Usage Limits:","4Lzyp6":"Usage:","DsBeuB":"Use","nskWen":["Use <0>",["field1Variable"]," <1>",["field2Variable"]," <2>",["otherVariable"]," to indicate the fill in the blank part."],"xU8mHI":["Use <0>",["yourContentVariable"]," to indicate the fill in the blank part."],"EuANcq":"Use <0>Google Drive to backup and sync your data across devices.","3HkJve":"Use Anthropic models","gitlhh":"Use as many plugins as you want at the same time, install external plugins, create custom plugins with JavaScript.","U2SXTH":"Use Google Gemini models","TmUqS+":"Use OpenAI models","kQqZRh":"Use Single Sign-On (SSO)","7PzzBU":"User","Roaswv":"User Guide","QOqjv5":"User message","y9LVx0":"User Message","fVja9T":"User profile","WzMCru":"User Profile","Nv92aJ":"User Settings (JSON, Optional)","GD4I91":"User Settings:","ikLQLQ":"User-specific settings that will be passed to the plugin when it is called. Must be a valid JSON. <0>See Example JSON and instruction here.","vM1Cz9":"User:","4aBfTf":"Users can\'t change the model when using this AI agent.","SsgICz":["Using <0>",["0"],""],"fgipLP":["Using <0>",["0"],"..."],"Su8blH":"using model:","OoaSi5":"Using Open Router? See instructions here","e/cvV1":"Verifying...","YYdC3A":["Version ",["0"]],"bSSnpo":"Very sorry about this inconvenience!","y3TO5G":["View All (",["count"],")"],"SZw9tS":"View Details","KvFtJO":"View Full Changelog →","dxFcof":"View Full Error","enkk1U":"View inline in chat","lOPUqQ":"Vision + Artifacts","hs6G7P":"Vision supported","3BQnyB":"Voice ID","8YQMY4":"Voice Input","/dqlKh":"Voice input is not supported.","M7vN5/":"Voice Settings","cKuv8v":"Voice:","kWu0yk":"Waiting for previous audio to finish...","Wtu1aS":"Warm","Ud2w4n":["Warning: you have ",["unencryptedKeys","plural",{"one":["#"," unencrypted API key"],"other":["#"," unencrypted API keys"]}],". Please enter your password again to encrypt them."],"EK7vb0":"We are receiving multiple reports of OpenAI being slow or unresponsive. This is likely due to high demand. If your message is not being sent, please try again later. This issue will usually be resolved within a few hours. If it takes too long, go to <0>https://status.openai.com to check OpenAI service\'s status.","Wtg0tB":["We found <0>",["0"]," chats that we were able to restore."],"qKRCLC":"We only notify you when <0>new features are added.<1/>No spam. Unsubscribe anytime.","zaVaEv":"We released <0>100+ updates in the last 6 months! You\'ll never get left behind on the new features and AI capabilities from OpenAI/Anthropic.","oVltH4":"We\'ve sent a code to your email. Please check your inbox (or spam folder) and enter the code below.","9kNmZU":"Web API (Free)","LnnVIT":"Web Search","i8itRy":"Web Search is best used with GPT-4 because it has a larger context length and can store more search results and can pull out information from search result more reliably. However, you can still Web Search with GPT-3.5 without problems (most of the time).","rxEvnk":"Webinar","/IAPcI":"Welcome message","0ZTOta":"Welcome Message:","goIoni":"Welcome to TypingMind!","0x5QFE":"Welcome to using TypingMind on macOS! Please be informed about the following known issues in the macOS app. We are working hard to improve the app every day!","W4q2I+":"What about my privacy? Who can see my search query?","O6XziL":"What are the limitations of the free plans.","iB2Bkg":"What are the limits? How many searches can I do?","DWdDaE":"What are the premium features?","XDMAfS":"What can I customize in the self-host version?","DwMTUj":"What is self-hosting?","h1Bn7G":"What permissions do I have with the self-host code?","zp5xO6":"What search engines are supported?","+Z6WVE":"What\'s the difference between ChatGPT Plus and ChatGPT API via TypingMind?","2h+sn/":"When you enable Web Search, TypingMind will use the function call feature provided by OpenAI models how to perform a search query using the selected search engine (which is Google by default). The model will then attempt to run a search command only when necessary and use the search result to answer your question.","opv8HK":"When you reach a certain length, you cannot add any more messages to the chat. This is the <0>context length limit of the OpenAI\'s API.","v2mmfw":"Where can I deploy my self-host version?","9uiWR5":"Where can I get an OpenAI API Key?","qbPmKP":"Where can I get the search engine API Key?","gxYlbr":"Whisper Prompt:","vkJWU0":"Whitepaper","nBo3N2":"Why does sometimes TypingMind responds differently than the default OpenAI\'s ChatGPT event with the same prompt?","Gi4C7z":"Why don\'t you offer technical support for the self-hosted version?","AUHjnb":"Why self-hosting? What are the benefits?","R2ZXpR":"Writing Style","doZNDE":"Yes, Clear All Storage","+wDpvB":"Yes, license key is one-time purchase and valid forever. It is not a subscription and you don\'t need to renew it. You will also be provided with an offline static web app (self-host) after you purchase so you can self-host and use the app anytime anywhere you want. Enjoy!","Kb4R2a":"Yes, Unlink Now","GwJlK4":"Yes, use free Setapp models","ODPLFu":"Yes, you can use GPT-4 in TypingMind via the API access. Check out this article for more info: https://blog.typingmind.com/access-gpt-4-on-typingmind","phssxy":"Yes. After you make a purchase, you will receive a link to download the static web app and the instruction how to deploy it on your own server. Note that you will only receive the compiled code of the app, the full source code is not available because the app is not open-source. You can deploy the app anywhere without having to update any code or settings.","3ZEDHA":"Yes. Both are needed, as the self-hosted version is exactly the same as the version you see on TypingMind.com. The License Key is needed in the self-host version. When you enter the license key, the app will connect to TypingMind\'s license server to verify your license.","UohlSp":"Yes. TypingMind only stores your API Key locally and never sends your API Key anywhere. OpenAI allows use cases where the API key is stored locally in the user\'s device. You can see this official response from OpenAI\'s staff here: https://community.openai.com/t/openais-bring-your-own-key-policy/14538/4","oKL8Ih":"Yes. We offer a 14-day money-back guarantee. If you\'re not satisfied, let us know within 14 days and we\'ll give you a full refund. Request a refund at support@typingmind.com","9dFN/h":"Yes. You need to have an OpenAI account and a valid API key to use ChatGPT. We don\'t sell API keys.","+Obvhr":"You appear to be offline. Please check your internet connection and try again.","rHUldn":"You are a helpful AI assistant.","kW6uow":["You are now using profile \\"",["0"],"\\""],"qzMmix":"You are now using profile \\"Unnamed\\"","2LLYJB":["You are on the <0>",["0"]," plan"],"R0g4gG":"You are using a preview version.","Ny0rdk":"You are using the <0><1>free trial version.","S2lnkb":"You can continue this in a new chat, but keep in mind that the assistant will not remember the previous conversation.","jzCkMH":"You can delete some old messages from this chat, then start sending new messages again.","j+Ja1t":"You can export the chats and import it on another device. You can also enable TypingMind Cloud for seamless syncing across devices. TypingMind Cloud is a free service provided to all paying TypingMind users. You can enable it by clicking the cloud icon at the bottom of the sidebar.","wtFyIQ":"You can go to https://app.lemonsqueezy.com/my-orders/ to access your license key.","a1v3bw":"You can have as many chats as you want. The only limit is your OpenAI API key\'s limit and your browser storage limit (technical term: Local Storage and IndexedDB). Web browser gives you some limited data storage, the actual limit is different for each browser. Typically, you can save thousands of chat conversations without problems, but that\'s not guaranteed. When the browser storage runs out, you will need to delete old chats to save the new ones. We will provide a separate service to sync and backup your chats soon. Adding the website to your home screen may increase the storage capacity.","b/cYO6":"You can share a chat multiple times and have different links each time. The link contains the chat conversation and the time it was created.","B7bPOO":"You can signup directly with OpenAI at https://platform.openai.com/signup","G4U6ac":"You can still continue to chat, but the model will start to forget the old messages.","MSib0J":"You can, but keep in mind that they will also need a TypingMind License Key and OpenAI API Key in order to use it. If you are looking to use TypingMind for a team check out https://custom.typingmind.com","meXG5q":"You don\'t have a license key. Please buy or enter a license key to continue using all features.","yZwzBP":"You don\'t have any AI agents yet.","IBn/EB":"You don\'t have any invite codes. Please come back later.","N775f5":"You don\'t have any profiles, click \\"Add profile\\" to create a new one","tdX+tp":"You have","X6EZIu":"You have deleted the agent successfully!","0we8PW":"You have deleted the plugin successfully!","LjgHYd":"You have logged out of Cloud Sync. Do you want to clear all your data in the current device?","fmVolr":"You have no saved prompts. Tap \\"Add Prompt\\" to add a new prompt.","sTxGM6":["You have reached the context length limit of the <0>",["model"]," model for this chat."],"6+So7t":"You have reached the maximum context length of the conversation.","hzwvwf":"You have reached the maximum number of dynamic context endpoints.","02OlWC":"You need an Anthropic API Key to use TypingMind.","K3giZ9":"You need an Gemini API Key to use TypingMind.","zNOnmO":"You need an OpenAI API Key to use the app.","GhBsU+":"You need to buy a license key to use this feature.","zFLIIJ":["You now have ",["0"]," on this device"],"d/uOLs":"You will need this license key when you use TypingMind on another device. You will also receive a receipt and a license key <0>in your email shortly.","eeDCtB":"Your Agents","Qdj6uz":"Your AI Agents","/UaKK0":"Your API is safe and stored locally on your device. This is a static app, which means that it doesn\'t have a backend. All the data is stored in your browser\'s local storage. Requests to Open AI\'s API is sent directly from your current browser (check the Network tab in your console if you want to see it).","uxcgu1":"Your API key is encrypted with a password","9/DJGE":"Your API key is not working. You need a <0>paid API account on OpenAI in order to use the ChatGPT API Key (the free trial won\'t work). To verify that you have a paid API account, go here and make sure you have your billing info added: <1>https://platform.openai.com/account/billing/overview. Note that you <2>do not need to have a ChatGPT Plus subscription, it\'s <3>not needed. If you already have a paid OpenAI account, check to see if you still have sufficient credits. Also, try creating a new API key and trying again. If this problem persists, please contact support.","yX4ZJX":"Your API Key is stored locally on your browser and never sent anywhere else.","70QBvo":"Your API Key is working normally.","Wzyks2":"Your browser does not support speech synthesis.","BS31Ou":"Your character description","abiI8L":"Your character title","HS7jeS":"your content here","cHR7zG":"Your data include chat messages, agents, prompts, custom models, app settings, etc.","F56PXI":"Your department, bio, etc.","vpp2uI":"Your Information","PnL/Iu":"Your license is activated","0EmptK":"Your license key is being used on more devices than its limit allows. Please unlink other devices and enter your license key again.<0/>Click <1>Manage License & Devices to go to the License Manager.","a2BlV3":["Your license key is: <0>***",["0"],""],"/Rj5P4":"Your Name","+e9xkq":"Your Prompts","At02Ci":"Your Public Link:","uYL3GC":"Your Public Link: (tap below to copy)","DDRhQm":"Your session has expired.","38yscL":"Your users will not see the endpoints and the content of the Dynamic Context.","bxlmA3":"Your users will not see these training examples.","t03RMp":"Your users will not see this instruction."}')}},45600:function(e,t,r){"use strict";r.d(t,{j:function(){return i}});var n={};function i(){return n}},30062:function(e,t,r){"use strict";function n(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}r.d(t,{Z:function(){return n}})},61545:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(31396),i=r(30062),o=r(2427),a=r(45600);function s(e,t){(0,i.Z)(1,arguments);var r,s,u,c,l,d,f,h,p=(0,a.j)(),m=(0,o.Z)(null!==(r=null!==(s=null!==(u=null!==(c=null==t?void 0:t.weekStartsOn)&&void 0!==c?c:null==t?void 0:null===(l=t.locale)||void 0===l?void 0:null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==u?u:p.weekStartsOn)&&void 0!==s?s:null===(f=p.locale)||void 0===f?void 0:null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==r?r:0);if(!(m>=0&&m<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=(0,n.Z)(e),g=y.getUTCDay(),b=(g=o.getTime()?r+1:t.getTime()>=u.getTime()?r:r-1}function m(e){(0,i.Z)(1,arguments);var t=p(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),h(r)}var y=6048e5;function g(e){(0,i.Z)(1,arguments);var t=(0,a.Z)(e);return Math.round((h(t).getTime()-m(t).getTime())/y)+1}var b=r(61545),v=r(45600);function w(e,t){(0,i.Z)(1,arguments);var r,n,o,s,c,l,d,f,h=(0,a.Z)(e),p=h.getUTCFullYear(),m=(0,v.j)(),y=(0,u.Z)(null!==(r=null!==(n=null!==(o=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t?void 0:null===(c=t.locale)||void 0===c?void 0:null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:m.firstWeekContainsDate)&&void 0!==n?n:null===(d=m.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==r?r:1);if(!(y>=1&&y<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(p+1,0,y),g.setUTCHours(0,0,0,0);var w=(0,b.Z)(g,t),S=new Date(0);S.setUTCFullYear(p,0,y),S.setUTCHours(0,0,0,0);var _=(0,b.Z)(S,t);return h.getTime()>=w.getTime()?p+1:h.getTime()>=_.getTime()?p:p-1}function S(e,t){(0,i.Z)(1,arguments);var r,n,o,a,s,c,l,d,f=(0,v.j)(),h=(0,u.Z)(null!==(r=null!==(n=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t?void 0:null===(s=t.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==n?n:null===(l=f.locale)||void 0===l?void 0:null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:1),p=w(e,t),m=new Date(0);return m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0),(0,b.Z)(m,t)}var _=6048e5;function A(e,t){(0,i.Z)(1,arguments);var r=(0,a.Z)(e);return Math.round(((0,b.Z)(r,t).getTime()-S(r,t).getTime())/_)+1}function E(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?r:1-r;return E("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):E(r+1,2)},d:function(e,t){return E(e.getUTCDate(),t.length)},h:function(e,t){return E(e.getUTCHours()%12||12,t.length)},H:function(e,t){return E(e.getUTCHours(),t.length)},m:function(e,t){return E(e.getUTCMinutes(),t.length)},s:function(e,t){return E(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length;return E(Math.floor(e.getUTCMilliseconds()*Math.pow(10,r-3)),t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function P(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(0===o)return r+String(i);var a=t||"";return r+String(i)+a+E(o,2)}function x(e,t){return e%60==0?(e>0?"-":"+")+E(Math.abs(e)/60,2):I(e,t)}function I(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e);return n+E(Math.floor(i/60),2)+r+E(i%60,2)}var T={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return k.y(e,t)},Y:function(e,t,r,n){var i=w(e,n),o=i>0?i:1-i;return"YY"===t?E(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):E(o,t.length)},R:function(e,t){return E(p(e),t.length)},u:function(e,t){return E(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return E(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return E(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return k.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return E(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=A(e,n);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):E(i,t.length)},I:function(e,t,r){var n=g(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):E(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):k.d(e,t)},D:function(e,t,r){var n=f(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):E(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return E(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return E(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return E(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,i=e.getUTCHours();switch(n=12===i?M.noon:0===i?M.midnight:i/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,i=e.getUTCHours();switch(n=i>=17?M.evening:i>=12?M.afternoon:i>=4?M.morning:M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return k.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):k.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):E(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):E(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):k.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):k.s(e,t)},S:function(e,t){return k.S(e,t)},X:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return x(i);case"XXXX":case"XX":return I(i);default:return I(i,":")}},x:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return x(i);case"xxxx":case"xx":return I(i);default:return I(i,":")}},O:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+P(i,":");default:return"GMT"+I(i,":")}},z:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+P(i,":");default:return"GMT"+I(i,":")}},t:function(e,t,r,n){return E(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,r,n){return E((n._originalDate||e).getTime(),t.length)}},C=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},O=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},R=function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return C(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",C(i,t)).replace("{{time}}",O(o,t))},j={p:O,P:R};function D(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var N=["D","DD"],L=["YY","YYYY"];function U(e){return -1!==N.indexOf(e)}function B(e){return -1!==L.indexOf(e)}function W(e,t,r){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var F={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},H=function(e,t,r){var n,i=F[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},K=r(38683),z={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},q={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z={date:(0,K.Z)({formats:z,defaultWidth:"full"}),time:(0,K.Z)({formats:q,defaultWidth:"full"}),dateTime:(0,K.Z)({formats:G,defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(e,t,r,n){return J[e]},V=r(16252),Y={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},X={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},er={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},en={ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:(0,V.Z)({values:Y,defaultWidth:"wide"}),quarter:(0,V.Z)({values:X,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,V.Z)({values:Q,defaultWidth:"wide"}),day:(0,V.Z)({values:ee,defaultWidth:"wide"}),dayPeriod:(0,V.Z)({values:et,defaultWidth:"wide",formattingValues:er,defaultFormattingWidth:"wide"})},ei=r(45826),eo=r(181),ea=/^(\d+)(th|st|nd|rd)?/i,es=/\d+/i,eu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ec={any:[/^b/i,/^(a|c)/i]},el={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ed={any:[/1/i,/2/i,/3/i,/4/i]},ef={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},eh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ep={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},em={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ey={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},eg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},eb={code:"en-US",formatDistance:H,formatLong:Z,formatRelative:$,localize:en,match:{ordinalNumber:(0,eo.Z)({matchPattern:ea,parsePattern:es,valueCallback:function(e){return parseInt(e,10)}}),era:(0,ei.Z)({matchPatterns:eu,defaultMatchWidth:"wide",parsePatterns:ec,defaultParseWidth:"any"}),quarter:(0,ei.Z)({matchPatterns:el,defaultMatchWidth:"wide",parsePatterns:ed,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,ei.Z)({matchPatterns:ef,defaultMatchWidth:"wide",parsePatterns:eh,defaultParseWidth:"any"}),day:(0,ei.Z)({matchPatterns:ep,defaultMatchWidth:"wide",parsePatterns:em,defaultParseWidth:"any"}),dayPeriod:(0,ei.Z)({matchPatterns:ey,defaultMatchWidth:"any",parsePatterns:eg,defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ev=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ew=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eS=/^'([^]*?)'?$/,e_=/''/g,eA=/[a-zA-Z]/;function eE(e,t,r){(0,i.Z)(2,arguments);var n,o,c,d,f,h,p,m,y,g,b,w,S,_,A,E,k,M,P=String(t),x=(0,v.j)(),I=null!==(n=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:x.locale)&&void 0!==n?n:eb,C=(0,u.Z)(null!==(c=null!==(d=null!==(f=null!==(h=null==r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:null==r?void 0:null===(p=r.locale)||void 0===p?void 0:null===(m=p.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==f?f:x.firstWeekContainsDate)&&void 0!==d?d:null===(y=x.locale)||void 0===y?void 0:null===(g=y.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==c?c:1);if(!(C>=1&&C<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=(0,u.Z)(null!==(b=null!==(w=null!==(S=null!==(_=null==r?void 0:r.weekStartsOn)&&void 0!==_?_:null==r?void 0:null===(A=r.locale)||void 0===A?void 0:null===(E=A.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==S?S:x.weekStartsOn)&&void 0!==w?w:null===(k=x.locale)||void 0===k?void 0:null===(M=k.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==b?b:0);if(!(O>=0&&O<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!I.localize)throw RangeError("locale must contain localize property");if(!I.formatLong)throw RangeError("locale must contain formatLong property");var R=(0,a.Z)(e);if(!s(R))throw RangeError("Invalid time value");var N=D(R),L=l(R,N),F={firstWeekContainsDate:C,weekStartsOn:O,locale:I,_originalDate:R};return P.match(ew).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,j[t])(e,I.formatLong):e}).join("").match(ev).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return ek(n);var o=T[i];if(o)return!(null!=r&&r.useAdditionalWeekYearTokens)&&B(n)&&W(n,t,String(e)),!(null!=r&&r.useAdditionalDayOfYearTokens)&&U(n)&&W(n,t,String(e)),o(L,n,I.localize,F);if(i.match(eA))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}function ek(e){var t=e.match(eS);return t?t[1].replace(e_,"'"):e}},38683:function(e,t,r){"use strict";function n(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}r.d(t,{Z:function(){return n}})},16252:function(e,t,r){"use strict";function n(e){return function(t,r){var n;if("formatting"===(null!=r&&r.context?String(r.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=r&&r.width?String(r.width):i;n=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=r&&r.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}r.d(t,{Z:function(){return n}})},45826:function(e,t,r){"use strict";function n(e){return function(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],u=t.match(s);if(!u)return null;var c=u[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?o(l,function(e){return e.test(c)}):i(l,function(e){return e.test(c)});return r=e.valueCallback?e.valueCallback(d):d,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(c.length)}}}function i(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function o(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=r.valueCallback?r.valueCallback(a):a,rest:t.slice(i.length)}}}r.d(t,{Z:function(){return n}})},31396:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(37768),i=r(30062);function o(e){(0,i.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,n.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}},25829:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return I}});var n=r(67294);r(43950),r(64540),r(34155);var i=r(4361),o=r(89555),a=r(92777),s=r(82262),u=r(81531),c=r(72179),l=r(37247),d=r(13083),f=r(50029),h=r(64687),p=r.n(h),m=r(24855),y=r(85893);function g(){var e=(0,n.useState)(!1),t=e[0],r=e[1],i=(0,n.useState)(""),o=i[0],a=i[1],s=function(){window.location.reload()},u=function(){var e=(0,f.Z)(p().mark(function e(){var t;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.CQ)().entries();case 2:t=e.sent,a(JSON.stringify({localStorage:window.localStorage,indexedDbData:t}));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),c=function(){var e;window.localStorage.clear(),null===(e=window.webkit)||void 0===e||null===(e=e.messageHandlers)||void 0===e||null===(e=e.TypingMindMacApp)||void 0===e||e.postMessage("CLEAR_ALL_DATA"),window.location.reload()},l=function(){r(!0)};return(0,y.jsxs)("div",{className:"my-4 max-w-xl mx-auto",children:[(0,y.jsxs)("div",{className:"text-center",children:[(0,y.jsx)("button",{onClick:s,className:"inline-flex items-center px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-gray-400 gap-2",children:(0,y.jsx)("span",{children:"Reload App"})}),(0,y.jsx)("div",{className:"text-sm my-2",children:"This will restart the app and reload all data. It should fix any temporary data coruption with no data lost but you will lose any unsaved changes."})]}),(0,y.jsxs)("details",{className:"space-y-8 text-center p-4 rounded-md border border-gray-200 my-4",children:[(0,y.jsx)("summary",{className:"my-4 text-lg font-semibold cursor-pointer hover:underline",children:"View Recovery Options"}),(0,y.jsxs)("div",{children:[(0,y.jsx)("button",{onClick:u,className:"inline-flex items-center px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-gray-400 gap-2",children:(0,y.jsx)("span",{children:"Dump All Local Data"})}),(0,y.jsx)("div",{className:"text-sm my-2",children:"This will give you a copy of all the local data currently stored on this device. This data can be inspected by the developer to figure out what went wrong."})]}),o?(0,y.jsxs)("div",{className:"text-left",children:[(0,y.jsx)("div",{className:"text-sm my-2",children:(0,y.jsxs)("span",{className:"font-semibold",children:["Here is your data dump: (",o.length.toLocaleString()," ","bytes)",(0,y.jsx)("br",{}),"Note: This data dump contains all of your previous chat conversations, messages, prompts, custom characters, bookmarks, etc."]})}),(0,y.jsx)("textarea",{className:"w-full h-64 p-2 border border-gray-200 rounded-md",value:o})]}):null,(0,y.jsxs)("div",{children:[(0,y.jsx)("button",{onClick:l,className:"inline-flex items-center px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 disabled:bg-gray-400 gap-2",children:(0,y.jsx)("span",{children:"Clear All Data"})}),(0,y.jsx)("div",{className:"text-sm my-2 text-red-500",children:"This well return the app to its factory settings. All local data will be deleted and the app will be reset to its initial state. This will cause data lost!/"}),t?(0,y.jsxs)("div",{className:"text-sm my-2 text-red-500",children:["Are you sure you want to do this? This will cause data lost!",(0,y.jsx)("div",{className:"my-2",children:(0,y.jsx)("button",{onClick:c,className:"inline-flex items-center px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 disabled:bg-gray-400 gap-2",children:(0,y.jsx)("span",{children:"Yes, I'm sure. Delete all of my data on this device."})})})]}):null]})]})]})}function b(e){var t=v();return function(){var r,n=(0,l.Z)(e);return r=t?Reflect.construct(n,arguments,(0,l.Z)(this).constructor):n.apply(this,arguments),(0,c.Z)(this,r)}}function v(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var w=function(e){(0,u.Z)(r,e);var t=b(r);function r(e){var n;return(0,a.Z)(this,r),(n=t.call(this,e)).state={hasError:!1},n}return(0,s.Z)(r,[{key:"componentDidCatch",value:function(e,t){console.error("App render error",e,t),d.Tb(e)}},{key:"render",value:function(){return this.state.hasError?(0,y.jsxs)("div",{className:"p-4 min-h-screen flex items-center justify-center flex-col",children:[(0,y.jsx)("div",{className:"text-7xl",children:"\uD83D\uDCA5"}),(0,y.jsx)("div",{className:"text-red-500 font-semibold ",children:"Oops! The app has been corrupted due to an unexpected error. Open the console log may reveal more information."}),this.state.error&&(0,y.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,y.jsxs)("details",{className:"block w-full mt-10",children:[(0,y.jsx)("summary",{className:"cursor-pointer hover:underline",children:"View Technical Details"}),(0,y.jsx)("code",{className:"my-2 text-xs overflow-auto max-w-full px-2 block font-semibold",children:this.state.error.message}),(0,y.jsx)("code",{className:"my-2 text-xs overflow-auto max-w-full px-2 block whitespace-pre-line",style:{height:300},children:this.state.error.stack})]})}),(0,y.jsx)(g,{})]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}]),r}(n.Component),S=r(85793),_=r(10245),A=r(86501),E=r(53154),k=r(82623),M=r.n(k),P=r(71501),x=n.createElement,I=function(e){var t=e.Component,r=e.pageProps;return r.locale&&"en"!==r.locale?o.ag.loadAndActivate({locale:r.locale,messages:r.localeMessages}):o.ag.loadAndActivate({locale:"en",messages:M().messages}),x(w,null,x(i.bd,{i18n:o.ag},x(_.Z,{serverHostConfig:r.serverHostConfig},x(S.ZP,null,x(E.Z,null,x(P.Z,null,x(t,r))),x(A.x7,{toastOptions:{success:{style:{background:"#5ec269",color:"white"}},error:{style:{background:"#cb4538",color:"white"}}}})))))}},55433:function(e,t,r){"use strict";r.d(t,{Q:function(){return v}});var n=r(59499),i=r(17674),o=r(50029),a=r(64687),s=r.n(a),u=r(33281),c=r(19261),l={},d=function(){var e=(0,o.Z)(s().mark(function e(t,r){var n;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l[t]||(l[t]={queue:[],isLocked:!1}),n=l[t],e.abrupt("return",new Promise(function(e,i){n.queue.push({asyncFn:r,resolve:e,reject:i}),f(t)}));case 3:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),f=function(){var e=(0,o.Z)(s().mark(function e(t){var r,n,i,o,a,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(r=l[t]).isLocked&&r.queue.length>0)){e.next=18;break}return i=(n=r.queue.shift()).asyncFn,o=n.resolve,a=n.reject,r.isLocked=!0,e.prev=4,e.next=7,i();case 7:u=e.sent,o(u),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),a(e.t0);case 14:return e.prev=14,r.isLocked=!1,f(t),e.finish(14);case 18:case"end":return e.stop()}},e,null,[[4,11,14,18]])}));return function(t){return e.apply(this,arguments)}}(),h=r(96486),p=r.n(h),m=r(85893);function y(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 g(e){for(var t=1;t1&&void 0!==M[1]?M[1]:50,t.next=3,e();case 3:(i=t.sent).sort(function(e,t){return t.updatedAt-e.updatedAt}),o={},a=[],u=0;case 8:if(!(u=n))){t.next=23;break}return t.abrupt("break",26);case 23:u++,t.next=8;break;case 26:return t.abrupt("return",{filteredChats:(0,c.FW)(a),highlighted:o});case 27:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),getAllChatData:function(){var t=(0,o.Z)(s().mark(function t(){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),getAllChats:function(){var t=(0,o.Z)(s().mark(function t(){var r,n,i;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e();case 2:return r=t.sent,n=(0,c.FW)(r),i=p().sortBy(n,function(e){return-e.createdAt}),t.abrupt("return",i);case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),addChats:function(){var e=(0,o.Z)(s().mark(function e(t){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map(function(e){return(0,u.CQ)().set("CHAT_"+e.id,g(g({},e),{},{chatID:e.id}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),getChatData:function(){var e=(0,o.Z)(s().mark(function e(t){var r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.CQ)().get("CHAT_"+t);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),bulkUpdateChatFields:function(){var e=(0,o.Z)(s().mark(function e(t){var r,n,a,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r={},n=s().mark(function e(){var t,n,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t=(0,i.Z)(c[a],2))[0],l=t[1],e.next=3,b("CHAT_"+n,(0,o.Z)(s().mark(function e(){var t,i,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.CQ)().get("CHAT_"+n);case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:return i="function"==typeof l?l(t):l,o=g(g({},t),i),e.next=9,(0,u.CQ)().set("CHAT_"+n,o);case 9:r[n]=o;case 10:case"end":return e.stop()}},e)})));case 3:case"end":return e.stop()}},e)}),a=0,c=Object.entries(t);case 3:if(!(a-1&&r.splice(n,1)},emit:function(r){o[e].value!==r&&(o[e].value=r,o[e].callbacks.forEach(function(e){t!==e&&setTimeout(function(){e(r)},0)}))}}},s=function(e,t,r){var o=r.get,s=r.set,u=(0,n.useRef)(null),c=(0,n.useState)(function(){return o(t,e)}),l=c[0],d=c[1];i("storage",function(r){var n,i=r.key,o=r.newValue;if(i===t){try{n=JSON.parse(o)}catch(t){console.error("usePersistedState failed to parse",t,o),n=e}l!==n&&d(n)}}),(0,n.useEffect)(function(){return u.current=a(t,d,l),function(){u.current.deregister()}},[e,t]);var f=(0,n.useCallback)(function(r){var n=new Event("local-storage");if(n.key=t,window.dispatchEvent(n),"function"==typeof r)d(function(n){var i=r(n);return null===i&&void 0!==e&&(console.warn("A persisted state with null value will be set to the default value: ".concat(t," is now set to:"),e),i=e),s(t,i),u.current.emit(i),i});else{var i=r;null===i&&void 0!==e&&(console.warn("A persisted state with null value will be set to the default value: ".concat(t," is now set to:"),e),i=e),s(t,i),d(i),u.current.emit(i)}},[l,s,t]);return[l,f]},u=function(e,t){try{return JSON.parse(e)}catch(e){return t}},c=function(e){return{get:function(t,r){var n=e.getItem(t),i="function"==typeof r?r():r;return"null"===n&&void 0===r?null:null===n||"null"===n||void 0===n?i:u(n,i)},set:function(t,r){e.setItem(t,JSON.stringify(r))}}},l=[],d={},f=function(e){return Array.isArray(e)&&0===e.length},h=function(e){return e&&"object"==typeof e&&0===Object.keys(e).length},p=function(){return void 0!==r.g&&r.g.localStorage?r.g.localStorage:"undefined"!=typeof globalThis&&globalThis.localStorage?globalThis.localStorage:window.localStorage?window.localStorage:"undefined"!=typeof localStorage?localStorage:null},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p();if(t){var r=c(t);return function(t){return s(f(t)?l:h(t)?d:t,e,r)}}return n.useState},y=r(33281),g="TM_",b=function(e){return m(g+e)}},33281:function(e,t,r){"use strict";r.d(t,{CQ:function(){return m},cF:function(){return h}});var n=r(50029),i=r(59499),o=r(17674),a=r(64687),s=r.n(a);function u(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 c(e){for(var t=1;tcrypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");r(1841);var I=function(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r},T=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)};let C=function(e){var t=131,r=137,n=0;e+="x";var i=Math.floor(65745979961613.07);for(let o=0;oi&&(n=Math.floor(n/r)),n=n*t+e.charCodeAt(o);return n},O="0123456789abcdef".split(""),R=[-2147483648,8388608,32768,128],j=[24,16,8,0],D=[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],N=[];class L{constructor(e=!1,t=!1){n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),a.set(this,void 0),s.set(this,void 0),u.set(this,void 0),c.set(this,void 0),l.set(this,void 0),d.set(this,void 0),f.set(this,void 0),h.set(this,void 0),p.set(this,void 0),m.set(this,void 0),y.set(this,void 0),g.set(this,void 0),b.set(this,void 0),v.set(this,0),w.set(this,void 0),this.init(e,t)}init(e,t){t?(N[0]=N[16]=N[1]=N[2]=N[3]=N[4]=N[5]=N[6]=N[7]=N[8]=N[9]=N[10]=N[11]=N[12]=N[13]=N[14]=N[15]=0,I(this,i,N)):I(this,i,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),e?(I(this,u,3238371032),I(this,c,914150663),I(this,l,812702999),I(this,d,4144912697),I(this,f,4290775857),I(this,h,1750603025),I(this,p,1694076839),I(this,m,3204075428)):(I(this,u,1779033703),I(this,c,3144134277),I(this,l,1013904242),I(this,d,2773480762),I(this,f,1359893119),I(this,h,2600822924),I(this,p,528734635),I(this,m,1541459225)),I(this,n,I(this,w,I(this,o,I(this,g,0)))),I(this,a,I(this,y,!1)),I(this,s,!0),I(this,b,e)}update(e){let t;if(T(this,a))return this;t=e instanceof ArrayBuffer?new Uint8Array(e):e;let r=0,s=t.length,u=T(this,i);for(;r>2]|=t[r]<>2]|=n<>2]|=(192|n>>6)<=57344?u[e>>2]|=(224|n>>12)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(I(this,n,u[16]),I(this,w,e-64),this.hash(),I(this,y,!0)):I(this,w,e)}return T(this,o)>4294967295&&(I(this,g,T(this,g)+(T(this,o)/4294967296<<0)),I(this,o,T(this,o)%4294967296)),this}finalize(){if(T(this,a))return;I(this,a,!0);let e=T(this,i),t=T(this,v);e[16]=T(this,n),e[t>>2]|=R[3&t],I(this,n,e[16]),t>=56&&(T(this,y)||this.hash(),e[0]=T(this,n),e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=T(this,g)<<3|T(this,o)>>>29,e[15]=T(this,o)<<3,this.hash()}hash(){let e,t,r,n,o,a,y,g,v,w,S=T(this,u),_=T(this,c),A=T(this,l),E=T(this,d),k=T(this,f),M=T(this,h),P=T(this,p),x=T(this,m),C=T(this,i);for(let r=16;r<64;++r)e=((n=C[r-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t=((n=C[r-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,C[r]=C[r-16]+e+C[r-7]+t<<0;w=_&A;for(let i=0;i<64;i+=4)T(this,s)?(T(this,b)?(y=300032,x=(n=C[0]-1413257819)-150054599<<0,E=n+24177077<<0):(y=704751109,x=(n=C[0]-210244248)-1521486534<<0,E=n+143694565<<0),I(this,s,!1)):(e=(S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10),t=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),r=(y=S&_)^S&A^w,n=x+t+(a=k&M^~k&P)+D[i]+C[i],o=e+r,x=E+n<<0,E=n+o<<0),e=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),t=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),r=(g=E&S)^E&_^y,n=P+t+(a=x&k^~x&M)+D[i+1]+C[i+1],o=e+r,P=A+n<<0,e=((A=n+o<<0)>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),t=(P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7),r=(v=A&E)^A&S^g,n=M+t+(a=P&x^~P&k)+D[i+2]+C[i+2],o=e+r,M=_+n<<0,e=((_=n+o<<0)>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),t=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7),r=(w=_&A)^_&E^v,n=k+t+(a=M&P^~M&x)+D[i+3]+C[i+3],o=e+r,k=S+n<<0,S=n+o<<0;I(this,u,T(this,u)+S<<0),I(this,c,T(this,c)+_<<0),I(this,l,T(this,l)+A<<0),I(this,d,T(this,d)+E<<0),I(this,f,T(this,f)+k<<0),I(this,h,T(this,h)+M<<0),I(this,p,T(this,p)+P<<0),I(this,m,T(this,m)+x<<0)}hex(){this.finalize();let e=T(this,u),t=T(this,c),r=T(this,l),n=T(this,d),i=T(this,f),o=T(this,h),a=T(this,p),s=T(this,m),y=O[e>>28&15]+O[e>>24&15]+O[e>>20&15]+O[e>>16&15]+O[e>>12&15]+O[e>>8&15]+O[e>>4&15]+O[15&e]+O[t>>28&15]+O[t>>24&15]+O[t>>20&15]+O[t>>16&15]+O[t>>12&15]+O[t>>8&15]+O[t>>4&15]+O[15&t]+O[r>>28&15]+O[r>>24&15]+O[r>>20&15]+O[r>>16&15]+O[r>>12&15]+O[r>>8&15]+O[r>>4&15]+O[15&r]+O[n>>28&15]+O[n>>24&15]+O[n>>20&15]+O[n>>16&15]+O[n>>12&15]+O[n>>8&15]+O[n>>4&15]+O[15&n]+O[i>>28&15]+O[i>>24&15]+O[i>>20&15]+O[i>>16&15]+O[i>>12&15]+O[i>>8&15]+O[i>>4&15]+O[15&i]+O[o>>28&15]+O[o>>24&15]+O[o>>20&15]+O[o>>16&15]+O[o>>12&15]+O[o>>8&15]+O[o>>4&15]+O[15&o]+O[a>>28&15]+O[a>>24&15]+O[a>>20&15]+O[a>>16&15]+O[a>>12&15]+O[a>>8&15]+O[a>>4&15]+O[15&a];return T(this,b)||(y+=O[s>>28&15]+O[s>>24&15]+O[s>>20&15]+O[s>>16&15]+O[s>>12&15]+O[s>>8&15]+O[s>>4&15]+O[15&s]),y}toString(){return this.hex()}digest(){this.finalize();let e=T(this,u),t=T(this,c),r=T(this,l),n=T(this,d),i=T(this,f),o=T(this,h),a=T(this,p),s=T(this,m),y=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,a>>24&255,a>>16&255,a>>8&255,255&a];return T(this,b)||y.push(s>>24&255,s>>16&255,s>>8&255,255&s),y}array(){return this.digest()}arrayBuffer(){this.finalize();let e=new ArrayBuffer(T(this,b)?28:32),t=new DataView(e);return t.setUint32(0,T(this,u)),t.setUint32(4,T(this,c)),t.setUint32(8,T(this,l)),t.setUint32(12,T(this,d)),t.setUint32(16,T(this,f)),t.setUint32(20,T(this,h)),t.setUint32(24,T(this,p)),T(this,b)||t.setUint32(28,T(this,m)),e}}function U(e){let t=new L;return t.update(e),parseInt(t.hex().substring(0,8),16)}n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap;let B=function(e){var t="#";return e.forEach(function(e){e<16&&(t+=0),t+=e.toString(16)}),t},W=function(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,i=2*r-n;return[(e/=360)+1/3,e,e-1/3].map(function(e){return e<0&&e++,e>1&&e--,Math.round(255*(e=e<1/6?i+(n-i)*6*e:e<.5?n:e<2/3?i+(n-i)*6*(2/3-e):i))})};class F{constructor(e={}){let[t,r]=[e.lightness,e.saturation].map(function(e){return Array.isArray(e=void 0!==e?e:[.35,.5,.65])?e.concat():[e]});this.L=t,this.S=r,"number"==typeof e.hue&&(e.hue={min:e.hue,max:e.hue}),"object"!=typeof e.hue||Array.isArray(e.hue)||(e.hue=[e.hue]),void 0===e.hue&&(e.hue=[]),this.hueRanges=e.hue.map(function(e){return{min:void 0===e.min?0:e.min,max:void 0===e.max?360:e.max}}),this.hash=U,"function"==typeof e.hash&&(this.hash=e.hash),"bkdr"===e.hash&&(this.hash=C)}hsl(e){var t,r,n=this.hash(e),i=727;if(this.hueRanges.length){let e=this.hueRanges[n%this.hueRanges.length];t=n/this.hueRanges.length%i*(e.max-e.min)/i+e.min}else t=n%359;return n=Math.ceil(n/360),r=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[t,r,this.L[n%this.L.length]]}rgb(e){var t=this.hsl(e);return W.apply(this,t)}hex(e){return B(this.rgb(e))}}let H=(e,t,r,n)=>{if("length"===r||"prototype"===r||"arguments"===r||"caller"===r)return;let i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);(K(i,o)||!n)&&Object.defineProperty(e,r,o)},K=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},z=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},q=(e,t)=>`/* Wrapped ${e}*/ +${t}`,G=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Z=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),J=(e,t,r)=>{let n=""===r?"":`with ${r.trim()}() `,i=q.bind(null,n,t.toString());Object.defineProperty(i,"name",Z),Object.defineProperty(e,"toString",{...G,value:i})};function $(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let n of Reflect.ownKeys(t))H(e,t,n,r);return z(e,t),J(e,t,n),e}var V=r(88918);let Y=new WeakMap;function X(e,{cacheKey:t,cache:r=new Map,maxAge:n}={}){"number"==typeof n&&V(r);let i=function(...i){let o=t?t(i):i[0],a=r.get(o);if(a)return a.data;let s=e.apply(this,i);return r.set(o,{data:s,maxAge:n?Date.now()+n:Number.POSITIVE_INFINITY}),s};return $(i,e,{ignoreNonConfigurable:!0}),Y.set(i,r),i}var Q=r(29631),ee=r(79804),et=r(57632),er=r(42238),en=r.n(er);r(79544);var ei=r(33281),eo=!0;eo=!1;var ea=r(68919),es=r(31955),eu={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"halbe Minute",withPreposition:"halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},ec=function(e,t,r){var n,i=null!=r&&r.addSuffix?eu[e].withPreposition:eu[e].standalone;return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"in "+n:"vor "+n:n},el=r(38683),ed={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},ef={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},eh={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},ep={date:(0,el.Z)({formats:ed,defaultWidth:"full"}),time:(0,el.Z)({formats:ef,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:eh,defaultWidth:"full"})},em={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},ey=function(e,t,r,n){return em[e]},eg=r(16252),eb={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},ev={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},ew={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","M\xe4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},eS={narrow:ew.narrow,abbreviated:["Jan.","Feb.","M\xe4rz","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:ew.wide},e_={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eA={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},eE={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},ek={ordinalNumber:function(e){return Number(e)+"."},era:(0,eg.Z)({values:eb,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:ev,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:ew,formattingValues:eS,defaultWidth:"wide"}),day:(0,eg.Z)({values:e_,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:eA,defaultWidth:"wide",formattingValues:eE,defaultFormattingWidth:"wide"})},eM=r(45826),eP=r(181),ex=/^(\d+)(\.)?/i,eI=/\d+/i,eT={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},eC={any:[/^v/i,/^n/i]},eO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},eR={any:[/1/i,/2/i,/3/i,/4/i]},ej={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},eD={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},eN={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},eL={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},eU={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},eB={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},eW={code:"de",formatDistance:ec,formatLong:ep,formatRelative:ey,localize:ek,match:{ordinalNumber:(0,eP.Z)({matchPattern:ex,parsePattern:eI,valueCallback:function(e){return parseInt(e)}}),era:(0,eM.Z)({matchPatterns:eT,defaultMatchWidth:"wide",parsePatterns:eC,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:eO,defaultMatchWidth:"wide",parsePatterns:eR,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:ej,defaultMatchWidth:"wide",parsePatterns:eD,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:eN,defaultMatchWidth:"wide",parsePatterns:eL,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:eU,defaultMatchWidth:"wide",parsePatterns:eB,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},eF={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},eH=function(e,t,r){var n,i=eF[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?n+"内":n+"前":n},eK={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},ez={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},eq={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},eG={date:(0,el.Z)({formats:eK,defaultWidth:"full"}),time:(0,el.Z)({formats:ez,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:eq,defaultWidth:"full"})},eZ=r(30062),eJ=r(61545);function e$(e,t,r){(0,eZ.Z)(2,arguments);var n=(0,eJ.Z)(e,r),i=(0,eJ.Z)(t,r);return n.getTime()===i.getTime()}function eV(e,t,r){var n="eeee p";return e$(e,t,r)?n:e.getTime()>t.getTime()?"'下个'"+n:"'上个'"+n}var eY={lastWeek:eV,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:eV,other:"PP p"},eX=function(e,t,r,n){var i=eY[e];return"function"==typeof i?i(t,r,n):i},eQ={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},e0={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},e1={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},e2={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},e4={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},e6={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},e3={ordinalNumber:function(e,t){var r=Number(e);switch(null==t?void 0:t.unit){case"date":return r.toString()+"日";case"hour":return r.toString()+"时";case"minute":return r.toString()+"分";case"second":return r.toString()+"秒";default:return"第 "+r.toString()}},era:(0,eg.Z)({values:eQ,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:e0,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:e1,defaultWidth:"wide"}),day:(0,eg.Z)({values:e2,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:e4,defaultWidth:"wide",formattingValues:e6,defaultFormattingWidth:"wide"})},e8=/^(第\s*)?\d+(日|时|分|秒)?/i,e5=/\d+/i,e7={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},e9={any:[/^(前)/i,/^(公元)/i]},te={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},tt={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},tr={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},tn={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},ti={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},to={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},ta={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},ts={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},tu={code:"zh-CN",formatDistance:eH,formatLong:eG,formatRelative:eX,localize:e3,match:{ordinalNumber:(0,eP.Z)({matchPattern:e8,parsePattern:e5,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:e7,defaultMatchWidth:"wide",parsePatterns:e9,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:tr,defaultMatchWidth:"wide",parsePatterns:tn,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:ti,defaultMatchWidth:"wide",parsePatterns:to,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:ta,defaultMatchWidth:"any",parsePatterns:ts,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},tc={lessThanXSeconds:{one:"dưới 1 gi\xe2y",other:"dưới {{count}} gi\xe2y"},xSeconds:{one:"1 gi\xe2y",other:"{{count}} gi\xe2y"},halfAMinute:"nửa ph\xfat",lessThanXMinutes:{one:"dưới 1 ph\xfat",other:"dưới {{count}} ph\xfat"},xMinutes:{one:"1 ph\xfat",other:"{{count}} ph\xfat"},aboutXHours:{one:"khoảng 1 giờ",other:"khoảng {{count}} giờ"},xHours:{one:"1 giờ",other:"{{count}} giờ"},xDays:{one:"1 ng\xe0y",other:"{{count}} ng\xe0y"},aboutXWeeks:{one:"khoảng 1 tuần",other:"khoảng {{count}} tuần"},xWeeks:{one:"1 tuần",other:"{{count}} tuần"},aboutXMonths:{one:"khoảng 1 th\xe1ng",other:"khoảng {{count}} th\xe1ng"},xMonths:{one:"1 th\xe1ng",other:"{{count}} th\xe1ng"},aboutXYears:{one:"khoảng 1 năm",other:"khoảng {{count}} năm"},xYears:{one:"1 năm",other:"{{count}} năm"},overXYears:{one:"hơn 1 năm",other:"hơn {{count}} năm"},almostXYears:{one:"gần 1 năm",other:"gần {{count}} năm"}},tl=function(e,t,r){var n,i=tc[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?n+" nữa":n+" trước":n},td={full:"EEEE, 'ng\xe0y' d MMMM 'năm' y",long:"'ng\xe0y' d MMMM 'năm' y",medium:"d MMM 'năm' y",short:"dd/MM/y"},tf={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},th={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},tp={date:(0,el.Z)({formats:td,defaultWidth:"full"}),time:(0,el.Z)({formats:tf,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:th,defaultWidth:"full"})},tm={lastWeek:"eeee 'tuần trước v\xe0o l\xfac' p",yesterday:"'h\xf4m qua v\xe0o l\xfac' p",today:"'h\xf4m nay v\xe0o l\xfac' p",tomorrow:"'ng\xe0y mai v\xe0o l\xfac' p",nextWeek:"eeee 'tới v\xe0o l\xfac' p",other:"P"},ty=function(e,t,r,n){return tm[e]},tg={narrow:["TCN","SCN"],abbreviated:["trước CN","sau CN"],wide:["trước C\xf4ng Nguy\xean","sau C\xf4ng Nguy\xean"]},tb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["Qu\xfd 1","Qu\xfd 2","Qu\xfd 3","Qu\xfd 4"]},tv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["qu\xfd I","qu\xfd II","qu\xfd III","qu\xfd IV"]},tw={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12"],wide:["Th\xe1ng Một","Th\xe1ng Hai","Th\xe1ng Ba","Th\xe1ng Tư","Th\xe1ng Năm","Th\xe1ng S\xe1u","Th\xe1ng Bảy","Th\xe1ng T\xe1m","Th\xe1ng Ch\xedn","Th\xe1ng Mười","Th\xe1ng Mười Một","Th\xe1ng Mười Hai"]},tS={narrow:["01","02","03","04","05","06","07","08","09","10","11","12"],abbreviated:["thg 1","thg 2","thg 3","thg 4","thg 5","thg 6","thg 7","thg 8","thg 9","thg 10","thg 11","thg 12"],wide:["th\xe1ng 01","th\xe1ng 02","th\xe1ng 03","th\xe1ng 04","th\xe1ng 05","th\xe1ng 06","th\xe1ng 07","th\xe1ng 08","th\xe1ng 09","th\xe1ng 10","th\xe1ng 11","th\xe1ng 12"]},t_={narrow:["CN","T2","T3","T4","T5","T6","T7"],short:["CN","Th 2","Th 3","Th 4","Th 5","Th 6","Th 7"],abbreviated:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],wide:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"]},tA={narrow:{am:"am",pm:"pm",midnight:"nửa đ\xeam",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đ\xeam"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đ\xeam",noon:"trưa",morning:"s\xe1ng",afternoon:"chiều",evening:"tối",night:"đ\xeam"},wide:{am:"SA",pm:"CH",midnight:"nửa đ\xeam",noon:"trưa",morning:"s\xe1ng",afternoon:"chiều",evening:"tối",night:"đ\xeam"}},tE={narrow:{am:"am",pm:"pm",midnight:"nửa đ\xeam",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đ\xeam"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đ\xeam",noon:"trưa",morning:"s\xe1ng",afternoon:"chiều",evening:"tối",night:"đ\xeam"},wide:{am:"SA",pm:"CH",midnight:"nửa đ\xeam",noon:"giữa trưa",morning:"v\xe0o buổi s\xe1ng",afternoon:"v\xe0o buổi chiều",evening:"v\xe0o buổi tối",night:"v\xe0o ban đ\xeam"}},tk={ordinalNumber:function(e,t){var r=Number(e),n=null==t?void 0:t.unit;if("quarter"===n)switch(r){case 1:return"I";case 2:return"II";case 3:return"III";case 4:return"IV"}else if("day"===n)switch(r){case 1:return"thứ 2";case 2:return"thứ 3";case 3:return"thứ 4";case 4:return"thứ 5";case 5:return"thứ 6";case 6:return"thứ 7";case 7:return"chủ nhật"}else if("week"===n)return 1===r?"thứ nhất":"thứ "+r;else if("dayOfYear"===n)return 1===r?"đầu ti\xean":"thứ "+r;return String(r)},era:(0,eg.Z)({values:tg,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:tb,defaultWidth:"wide",formattingValues:tv,defaultFormattingWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:tw,defaultWidth:"wide",formattingValues:tS,defaultFormattingWidth:"wide"}),day:(0,eg.Z)({values:t_,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:tA,defaultWidth:"wide",formattingValues:tE,defaultFormattingWidth:"wide"})},tM=/^(\d+)/i,tP=/\d+/i,tx={narrow:/^(tcn|scn)/i,abbreviated:/^(trước CN|sau CN)/i,wide:/^(trước Công Nguyên|sau Công Nguyên)/i},tI={any:[/^t/i,/^s/i]},tT={narrow:/^([1234]|i{1,3}v?)/i,abbreviated:/^q([1234]|i{1,3}v?)/i,wide:/^quý ([1234]|i{1,3}v?)/i},tC={any:[/(1|i)$/i,/(2|ii)$/i,/(3|iii)$/i,/(4|iv)$/i]},tO={narrow:/^(0?[2-9]|10|11|12|0?1)/i,abbreviated:/^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,wide:/^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i},tR={narrow:[/0?1$/i,/0?2/i,/3/,/4/,/5/,/6/,/7/,/8/,/9/,/10/,/11/,/12/],abbreviated:[/^thg[ _]?0?1(?!\d)/i,/^thg[ _]?0?2/i,/^thg[ _]?0?3/i,/^thg[ _]?0?4/i,/^thg[ _]?0?5/i,/^thg[ _]?0?6/i,/^thg[ _]?0?7/i,/^thg[ _]?0?8/i,/^thg[ _]?0?9/i,/^thg[ _]?10/i,/^thg[ _]?11/i,/^thg[ _]?12/i],wide:[/^tháng ?(Một|0?1(?!\d))/i,/^tháng ?(Hai|0?2)/i,/^tháng ?(Ba|0?3)/i,/^tháng ?(Tư|0?4)/i,/^tháng ?(Năm|0?5)/i,/^tháng ?(Sáu|0?6)/i,/^tháng ?(Bảy|0?7)/i,/^tháng ?(Tám|0?8)/i,/^tháng ?(Chín|0?9)/i,/^tháng ?(Mười|10)/i,/^tháng ?(Mười ?Một|11)/i,/^tháng ?(Mười ?Hai|12)/i]},tj={narrow:/^(CN|T2|T3|T4|T5|T6|T7)/i,short:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,abbreviated:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,wide:/^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i},tD={narrow:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],short:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],abbreviated:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],wide:[/(Chủ|Chúa) ?Nhật/i,/Hai/i,/Ba/i,/Tư/i,/Năm/i,/Sáu/i,/Bảy/i]},tN={narrow:/^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,abbreviated:/^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,wide:/^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i},tL={any:{am:/^(a|sa)/i,pm:/^(p|ch[^i]*)/i,midnight:/nửa đêm/i,noon:/trưa/i,morning:/sáng/i,afternoon:/chiều/i,evening:/tối/i,night:/^đêm/i}},tU={code:"vi",formatDistance:tl,formatLong:tp,formatRelative:ty,localize:tk,match:{ordinalNumber:(0,eP.Z)({matchPattern:tM,parsePattern:tP,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:tx,defaultMatchWidth:"wide",parsePatterns:tI,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:tT,defaultMatchWidth:"wide",parsePatterns:tC,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:tO,defaultMatchWidth:"wide",parsePatterns:tR,defaultParseWidth:"wide"}),day:(0,eM.Z)({matchPatterns:tj,defaultMatchWidth:"wide",parsePatterns:tD,defaultParseWidth:"wide"}),dayPeriod:(0,eM.Z)({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:tL,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},tB={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},tW=function(e,t,r){var n,i=tB[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"σε "+n:n+" πριν":n},tF={full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},tH={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tK={full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tz={date:(0,el.Z)({formats:tF,defaultWidth:"full"}),time:(0,el.Z)({formats:tH,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:tK,defaultWidth:"full"})},tq={lastWeek:function(e){return 6===e.getUTCDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p"},yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},tG=function(e,t){var r=tq[e];return"function"==typeof r?r(t):r},tZ={narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},tJ={narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},t$={narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},tV={narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},tY={narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},tX={narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},tQ={ordinalNumber:function(e,t){var r,n=Number(e),i=null==t?void 0:t.unit;return n+(r="year"===i||"month"===i?"ος":"week"===i||"dayOfYear"===i||"day"===i||"hour"===i||"date"===i?"η":"ο")},era:(0,eg.Z)({values:tZ,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:tJ,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:t$,defaultWidth:"wide",formattingValues:tV,defaultFormattingWidth:"wide"}),day:(0,eg.Z)({values:tY,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:tX,defaultWidth:"wide"})},t0=/^(\d+)(ος|η|ο)?/i,t1=/\d+/i,t2={narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},t4={any:[/^π/i,/^(μ|κ)/i]},t6={narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},t3={any:[/1/i,/2/i,/3/i,/4/i]},t8={narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},t5={narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},t7={narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},t9={narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},re={narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},rt={any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(��|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},rr={code:"el",formatDistance:tW,formatLong:tz,formatRelative:tG,localize:tQ,match:{ordinalNumber:(0,eP.Z)({matchPattern:t0,parsePattern:t1,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:t2,defaultMatchWidth:"wide",parsePatterns:t4,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:t6,defaultMatchWidth:"wide",parsePatterns:t3,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:t8,defaultMatchWidth:"wide",parsePatterns:t5,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:t7,defaultMatchWidth:"wide",parsePatterns:t9,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:re,defaultMatchWidth:"any",parsePatterns:rt,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},rn={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},ri=function(e,t,r){var n,i=rn[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"dans "+n:"il y a "+n:n},ro={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ra={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},rs={full:"{{date}} '\xe0' {{time}}",long:"{{date}} '\xe0' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ru={date:(0,el.Z)({formats:ro,defaultWidth:"full"}),time:(0,el.Z)({formats:ra,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:rs,defaultWidth:"full"})},rc={lastWeek:"eeee 'dernier \xe0' p",yesterday:"'hier \xe0' p",today:"'aujourd’hui \xe0' p",tomorrow:"'demain \xe0' p'",nextWeek:"eeee 'prochain \xe0' p",other:"P"},rl=function(e,t,r,n){return rc[e]},rd={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant J\xe9sus-Christ","apr\xe8s J\xe9sus-Christ"]},rf={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2\xe8me trim.","3\xe8me trim.","4\xe8me trim."],wide:["1er trimestre","2\xe8me trimestre","3\xe8me trimestre","4\xe8me trimestre"]},rh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","f\xe9vr.","mars","avr.","mai","juin","juil.","ao\xfbt","sept.","oct.","nov.","d\xe9c."],wide:["janvier","f\xe9vrier","mars","avril","mai","juin","juillet","ao\xfbt","septembre","octobre","novembre","d\xe9cembre"]},rp={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},rm={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"apr\xe8s-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’apr\xe8s-midi",evening:"du soir",night:"du matin"}},ry={ordinalNumber:function(e,t){var r,n=Number(e),i=null==t?void 0:t.unit;if(0===n)return"0";var o=["year","week","hour","minute","second"];return r=1===n?i&&o.includes(i)?"\xe8re":"er":"\xe8me",n+r},era:(0,eg.Z)({values:rd,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:rf,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:rh,defaultWidth:"wide"}),day:(0,eg.Z)({values:rp,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:rm,defaultWidth:"wide"})},rg=/^(\d+)(ième|ère|ème|er|e)?/i,rb=/\d+/i,rv={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},rw={any:[/^av/i,/^ap/i]},rS={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},r_={any:[/1/i,/2/i,/3/i,/4/i]},rA={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},rE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},rk={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},rM={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},rP={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},rx={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},rI={code:"fr",formatDistance:ri,formatLong:ru,formatRelative:rl,localize:ry,match:{ordinalNumber:(0,eP.Z)({matchPattern:rg,parsePattern:rb,valueCallback:function(e){return parseInt(e)}}),era:(0,eM.Z)({matchPatterns:rv,defaultMatchWidth:"wide",parsePatterns:rw,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:rS,defaultMatchWidth:"wide",parsePatterns:r_,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:rA,defaultMatchWidth:"wide",parsePatterns:rE,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:rk,defaultMatchWidth:"wide",parsePatterns:rM,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:rP,defaultMatchWidth:"any",parsePatterns:rx,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},rT={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"pi\xf9 di un anno",other:"pi\xf9 di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},rC=function(e,t,r){var n,i=rT[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"tra "+n:n+" fa":n},rO={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},rR={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},rj={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},rD={date:(0,el.Z)({formats:rO,defaultWidth:"full"}),time:(0,el.Z)({formats:rR,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:rj,defaultWidth:"full"})},rN=["domenica","luned\xec","marted\xec","mercoled\xec","gioved\xec","venerd\xec","sabato"];function rL(e){return 0===e?"'domenica scorsa alle' p":"'"+rN[e]+" scorso alle' p"}function rU(e){return"'"+rN[e]+" alle' p"}function rB(e){return 0===e?"'domenica prossima alle' p":"'"+rN[e]+" prossimo alle' p"}var rW={lastWeek:function(e,t,r){var n=e.getUTCDay();return e$(e,t,r)?rU(n):rL(n)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:function(e,t,r){var n=e.getUTCDay();return e$(e,t,r)?rU(n):rB(n)},other:"P"},rF=function(e,t,r,n){var i=rW[e];return"function"==typeof i?i(t,r,n):i},rH={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},rK={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1\xba trimestre","2\xba trimestre","3\xba trimestre","4\xba trimestre"]},rz={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},rq={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","luned\xec","marted\xec","mercoled\xec","gioved\xec","venerd\xec","sabato"]},rG={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},rZ={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},rJ={ordinalNumber:function(e,t){return String(Number(e))},era:(0,eg.Z)({values:rH,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:rK,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:rz,defaultWidth:"wide"}),day:(0,eg.Z)({values:rq,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:rG,defaultWidth:"wide",formattingValues:rZ,defaultFormattingWidth:"wide"})},r$=/^(\d+)(º)?/i,rV=/\d+/i,rY={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},rX={any:[/^a/i,/^(d|e)/i]},rQ={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},r0={any:[/1/i,/2/i,/3/i,/4/i]},r1={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},r2={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},r4={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},r6={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},r3={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},r8={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},r5={code:"it",formatDistance:rC,formatLong:rD,formatRelative:rF,localize:rJ,match:{ordinalNumber:(0,eP.Z)({matchPattern:r$,parsePattern:rV,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:rY,defaultMatchWidth:"wide",parsePatterns:rX,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:rQ,defaultMatchWidth:"wide",parsePatterns:r0,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:r1,defaultMatchWidth:"wide",parsePatterns:r2,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:r4,defaultMatchWidth:"wide",parsePatterns:r6,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:r3,defaultMatchWidth:"any",parsePatterns:r8,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function r7(e,t){if(void 0!==e.one&&1===t)return e.one;var r=t%10,n=t%100;return 1===r&&11!==n?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function r9(e){return function(t,r){return null!=r&&r.addSuffix?r.comparison&&r.comparison>0?e.future?r7(e.future,t):"через "+r7(e.regular,t):e.past?r7(e.past,t):r7(e.regular,t)+" назад":r7(e.regular,t)}}var ne={lessThanXSeconds:r9({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:r9({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:function(e,t){return null!=t&&t.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты"},lessThanXMinutes:r9({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:r9({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:r9({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:r9({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:r9({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:r9({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:r9({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:r9({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:r9({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:r9({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:r9({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:r9({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:r9({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},nt=function(e,t,r){return ne[e](t,r)},nr={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},nn={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},ni={any:"{{date}}, {{time}}"},no={date:(0,el.Z)({formats:nr,defaultWidth:"full"}),time:(0,el.Z)({formats:nn,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:ni,defaultWidth:"any"})},na=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ns(e){var t=na[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}function nu(e){var t=na[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}function nc(e){var t=na[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}var nl={lastWeek:function(e,t,r){var n=e.getUTCDay();return e$(e,t,r)?nu(n):ns(n)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:function(e,t,r){var n=e.getUTCDay();return e$(e,t,r)?nu(n):nc(n)},other:"P"},nd=function(e,t,r,n){var i=nl[e];return"function"==typeof i?i(t,r,n):i},nf={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},nh={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},np={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","��арт","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},nm={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},ny={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},ng={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},nb={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},nv={ordinalNumber:function(e,t){var r,n=Number(e),i=null==t?void 0:t.unit;return n+(r="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й")},era:(0,eg.Z)({values:nf,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:nh,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:np,defaultWidth:"wide",formattingValues:nm,defaultFormattingWidth:"wide"}),day:(0,eg.Z)({values:ny,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:ng,defaultWidth:"any",formattingValues:nb,defaultFormattingWidth:"wide"})},nw=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,nS=/\d+/i,n_={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},nA={any:[/^д/i,/^н/i]},nE={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},nk={any:[/1/i,/2/i,/3/i,/4/i]},nM={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},nP={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},nx={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},nI={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},nT={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},nC={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},nO={code:"ru",formatDistance:nt,formatLong:no,formatRelative:nd,localize:nv,match:{ordinalNumber:(0,eP.Z)({matchPattern:nw,parsePattern:nS,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:n_,defaultMatchWidth:"wide",parsePatterns:nA,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:nE,defaultMatchWidth:"wide",parsePatterns:nk,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:nM,defaultMatchWidth:"wide",parsePatterns:nP,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:nx,defaultMatchWidth:"wide",parsePatterns:nI,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:nT,defaultMatchWidth:"wide",parsePatterns:nC,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function nR(e,t){if(void 0!==e.one&&1===t)return e.one;var r=t%10,n=t%100;return 1===r&&11!==n?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function nj(e){return function(t,r){return r&&r.addSuffix?r.comparison&&r.comparison>0?e.future?nR(e.future,t):"за "+nR(e.regular,t):e.past?nR(e.past,t):nR(e.regular,t)+" тому":nR(e.regular,t)}}var nD=function(e,t){return t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини"},nN={lessThanXSeconds:nj({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:nj({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:nD,lessThanXMinutes:nj({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:nj({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:nj({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:nj({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:nj({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:nj({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:nj({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:nj({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:nj({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:nj({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:nj({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:nj({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:nj({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},nL=function(e,t,r){return r=r||{},nN[e](t,r)},nU={full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},nB={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},nW={full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nF={date:(0,el.Z)({formats:nU,defaultWidth:"full"}),time:(0,el.Z)({formats:nB,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:nW,defaultWidth:"full"})},nH=r(31396),nK=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function nz(e){var t=nK[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}function nq(e){return"'у "+nK[e]+" о' p"}function nG(e){var t=nK[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}var nZ={lastWeek:function(e,t,r){var n=(0,nH.Z)(e),i=n.getUTCDay();return e$(n,t,r)?nq(i):nz(i)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:function(e,t,r){var n=(0,nH.Z)(e),i=n.getUTCDay();return e$(n,t,r)?nq(i):nG(i)},other:"P"},nJ=function(e,t,r,n){var i=nZ[e];return"function"==typeof i?i(t,r,n):i},n$={narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},nV={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},nY={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},nX={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},nQ={narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},n0={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},n1={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},n2={ordinalNumber:function(e,t){var r,n=String(null==t?void 0:t.unit),i=Number(e);return r="date"===n?3===i||23===i?"-є":"-е":"minute"===n||"second"===n||"hour"===n?"-а":"-й",i+r},era:(0,eg.Z)({values:n$,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:nV,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:nY,defaultWidth:"wide",formattingValues:nX,defaultFormattingWidth:"wide"}),day:(0,eg.Z)({values:nQ,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:n0,defaultWidth:"any",formattingValues:n1,defaultFormattingWidth:"wide"})},n4=/^(\d+)(-?(е|й|є|а|я))?/i,n6=/\d+/i,n3={narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},n8={any:[/^д/i,/^н/i]},n5={narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},n7={any:[/1/i,/2/i,/3/i,/4/i]},n9={narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},ie={narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},it={narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},ir={narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},ii={narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},io={any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},ia={code:"uk",formatDistance:nL,formatLong:nF,formatRelative:nJ,localize:n2,match:{ordinalNumber:(0,eP.Z)({matchPattern:n4,parsePattern:n6,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:n3,defaultMatchWidth:"wide",parsePatterns:n8,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:n5,defaultMatchWidth:"wide",parsePatterns:n7,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:n9,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:it,defaultMatchWidth:"wide",parsePatterns:ir,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:ii,defaultMatchWidth:"wide",parsePatterns:io,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},is={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 d\xeda",other:"{{count}} d\xedas"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 a\xf1o",other:"alrededor de {{count}} a\xf1os"},xYears:{one:"1 a\xf1o",other:"{{count}} a\xf1os"},overXYears:{one:"m\xe1s de 1 a\xf1o",other:"m\xe1s de {{count}} a\xf1os"},almostXYears:{one:"casi 1 a\xf1o",other:"casi {{count}} a\xf1os"}},iu=function(e,t,r){var n,i=is[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},ic={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},il={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},id={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ih={date:(0,el.Z)({formats:ic,defaultWidth:"full"}),time:(0,el.Z)({formats:il,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:id,defaultWidth:"full"})},ip={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'ma\xf1ana a la' p",nextWeek:"eeee 'a la' p",other:"P"},im={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'ma\xf1ana a las' p",nextWeek:"eeee 'a las' p",other:"P"},iy=function(e,t,r,n){return 1!==t.getUTCHours()?im[e]:ip[e]},ig={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despu\xe9s de cristo"]},ib={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1\xba trimestre","2\xba trimestre","3\xba trimestre","4\xba trimestre"]},iv={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},iw={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","s\xe1"],abbreviated:["dom","lun","mar","mi\xe9","jue","vie","s\xe1b"],wide:["domingo","lunes","martes","mi\xe9rcoles","jueves","viernes","s\xe1bado"]},iS={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"}},i_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},iA={ordinalNumber:function(e,t){return Number(e)+"\xba"},era:(0,eg.Z)({values:ig,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:ib,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:(0,eg.Z)({values:iv,defaultWidth:"wide"}),day:(0,eg.Z)({values:iw,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:iS,defaultWidth:"wide",formattingValues:i_,defaultFormattingWidth:"wide"})},iE=/^(\d+)(º)?/i,ik=/\d+/i,iM={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},iP={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},ix={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},iI={any:[/1/i,/2/i,/3/i,/4/i]},iT={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},iC={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},iO={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},iR={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},ij={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},iD={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},iN={code:"es",formatDistance:iu,formatLong:ih,formatRelative:iy,localize:iA,match:{ordinalNumber:(0,eP.Z)({matchPattern:iE,parsePattern:ik,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:iM,defaultMatchWidth:"wide",parsePatterns:iP,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:ix,defaultMatchWidth:"wide",parsePatterns:iI,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:iT,defaultMatchWidth:"wide",parsePatterns:iC,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:iO,defaultMatchWidth:"wide",parsePatterns:iR,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:ij,defaultMatchWidth:"any",parsePatterns:iD,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},iL={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 m\xeas",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 m\xeas",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},iU=function(e,t,r){var n,i=iL[e];return(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"daqui a "+n:"h\xe1 "+n:n},iB={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},iW={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},iF={full:"{{date}} '\xe0s' {{time}}",long:"{{date}} '\xe0s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iH={date:(0,el.Z)({formats:iB,defaultWidth:"full"}),time:(0,el.Z)({formats:iW,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:iF,defaultWidth:"full"})},iK={lastWeek:function(e){var t=e.getUTCDay();return"'"+(0===t||6===t?"\xfaltimo":"\xfaltima")+"' eeee '\xe0s' p"},yesterday:"'ontem \xe0s' p",today:"'hoje \xe0s' p",tomorrow:"'amanh\xe3 \xe0s' p",nextWeek:"eeee '\xe0s' p",other:"P"},iz=function(e,t,r,n){var i=iK[e];return"function"==typeof i?i(t):i},iq={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},iG={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1\xba trimestre","2\xba trimestre","3\xba trimestre","4\xba trimestre"]},iZ={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","mar\xe7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},iJ={narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","s\xe1b"],abbreviated:["dom","seg","ter","qua","qui","sex","s\xe1b"],wide:["domingo","segunda-feira","ter\xe7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xe1bado"]},i$={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manh\xe3",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manh\xe3",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manh\xe3",afternoon:"tarde",evening:"noite",night:"madrugada"}},iV={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manh\xe3",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manh\xe3",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manh\xe3",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},iY={ordinalNumber:function(e,t){return Number(e)+"\xba"},era:(0,eg.Z)({values:iq,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:iG,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:iZ,defaultWidth:"wide"}),day:(0,eg.Z)({values:iJ,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:i$,defaultWidth:"wide",formattingValues:iV,defaultFormattingWidth:"wide"})},iX=/^(\d+)(º|ª)?/i,iQ=/\d+/i,i0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},i1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},i2={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},i4={any:[/1/i,/2/i,/3/i,/4/i]},i6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},i3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},i8={narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},i5={narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},i7={narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},i9={any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},oe={code:"pt",formatDistance:iU,formatLong:iH,formatRelative:iz,localize:iY,match:{ordinalNumber:(0,eP.Z)({matchPattern:iX,parsePattern:iQ,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:i0,defaultMatchWidth:"wide",parsePatterns:i1,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:i2,defaultMatchWidth:"wide",parsePatterns:i4,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:i6,defaultMatchWidth:"wide",parsePatterns:i3,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:i8,defaultMatchWidth:"wide",parsePatterns:i5,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:i7,defaultMatchWidth:"any",parsePatterns:i9,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ot={lessThanXSeconds:{standalone:{one:"manner w\xe9i eng Sekonn",other:"manner w\xe9i {{count}} Sekonnen"},withPreposition:{one:"manner w\xe9i enger Sekonn",other:"manner w\xe9i {{count}} Sekonnen"}},xSeconds:{standalone:{one:"eng Sekonn",other:"{{count}} Sekonnen"},withPreposition:{one:"enger Sekonn",other:"{{count}} Sekonnen"}},halfAMinute:{standalone:"eng hallef Minutt",withPreposition:"enger hallwer Minutt"},lessThanXMinutes:{standalone:{one:"manner w\xe9i eng Minutt",other:"manner w\xe9i {{count}} Minutten"},withPreposition:{one:"manner w\xe9i enger Minutt",other:"manner w\xe9i {{count}} Minutten"}},xMinutes:{standalone:{one:"eng Minutt",other:"{{count}} Minutten"},withPreposition:{one:"enger Minutt",other:"{{count}} Minutten"}},aboutXHours:{standalone:{one:"ongef\xe9ier eng Stonn",other:"ongef\xe9ier {{count}} Stonnen"},withPreposition:{one:"ongef\xe9ier enger Stonn",other:"ongef\xe9ier {{count}} Stonnen"}},xHours:{standalone:{one:"eng Stonn",other:"{{count}} Stonnen"},withPreposition:{one:"enger Stonn",other:"{{count}} Stonnen"}},xDays:{standalone:{one:"een Dag",other:"{{count}} Deeg"},withPreposition:{one:"engem Dag",other:"{{count}} Deeg"}},aboutXWeeks:{standalone:{one:"ongef\xe9ier eng Woch",other:"ongef\xe9ier {{count}} Wochen"},withPreposition:{one:"ongef\xe9ier enger Woche",other:"ongef\xe9ier {{count}} Wochen"}},xWeeks:{standalone:{one:"eng Woch",other:"{{count}} Wochen"},withPreposition:{one:"enger Woch",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"ongef\xe9ier ee Mount",other:"ongef\xe9ier {{count}} M\xe9int"},withPreposition:{one:"ongef\xe9ier engem Mount",other:"ongef\xe9ier {{count}} M\xe9int"}},xMonths:{standalone:{one:"ee Mount",other:"{{count}} M\xe9int"},withPreposition:{one:"engem Mount",other:"{{count}} M\xe9int"}},aboutXYears:{standalone:{one:"ongef\xe9ier ee Joer",other:"ongef\xe9ier {{count}} Joer"},withPreposition:{one:"ongef\xe9ier engem Joer",other:"ongef\xe9ier {{count}} Joer"}},xYears:{standalone:{one:"ee Joer",other:"{{count}} Joer"},withPreposition:{one:"engem Joer",other:"{{count}} Joer"}},overXYears:{standalone:{one:"m\xe9i w\xe9i ee Joer",other:"m\xe9i w\xe9i {{count}} Joer"},withPreposition:{one:"m\xe9i w\xe9i engem Joer",other:"m\xe9i w\xe9i {{count}} Joer"}},almostXYears:{standalone:{one:"bal ee Joer",other:"bal {{count}} Joer"},withPreposition:{one:"bal engem Joer",other:"bal {{count}} Joer"}}},or=["d","h","n","t","z"],on=["a,","e","i","o","u"],oi=[0,1,2,3,8,9],oo=[40,50,60,70];function oa(e){var t=e.charAt(0).toLowerCase();if(-1!=on.indexOf(t)||-1!=or.indexOf(t))return!0;var r=e.split(" ")[0],n=parseInt(r);return!isNaN(n)&&-1!=oi.indexOf(n%10)&&-1==oo.indexOf(parseInt(r.substring(0,2)))}var os=function(e,t,r){var n,i=ot[e],o=null!=r&&r.addSuffix?i.withPreposition:i.standalone;return(n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",String(t)),null!=r&&r.addSuffix)?r.comparison&&r.comparison>0?"a"+(oa(n)?"n":"")+" "+n:"viru"+(oa(n)?"n":"")+" "+n:n},ou={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.yy"},oc={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ol={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},od={date:(0,el.Z)({formats:ou,defaultWidth:"full"}),time:(0,el.Z)({formats:oc,defaultWidth:"full"}),dateTime:(0,el.Z)({formats:ol,defaultWidth:"full"})},of={lastWeek:function(e){var t=e.getUTCDay(),r="'l\xe4schte";return(2===t||4===t)&&(r+="n"),r+="' eeee 'um' p"},yesterday:"'g\xebschter um' p",today:"'haut um' p",tomorrow:"'moien um' p",nextWeek:"eeee 'um' p",other:"P"},oh=function(e,t,r,n){var i=of[e];return"function"==typeof i?i(t):i},op={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["viru Christus","no Christus"]},om={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},oy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","M\xe4e","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","M\xe4erz","Abr\xebll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"]},og={narrow:["S","M","D","M","D","F","S"],short:["So","M\xe9","D\xeb","M\xeb","Do","Fr","Sa"],abbreviated:["So.","M\xe9.","D\xeb.","M\xeb.","Do.","Fr.","Sa."],wide:["Sonndeg","M\xe9indeg","D\xebnschdeg","M\xebttwoch","Donneschdeg","Freideg","Samschdeg"]},ob={narrow:{am:"mo.",pm:"nom\xeb.",midnight:"M\xebtternuecht",noon:"M\xebtteg",morning:"Moien",afternoon:"Nom\xebtteg",evening:"Owend",night:"Nuecht"},abbreviated:{am:"moies",pm:"nom\xebttes",midnight:"M\xebtternuecht",noon:"M\xebtteg",morning:"Moien",afternoon:"Nom\xebtteg",evening:"Owend",night:"Nuecht"},wide:{am:"moies",pm:"nom\xebttes",midnight:"M\xebtternuecht",noon:"M\xebtteg",morning:"Moien",afternoon:"Nom\xebtteg",evening:"Owend",night:"Nuecht"}},ov={narrow:{am:"mo.",pm:"nom.",midnight:"M\xebtternuecht",noon:"m\xebttes",morning:"moies",afternoon:"nom\xebttes",evening:"owes",night:"nuets"},abbreviated:{am:"moies",pm:"nom\xebttes",midnight:"M\xebtternuecht",noon:"m\xebttes",morning:"moies",afternoon:"nom\xebttes",evening:"owes",night:"nuets"},wide:{am:"moies",pm:"nom\xebttes",midnight:"M\xebtternuecht",noon:"m\xebttes",morning:"moies",afternoon:"nom\xebttes",evening:"owes",night:"nuets"}},ow={ordinalNumber:function(e,t){return Number(e)+"."},era:(0,eg.Z)({values:op,defaultWidth:"wide"}),quarter:(0,eg.Z)({values:om,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,eg.Z)({values:oy,defaultWidth:"wide"}),day:(0,eg.Z)({values:og,defaultWidth:"wide"}),dayPeriod:(0,eg.Z)({values:ob,defaultWidth:"wide",formattingValues:ov,defaultFormattingWidth:"wide"})},oS=/^(\d+)(\.)?/i,o_=/\d+/i,oA={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(viru Christus|virun eiser Zäitrechnung|no Christus|eiser Zäitrechnung)/i},oE={any:[/^v/i,/^n/i]},ok={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},oM={any:[/1/i,/2/i,/3/i,/4/i]},oP={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mäe|abr|mee|jun|jul|aug|sep|okt|nov|dez)/i,wide:/^(januar|februar|mäerz|abrëll|mee|juni|juli|august|september|oktober|november|dezember)/i},ox={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mä/i,/^ab/i,/^me/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oI={narrow:/^[smdf]/i,short:/^(so|mé|dë|më|do|fr|sa)/i,abbreviated:/^(son?|méi?|dën?|mët?|don?|fre?|sam?)\.?/i,wide:/^(sonndeg|méindeg|dënschdeg|mëttwoch|donneschdeg|freideg|samschdeg)/i},oT={any:[/^so/i,/^mé/i,/^dë/i,/^më/i,/^do/i,/^f/i,/^sa/i]},oC={narrow:/^(mo\.?|nomë\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,abbreviated:/^(moi\.?|nomët\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,wide:/^(moies|nomëttes|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i},oO={any:{am:/^m/i,pm:/^n/i,midnight:/^Mëtter/i,noon:/^mëttes/i,morning:/moies/i,afternoon:/nomëttes/i,evening:/owes/i,night:/nuets/i}},oR={code:"lb",formatDistance:os,formatLong:od,formatRelative:oh,localize:ow,match:{ordinalNumber:(0,eP.Z)({matchPattern:oS,parsePattern:o_,valueCallback:function(e){return parseInt(e,10)}}),era:(0,eM.Z)({matchPatterns:oA,defaultMatchWidth:"wide",parsePatterns:oE,defaultParseWidth:"any"}),quarter:(0,eM.Z)({matchPatterns:ok,defaultMatchWidth:"wide",parsePatterns:oM,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,eM.Z)({matchPatterns:oP,defaultMatchWidth:"wide",parsePatterns:ox,defaultParseWidth:"any"}),day:(0,eM.Z)({matchPatterns:oI,defaultMatchWidth:"wide",parsePatterns:oT,defaultParseWidth:"any"}),dayPeriod:(0,eM.Z)({matchPatterns:oC,defaultMatchWidth:"wide",parsePatterns:oO,defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},oj=r(2568),oD=r.n(oj),oN=r(55433),oL=r(48764).Buffer;function oU(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=oB(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function oB(e,t){if(e){if("string"==typeof e)return oW(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oW(e,t)}}function oW(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0||navigator.msMaxTouchPoints>0}var oZ='You are a helpful AI assistant. Today is {local_date}, local time is {local_time}.\nIf you need to display math symbols and expressions, put them in double dollar signs "$$" (example: $$ x - 1 $$)',oJ="gpt-4o",o$=function(){var e=(0,k.Z)(P().mark(function e(t){var r,n,i,o,a,s,u,c,l,d=arguments;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0!==(r=(d.length>1&&void 0!==d[1]?d[1]:{}).allowExpiredToken)&&r,i="RS256",o=new TextDecoder().decode(new Uint8Array(oK)),a=oL.from(o,"base64").toString("utf-8"),e.next=7,oz.importSPKI(a,i);case 7:return s=e.sent,e.next=10,oz.jwtVerify(t,s,oH({issuer:"urn:typingmind:issuer",audience:"urn:typingmind:audience"},n?{clockTolerance:999999999}:{}));case 10:return c=(u=e.sent).payload,l=u.protectedHeader,e.abrupt("return",{payload:c,protectedHeader:l});case 14:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),oV=function(e){return oD()(e)},oY=function(e){var t,r;return e?"string"==typeof e?e:Array.isArray(e)&&((null===(t=e.find(function(e){return"text"===e.type}))||void 0===t?void 0:t.text)||(null===(r=e.find(function(e){return e.text}))||void 0===r?void 0:r.text))||"":""},oX=function(e){return e.map(function(e){if(!e)return null;try{var t,r=(e.messages||[]).filter(function(e){return"user"===e.role||"assistant"===e.role}),n=function(){try{var e,t,n;return r?null===(e=oY(null===(n=r.filter(function(e){return"assistant"===e.role||"user"===e.role}).slice(-1)[0])||void 0===n?void 0:n.content))||void 0===e||null===(t=e.substring)||void 0===t?void 0:t.call(e,0,50):""}catch(e){return""}},i=(null!==(t=null==e?void 0:e.messages)&&void 0!==t?t:[]).length?e.messages[e.messages.length-1].createdAt:null;return{id:e.id||e.chatID,chatID:e.id||e.chatID,folderID:e.folderID,model:e.model,modelInfo:e.modelInfo,createdAt:e.createdAt,updatedAt:e.updatedAt,deletedAt:e.deletedAt,lastMessageCreatedAt:i,syncedAt:e.syncedAt,favoritedAt:e.favoritedAt,archivedAt:e.archivedAt,preview:n(),title:e.chatTitle,chatTitle:e.chatTitle,character:e.character?{id:e.character.id,avatarURL:e.character.avatarURL,title:e.character.title}:void 0,tags:e.tags}}catch(e){return console.error(e),null}}).filter(Boolean)},oQ=function(e){return eo?"https://"+window.location.hostname:e?"https://".concat(e):"https://cloud.typingmind.com"},o0=function(e){return oQ(e)},o1=function(e){return window.localStorage&&window.localStorage.getItem("__OVERRIDE_SYNC_ENDPOINT")?window.localStorage.getItem("__OVERRIDE_SYNC_ENDPOINT"):"https://cloud.typingmind.com"},o2=function(e){try{return JSON.parse(e)}catch(e){return null}},o4=["profile","preferences","modelSettings","keyboardShortcuts","customModels","latestSeenUpdate","pluginSettings","memorySettings","characters","prompts","apiKeys"],o6=function(){var e=(0,k.Z)(P().mark(function e(){var t,r,n,i,o,a,s,u,c,l,d,f,h,p,m,y,g,b,v,w,S,_,A=arguments;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=void 0!==(r=(t=A.length>0&&void 0!==A[0]?A[0]:{}).resync)&&r,i=t.settingsEnabledMap,o=t.lastSyncAt,a=t.lastSyncBySections,s=t.userSettings,u=t.checkIsExampleChat,l=void 0!==(c=t.skipAPIKeys)&&c,f={updateHistory:d=o2(localStorage.getItem("TM_useStateUpdateHistory"))||{}},!i.chats){e.next=15;break}return e.next=6,oN.Q.getAllChatData();case 6:h=e.sent.filter(function(e){return!u(e.chatID)&&e.messages}).filter(function(e){return n||!e.syncedAt}),i.attachments||h.forEach(function(e){e.messages.forEach(function(e){Array.isArray(e.content)&&(e.content=e.content.filter(function(e){return"text"===e.type}))})}),p=o2(localStorage.getItem("TM_useDeletedChatIDs"))||[],f.chats=h,f.deletedChatIDs=p,m=(o2((0,ei.cF)().getItem("TM_useFolderList"))||[]).filter(function(e){return n||!e.syncedAt}),y=o2((0,ei.cF)().getItem("TM_useDeletedFolderIDs"))||[],f.folders=m,f.deletedFolderIDs=y;case 15:if(!i.prompts){e.next=25;break}return g=o2((0,ei.cF)().getItem("TM_useDeletedPromptIDs"))||[],e.next=19,(0,ei.CQ)().get("TM_useUserPrompts");case 19:if(e.t0=e.sent,e.t0){e.next=22;break}e.t0=[];case 22:b=e.t0.filter(function(e){return n||!e.syncedAt}),f.userPrompts=b,f.deletedPromptIDs=g;case 25:if(!i.characters){e.next=35;break}return v=o2((0,ei.cF)().getItem("TM_useDeletedCharacterIDs"))||[],e.next=29,(0,ei.CQ)().get("TM_useUserCharacters");case 29:if(e.t1=e.sent,e.t1){e.next=32;break}e.t1=[];case 32:w=e.t1.filter(function(e){return n||!e.syncedAt}),f.userCharacters=w,f.deletedCharacterIDs=v;case 35:if(!i.plugins){e.next=45;break}return S=o2((0,ei.cF)().getItem("TM_useDeletedPluginIDs"))||[],e.next=39,(0,ei.CQ)().get("TM_useInstalledPlugins");case 39:if(e.t2=e.sent,e.t2){e.next=42;break}e.t2=[];case 42:_=e.t2.filter(function(e){return n||!e.syncedAt}),f.plugins=_,f.deletedPluginIDs=S;case 45:return f.userSettings={},o4.filter(function(e){return"apiKeys"!==e||!l}).forEach(function(e){i[e]&&Object.keys(s).filter(function(t){return s[t].section===e}).forEach(function(t){var r=s[t],n=a?a[e]:o;(!n||new Date(d[t])>new Date(n))&&(f.userSettings[t]=o2((0,ei.cF)().getItem(r.localStorageKey)))})}),e.abrupt("return",f);case 48:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),o3=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.metadata;return"\n\n\n".concat((null==r?void 0:r.name)||"(Empty)","\n\n\n").concat(e,"\n\n\n")},o8=function(e,t){return o7({usage:{prompt_tokens:e},model:t}).totalCostUSD},o5=function(e){var t=e.promptTokens,r=e.completionTokens,n=e.model;return n.startsWith("gemini-1.5-flash")?t<=128e3?.35*t/1e6+1.5*r/1e6:.7*t/1e6+2.1*r/1e6:n.startsWith("gemini-1.5-pro")?t<=128e3?3.5*t/1e6+10.5*r/1e6:7*t/1e6+21*r/1e6:0},o7=function(e){var t,r=(t={"gpt-4":{prompt:.03,completion:.06},"gpt-4-0314":{prompt:.03,completion:.06},"gpt-4-0613":{prompt:.03,completion:.06},"gpt-4-32k":{prompt:.06,completion:.12},"gpt-4-32k-0314":{prompt:.06,completion:.12},"gpt-4-1106-preview":{prompt:.01,completion:.03},"gpt-4-0125-preview":{prompt:.01,completion:.03},"gpt-4o":{prompt:.005,completion:.015},"chatgpt-4o-latest":{prompt:.005,completion:.015},"gpt-4o-2024-08-06":{prompt:.0025,completion:.01},"gpt-4o-mini":{prompt:15e-5,completion:6e-4},"gpt-4-turbo":{prompt:.01,completion:.03},"gpt-4-turbo-preview":{prompt:.01,completion:.03},"gpt-4-1106-vision-preview":{prompt:.01,completion:.03},"gpt-4-vision-preview":{prompt:.01,completion:.03},"gpt-3.5-turbo":{prompt:5e-4,completion:.0015},"gpt-3.5-turbo-16k":{prompt:.003,completion:.004},"gpt-3.5-turbo-0301":{prompt:.002,completion:.002},"gpt-3.5-turbo-0613":{prompt:.002,completion:.002}},(0,E.Z)(t,"gpt-3.5-turbo-0613",{prompt:.0015,completion:.002}),(0,E.Z)(t,"gpt-3.5-turbo-1106",{prompt:.0015,completion:.002}),(0,E.Z)(t,"gpt-3.5-turbo-0125",{prompt:5e-4,completion:.0015}),(0,E.Z)(t,"claude-3-5-sonnet-20240620",{prompt:.003,completion:.015,cache_creation:.00375,cache_read:3e-4}),(0,E.Z)(t,"claude-3-opus-20240229",{prompt:.015,completion:.075}),(0,E.Z)(t,"claude-3-sonnet-20240229",{prompt:.003,completion:.015}),(0,E.Z)(t,"claude-3-haiku-20240307",{prompt:25e-5,completion:.00125,cache_creation:3e-4,cache_read:3e-5}),(0,E.Z)(t,"claude-v1",{prompt:.01102,completion:.03268}),(0,E.Z)(t,"claude-v1-100k",{prompt:.01102,completion:.03268}),(0,E.Z)(t,"claude-instant-v1",{prompt:.00163,completion:.00551}),(0,E.Z)(t,"claude-instant-v1-100k",{prompt:.00163,completion:.00551}),(0,E.Z)(t,"claude-1",{prompt:.01102,completion:.03268}),(0,E.Z)(t,"claude-1-100k",{prompt:.01102,completion:.03268}),(0,E.Z)(t,"claude-instant-1",{prompt:.00163,completion:.00551}),(0,E.Z)(t,"claude-instant-1.2",{prompt:.00163,completion:.00551}),(0,E.Z)(t,"claude-instant-1-100k",{prompt:.00163,completion:.00551}),(0,E.Z)(t,"claude-2",{prompt:.01102,completion:.03268}),(0,E.Z)(t,"gemini-pro",{prompt:5e-4,completion:.0015}),(0,E.Z)(t,"gemini-pro-vision",{prompt:5e-4,completion:.0015}),(0,E.Z)(t,"gemini-1.5-pro-latest",o5),(0,E.Z)(t,"gemini-1.5-pro-2m-latest",o5),(0,E.Z)(t,"gemini-1.5-pro",o5),(0,E.Z)(t,"gemini-1.5-flash-latest",o5),(0,E.Z)(t,"gemini-1.5-pro-exp-0801",o5),(0,E.Z)(t,"gemini-1.5-flash-exp-0827",o5),(0,E.Z)(t,"gemini-1.5-flash-8b-exp-0827",o5),(0,E.Z)(t,"gemini-1.5-pro-exp-0827",o5),(0,E.Z)(t,"zero",{prompt:0,completion:0}),t),n=1e3,i=function(t){var i=t.prompt_tokens,o=t.completion_tokens,a=t.cache_creation_input_tokens,s=t.cache_read_input_tokens;if("function"==typeof r[e.model])return(0,r[e.model])({promptTokens:i,completionTokens:o,model:e.model});var u=r[e.model]||r.zero,c=u.prompt,l=u.completion,d=u.cache_creation,f=void 0===d?0:d,h=u.cache_read;return i*c/n+o*l/n+a*f/n+s*(void 0===h?0:h)/n},o=0,a=0,s=0,u=0,c=e.usage||{},l=c.completion_tokens,d=void 0===l?0:l,f=c.prompt_tokens,h=void 0===f?0:f,p=c.cache_creation_input_tokens,m=void 0===p?0:p,y=c.cache_read_input_tokens,g=void 0===y?0:y,b=d+h+m+g,v=i({prompt_tokens:h,completion_tokens:d,cache_creation_input_tokens:m,cache_read_input_tokens:g});return"message"===e.type?(o+=b,a+=v):(s+=b,u+=v),o9({totalCostUSD:v,totalTokens:b,totalCachedTokens:g,enhancedTokens:s,enhancedCostUSD:u,messageTokens:o,messageCostUSD:a})},o9=function(e){return e?Object.keys(e).reduce(function(t,r){return"number"==typeof e[r]?t[r]=Math.round(1e6*e[r])/1e6:t[r]=e[r],t},{}):e},ae=function(e,t){try{var r=o7(t);return{totalCostUSD:r.totalCostUSD+((null==e?void 0:e.totalCostUSD)||0),totalTokens:r.totalTokens+((null==e?void 0:e.totalTokens)||0),totalCachedTokens:r.totalCachedTokens+((null==e?void 0:e.totalCachedTokens)||0),enhancedTokens:r.enhancedTokens+((null==e?void 0:e.enhancedTokens)||0),enhancedCostUSD:r.enhancedCostUSD+((null==e?void 0:e.enhancedCostUSD)||0),messageTokens:r.messageTokens+((null==e?void 0:e.messageTokens)||0),messageCostUSD:r.messageCostUSD+((null==e?void 0:e.messageCostUSD)||0),recordedAt:t.recordedAt}}catch(e){throw console.error("failed to update new token usage:",e),e}},at=X(function(e){return e&&"string"==typeof e?Math.max(Math.round(1.33*e.split(" ").length),Math.round(e.length/4)):0}),ar=["48835","823390"],an=["48836","823722"],ai={chats:!0,prompts:!0,characters:!0,plugins:!0,profile:!0,preferences:!0,modelSettings:!0,keyboardShortcuts:!0,customModels:!0,latestSeenUpdate:!0,pluginSettings:!0,memorySettings:!0,attachments:!0,apiKeys:!0},ao=function e(t,r){var n,i,o,a,s,u=t.split("."),c=(0,A.Z)(u,2),l=c[0],d=c[1];return"object"==typeof(n=d?null!==(i=null==r||null===(o=r[l])||void 0===o?void 0:o[d])&&void 0!==i?i:null===(a=aO[l])||void 0===a?void 0:a[d]:null!==(s=null==r?void 0:r[l])&&void 0!==s?s:aO[l])?Object.keys(n).some(function(n){return e("".concat(t,".").concat(n),r)}):!!n},aa=function(e,t){var r,n;return null===(r=({basic:["premiumCharacters","fillContentWithAI","uploadDocuments"],standard:["premiumCharacters","fillContentWithAI","uploadDocuments"],extended:["premiumCharacters","fillContentWithAI","textToSpeech","webSearch","uploadDocuments"],premium:["premiumCharacters","fillContentWithAI","textToSpeech","webSearch","unlimitedPlugins","uploadDocuments","vision"]})[null==t||null===(n=t.payload)||void 0===n?void 0:n.plan])||void 0===r?void 0:r.includes(e)},as=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useUserPrompts")))||!Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,ei.CQ)().set("TM_useUserPrompts",t);case 7:(0,ei.cF)().removeItem("TM_useUserPrompts");case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),au=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useUserCharacters")))||!Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,ei.CQ)().set("TM_useUserCharacters",t);case 7:(0,ei.cF)().removeItem("TM_useUserCharacters");case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ac=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useInstalledPlugins")))||!Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,ei.CQ)().set("TM_useInstalledPlugins",t);case 7:(0,ei.cF)().removeItem("TM_useInstalledPlugins");case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),al=function(){var e=(0,k.Z)(P().mark(function e(){var t,r;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useChatList")))||!Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:r=0,t.forEach(function(e){null!=e&&e.documentText&&(delete e.documentText,r++),null!=e&&e.systemMessage&&(delete e.systemMessage,r++)}),r>0&&(console.log("migrateDeleteDocumentTextOutOfChatListLocalStorage:",r),(0,ei.cF)().setItem("TM_useChatList",JSON.stringify(t)));case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ad=function(){var e=(0,k.Z)(P().mark(function e(){var t,r;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:try{t=(0,ei.cF)().getItem("TM_useFolderList"),r=o2(t),Array.isArray(r)||(console.log("migrateFixFolderList: done"),(0,ei.cF)().setItem("TM_useFolderList",JSON.stringify([])))}catch(e){console.error(e)}case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),af=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:"https://anthropic-proxy.typingmind.com/api/claude/v1"===(t=o2((0,ei.cF)().getItem("TM_useCurrentAnthropicEndpoint")))&&(console.log("migrateNewClaudeProxy: done"),(0,ei.cF)().setItem("TM_useCurrentAnthropicEndpoint",JSON.stringify("https://cloud2.typingmind.com/api/claude/v1/messages"))),"https://cloud2.typingmind.com/api/claude/v1"===t&&(console.log("migrateNewClaudeProxy 2: done"),(0,ei.cF)().setItem("TM_useCurrentAnthropicEndpoint",JSON.stringify("https://cloud2.typingmind.com/api/claude/v1/messages")));case 5:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ah=function(){var e=(0,k.Z)(P().mark(function e(){var t,r,n,i;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:try{t=o2((0,ei.cF)().getItem("TM_useCustomSearchAPIKey")),r=o2((0,ei.cF)().getItem("TM_useCustomSearchEngineID")),n=(0,ei.cF)().getItem("TM_useUserPluginSettings"),i=o2(n),t&&r&&i&&((0,ei.cF)().setItem("TM_useUserPluginSettings",JSON.stringify(oH(oH({},i),{},{get_web_search_results:{searchEngineID:r,searchEngineAPIKey:t}}))),(0,ei.cF)().setItem("TM_useCustomSearchAPIKey",""),(0,ei.cF)().setItem("TM_useCustomSearchEngineID",""),console.log("migrateNewWebSearchPlugin: done"))}catch(e){console.error(e)}case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ap=function(){var e=(0,k.Z)(P().mark(function e(){var t,r;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:"gpt-3.5-turbo-0613"===(t=o2((0,ei.cF)().getItem("TM_useDefaultModel")))&&(r="gpt-3.5-turbo"),"setapp-gpt-3.5-turbo-0613"===t&&(r="setapp-gpt-3.5-turbo"),"gpt-4-0613"===t&&(r="gpt-4"),["claude-v1","claude-v1-100k","claude-instant-v1","claude-instant-v1-100k"].includes(t)&&(r=t.replace("v1","1")),r&&(console.log("Migrated new model",r),(0,ei.cF)().setItem("TM_useDefaultModel",r));case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),am=function(){var e=(0,k.Z)(P().mark(function e(){var t,r,n;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useUserCharacters")))||!Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:r=(0,_.Z)(t),n=0,r=r.map(function(e){return"system"===e.type?(n+=1,oH(oH({},e),{},{id:"character-"+(0,et.Z)(),type:void 0})):e}),n>0&&(console.log("Migrated characters",r.length),(0,ei.cF)().setItem("TM_useUserCharacters",JSON.stringify(r)));case 9:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ay=function(){var e=(0,k.Z)(P().mark(function e(){return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:(0,ei.cF)().removeItem("TM_useTokenUsage");case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ag=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!(!(t=o2((0,ei.cF)().getItem("TM_useChatsInFolder")))||"object"!=typeof t)){e.next=5;break}return e.abrupt("return");case 5:return e.prev=5,e.next=8,Promise.all(Object.keys(t).map(function(){var e=(0,k.Z)(P().mark(function e(r){return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Array.isArray(t[r])){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,oN.Q.bulkUpdateChatFields(Object.fromEntries(t[r].map(function(e){return[e,function(e){return null!=e&&e.folderID?{}:{folderID:r}}]})));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()));case 8:(0,ei.cF)().removeItem("TM_useChatsInFolder"),console.log("migrated chat folders successfully"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.error("migrate chat folders failed");case 15:case"end":return e.stop()}},e,null,[[5,12]])}));return function(){return e.apply(this,arguments)}}(),ab=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var r=1024,n=t<0?0:t,i=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(r,o)).toFixed(n))," ").concat(i[o])},av={search:"K",sidebar:"B",newChat:"N",resetChat:"R",regenerate:"E",share:"S",clearContext:"J",togglePlugins:"P",copyLastMessage:"C"},aw=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},aS=(S={"claude-3-5-sonnet-20240620":{id:"claude-3-5-sonnet-20240620",modelID:"claude-3-5-sonnet-20240620",fastCheapFallback:"claude-3-5-sonnet-20240620",title:"Claude 3.5 Sonnet",contextLength:2e5,source:"Claude",details:"OpenAI's new flagship model that can reason across audio, vision, and text in real time.",apiType:"claude",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,new:!1},"gpt-4o":{id:"gpt-4o",modelID:"gpt-4o",fastCheapFallback:"gpt-4o-mini",title:"GPT-4o",contextLength:128e3,source:"OpenAI",details:"OpenAI's new flagship model that can reason across audio, vision, and text in real time.",apiType:"openai",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,new:!1},"chatgpt-4o-latest":{id:"chatgpt-4o-latest",modelID:"chatgpt-4o-latest",fastCheapFallback:"gpt-4o-mini",title:"ChatGPT-4o",contextLength:128e3,source:"OpenAI",details:"Dynamic model continuously updated to the current version of GPT-4o in ChatGPT",apiType:"openai",pluginSupported:!1,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,new:!1},"gpt-4o-mini":{id:"gpt-4o-mini",modelID:"gpt-4o-mini",fastCheapFallback:"gpt-4o-mini",title:"GPT-4o Mini",contextLength:128e3,source:"OpenAI",details:"OpenAI's most cost-efficient small model that’s smarter and cheaper than GPT-3.5 Turbo, and has vision capabilities.",apiType:"openai",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,new:!1},"gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",modelID:"gpt-4o-2024-08-06",fastCheapFallback:"gpt-4o-mini",title:"GPT-4o (2024-08-06)",contextLength:128e3,source:"OpenAI",details:"The snapshot of GPT-4o model version 2024-08-06.",apiType:"openai",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,new:!1},"gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",modelID:"gpt-4o-2024-05-13",fastCheapFallback:"gpt-4o-mini",title:"GPT-4o (2024-05-13)",contextLength:128e3,source:"OpenAI",details:"The snapshot of GPT-4o model version 2024-05-13.",apiType:"openai",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0},"gpt-4-turbo":{id:"gpt-4-turbo",modelID:"gpt-4-turbo",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Turbo",contextLength:128e3,source:"OpenAI",details:"OpenAI's turbo model (2024-04-09) with vision capabilities.",apiType:"openai",pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0},"gpt-4-turbo-preview":{id:"gpt-4-turbo-preview",modelID:"gpt-4-turbo-preview",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Turbo (Preview)",contextLength:128e3,source:"OpenAI",details:"GPT-4 Turbo Preview model, smarter than GPT-4 and comes with 128K context limit.",apiType:"openai",pluginSupported:!0,hasStreamUsageReport:!0,userIdentitySupported:!0,old:!0},"gpt-4-1106-preview":{id:"gpt-4-1106-preview",old:!0,modelID:"gpt-4-1106-preview",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Turbo (1106)",contextLength:128e3,source:"OpenAI",details:"OpenAI's latest model, smarter than GPT-4 and comes with 128K context limit.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0},"gpt-4-0125-preview":{id:"gpt-4-0125-preview",old:!0,modelID:"gpt-4-0125-preview",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Turbo (0125)",contextLength:128e3,source:"OpenAI",details:"OpenAI's latest model, smarter than GPT-4 and comes with 128K context limit.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0},"gpt-4-1106-vision-preview":{id:"gpt-4-1106-vision-preview",modelID:"gpt-4-1106-vision-preview",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Turbo Vision",contextLength:128e3,source:"OpenAI",details:"The GPT-4 model with vision capability that understands images.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,visionSupported:!0},"gpt-4-vision-preview":{id:"gpt-4-vision-preview",modelID:"gpt-4-vision-preview",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 Vision",contextLength:128e3,source:"OpenAI",details:"The GPT-4 model with vision capability that understands images.",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0,visionSupported:!0,bodyParams:{max_tokens:1e3}},"gemini-1.5-pro-latest":{id:"gemini-1.5-pro-latest",modelID:"gemini-1.5-pro-latest",title:"Gemini 1.5 Pro (Deprecated)",contextLength:1048576,source:"Gemini",details:"Mid-size multimodal model that supports up to 1 million tokens",apiType:"gemini",pluginSupported:!0,visionSupported:!0,old:!0},"gemini-1.5-pro-2m-latest":{id:"gemini-1.5-pro-2m-latest",modelID:"gemini-1.5-pro-2m-latest",title:"Gemini 1.5 Pro 2M (Deprecated)",contextLength:2097152,source:"Gemini",details:"Multimodal model that supports up to 2 million tokens",apiType:"gemini",pluginSupported:!0,visionSupported:!0,old:!0},"gemini-1.5-pro":{id:"gemini-1.5-pro",modelID:"gemini-1.5-pro",title:"Gemini 1.5 Pro 2M",contextLength:2097152,source:"Gemini",details:"Multimodal model that supports up to 2 million tokens",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!1},"gemini-1.5-flash-latest":{id:"gemini-1.5-flash-latest",modelID:"gemini-1.5-flash-latest",title:"Gemini 1.5 Flash",contextLength:1048576,source:"Gemini",details:"Fast and versatile multimodal model for scaling across diverse tasks",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!1},"gemini-1.5-pro-exp-0801":{id:"gemini-1.5-pro-exp-0801",modelID:"gemini-1.5-pro-exp-0801",title:"Gemini 1.5 Pro Experimental 0801",contextLength:2097152,source:"Gemini",details:"Mid-size multimodal model that supports up to 2 million tokens",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!1},"gemini-1.5-pro-exp-0827":{id:"gemini-1.5-pro-exp-0827",modelID:"gemini-1.5-pro-exp-0827",title:"Gemini 1.5 Pro Experimental 0827",contextLength:2097152,source:"Gemini",details:"Mid-size multimodal model that supports up to 2 million tokens",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!0},"gemini-1.5-flash-exp-0827":{id:"gemini-1.5-flash-exp-0827",modelID:"gemini-1.5-flash-exp-0827",title:"Gemini 1.5 Flash Experimental 0827",contextLength:1048576,source:"Gemini",details:"Fast and versatile multimodal model for scaling across diverse tasks",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!0},"gemini-1.5-flash-8b-exp-0827":{id:"gemini-1.5-flash-8b-exp-0827",modelID:"gemini-1.5-flash-8b-exp-0827",title:"Gemini 1.5 Flash 8B Experimental 0827",contextLength:1048576,source:"Gemini",details:"Fast and versatile multimodal model for scaling across diverse tasks",apiType:"gemini",pluginSupported:!0,visionSupported:!0,new:!0},"gemini-ultra":{id:"gemini-ultra",modelID:"gemini-ultra",title:"Gemini 1.0 Ultra",contextLength:30720,source:"Gemini",details:"The best model for scaling across a wide range of tasks",apiType:"gemini",pluginSupported:!1,visionSupported:!1},"gemini-pro":{id:"gemini-pro",modelID:"gemini-pro",title:"Gemini 1.0 Pro",contextLength:30720,source:"Gemini",details:"The best model for scaling across a wide range of tasks",apiType:"gemini",pluginSupported:!0,visionSupported:!1},"gemini-pro-vision":{id:"gemini-pro-vision",modelID:"gemini-pro-vision",title:"Gemini 1.0 Pro Vision (Deprecated)",contextLength:12288,source:"Gemini",details:"The best image understanding model to handle a broad range of applications",apiType:"gemini",pluginSupported:!1,visionSupported:!0,old:!0},"gpt-3.5-turbo-1106":{id:"gpt-3.5-turbo-1106",modelID:"gpt-3.5-turbo-1106",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 (1106)",contextLength:16e3,source:"OpenAI",details:"The new 3.5 Turbo model with improved instruction following, JSON mode, and parallel function calling.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0},"gpt-3.5-turbo-0125":{id:"gpt-3.5-turbo-0125",modelID:"gpt-3.5-turbo-0125",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 (0125)",contextLength:16e3,source:"OpenAI",details:"The new 3.5 Turbo model, cheaper, with improved instruction following, JSON mode, and parallel function calling.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0},"gpt-3.5-turbo":{id:"gpt-3.5-turbo",modelID:"gpt-3.5-turbo",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5",contextLength:16e3,source:"OpenAI",details:"OpenAI's fastest model, great for most everyday tasks.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0},"gpt-3.5-turbo-0301":{id:"gpt-3.5-turbo-0301",modelID:"gpt-3.5-turbo-0301",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 (0301)",contextLength:4096,source:"OpenAI",old:!0,details:"The old model of GPT-3.5 (gpt-3.5-turbo-0301). OpenAI will support this model until at least June 13, 2024.",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0},"gpt-3.5-turbo-0613":{id:"gpt-3.5-turbo-0613",modelID:"gpt-3.5-turbo-0613",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 (0613)",contextLength:4096,source:"OpenAI",details:"The old model of GPT-3.5 (gpt-3.5-turbo-0613). OpenAI will support this model until at least June 13, 2024.",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0},"gpt-3.5-turbo-16k":{id:"gpt-3.5-turbo-16k",modelID:"gpt-3.5-turbo-16k",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 16K",contextLength:16384,source:"OpenAI",details:"The 16k context length version of GPT-3.5 model at twice the price.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0}},(0,E.Z)(S,"gpt-3.5-turbo-0613",{id:"gpt-3.5-turbo-0613",modelID:"gpt-3.5-turbo-0613",fastCheapFallback:"gpt-4o-mini",title:"GPT-3.5 (0613)",contextLength:4096,source:"OpenAI",details:"OpenAI's fastest model, great for most everyday tasks.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"gpt-4",{id:"gpt-4",modelID:"gpt-4",fastCheapFallback:"gpt-4o-mini",title:"GPT-4",contextLength:8192,source:"OpenAI",details:"OpenAI's most capable model, great for tasks that require creativity and advanced reasoning.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0}),(0,E.Z)(S,"gpt-4-0314",{id:"gpt-4-0314",modelID:"gpt-4-0314",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 (0314)",contextLength:8192,source:"OpenAI",details:"The old model of GPT-4 (gpt-4-0314). OpenAI will support this model until at least June 13, 2024.",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"gpt-4-32k",{id:"gpt-4-32k",modelID:"gpt-4-32k",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 32K",contextLength:32e3,source:"OpenAI",details:"Great for tasks that require a lot of context.",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"gpt-4-0613",{id:"gpt-4-0613",modelID:"gpt-4-0613",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 (0613)",contextLength:8192,source:"OpenAI",details:"An old model of GPT-4 (0613)",apiType:"openai",pluginSupported:!0,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"gpt-4-32k-0314",{id:"gpt-4-32k-0314",modelID:"gpt-4-32k-0314",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 32K (0314)",contextLength:32e3,source:"OpenAI",details:"An old model of GPT-4-32K (0314)",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"gpt-4-32k-0613",{id:"gpt-4-32k-0613",modelID:"gpt-4-32k-0613",fastCheapFallback:"gpt-4o-mini",title:"GPT-4 32K (0613)",contextLength:32e3,source:"OpenAI",details:"An old model of GPT-4-32K (0613)",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,hasStreamUsageReport:!0,old:!0}),(0,E.Z)(S,"claude-v1",{id:"claude-v1",modelID:"claude-v1",fastCheapFallback:"claude-instant-v1",title:"Claude",contextLength:1e5,source:"Anthropic",details:"Ideal for a wide range of tasks.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-1",{id:"claude-1",modelID:"claude-1",fastCheapFallback:"claude-instant-1",title:"Claude 1",contextLength:1e5,source:"Anthropic",details:"Ideal for a wide range of tasks.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-2.1",{id:"claude-2.1",modelID:"claude-2.1",fastCheapFallback:"claude-instant-1.2",title:"Claude 2.1",contextLength:2e5,source:"Anthropic",details:"Anthropic's largest model with 200K tokens context length.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-2",{id:"claude-2",modelID:"claude-2",fastCheapFallback:"claude-instant-1.2",title:"Claude 2",contextLength:1e5,source:"Anthropic",details:"Anthropic's previous largest model with 100K tokens context length.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-3-opus-20240229",{id:"claude-3-opus-20240229",modelID:"claude-3-opus-20240229",fastCheapFallback:"claude-3-opus-20240229",title:"Claude 3 Opus",contextLength:2e5,source:"Anthropic",details:"Anthropic's most powerful model for highly complex tasks. Top-level performance, intelligence, fluency, and understanding.",apiType:"claude",visionSupported:!0,pluginSupported:!0}),(0,E.Z)(S,"claude-3-sonnet-20240229",{id:"claude-3-sonnet-20240229",modelID:"claude-3-sonnet-20240229",fastCheapFallback:"claude-3-sonnet-20240229",title:"Claude 3 Sonnet",contextLength:2e5,source:"Anthropic",details:"Anthropic's new model with ideal balance of intelligence and speed for enterprise workloads.",apiType:"claude",visionSupported:!0,pluginSupported:!0}),(0,E.Z)(S,"claude-3-haiku-20240307",{id:"claude-3-haiku-20240307",modelID:"claude-3-haiku-20240307",fastCheapFallback:"claude-3-haiku-20240307",title:"Claude 3 Haiku",contextLength:2e5,source:"Anthropic",details:"Anthropic's fastest and most affordable model in its intelligence class",apiType:"claude",visionSupported:!0,pluginSupported:!0}),(0,E.Z)(S,"claude-v1-100k",{id:"claude-v1-100k",modelID:"claude-v1-100k",fastCheapFallback:"claude-instant-v1",title:"Claude 100K",contextLength:1e5,source:"Anthropic",details:"Enhanced version of Claude with 100K context length.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-1-100k",{id:"claude-1-100k",modelID:"claude-1-100k",fastCheapFallback:"claude-instant-1",title:"Claude 100K",contextLength:1e5,source:"Anthropic",details:"An enhanced version of Claude V1 with a 100,000 token (roughly 75,000 word) context window. Ideal for summarizing, analyzing, and querying long documents and conversations for nuanced understanding of complex topics and relationships across very long spans of text.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-instant-v1",{id:"claude-instant-v1",modelID:"claude-instant-v1",fastCheapFallback:"claude-instant-v1",title:"Claude Instant",contextLength:1e4,source:"Anthropic",details:"Anthropic's smaller model with far lower latency.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-instant-1",{id:"claude-instant-1",modelID:"claude-instant-1",fastCheapFallback:"claude-instant-1",title:"Claude Instant",contextLength:1e5,source:"Anthropic",details:"Anthropic's smaller model with far lower latency.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-instant-1.2",{id:"claude-instant-1.2",modelID:"claude-instant-1.2",fastCheapFallback:"claude-instant-1.2",title:"Claude Instant 1.2",contextLength:1e5,source:"Anthropic",details:"The latest model of Claude Instant, with improvements to its output quality.",apiType:"claude"}),(0,E.Z)(S,"claude-instant-v1-100k",{id:"claude-instant-v1-100k",modelID:"claude-instant-v1-100k",fastCheapFallback:"claude-instant-v1",title:"Claude Instant 100K",contextLength:1e5,source:"Anthropic",details:"An enhanced version of claude-instant-v1 with a 100,000 token context window that retains its performance.",apiType:"claude",old:!0}),(0,E.Z)(S,"claude-instant-1-100k",{id:"claude-instant-1-100k",modelID:"claude-instant-1-100k",fastCheapFallback:"claude-instant-1",title:"Claude Instant 100K",contextLength:1e5,source:"Anthropic",details:"An enhanced version of claude-instant-v1 with a 100,000 token context window that retains its performance.",apiType:"claude",old:!0}),(0,E.Z)(S,"setapp-gpt-3.5-turbo",{id:"setapp-gpt-3.5-turbo",modelID:"setapp-gpt-3.5-turbo",fastCheapFallback:"setapp-gpt-3.5-turbo",title:"Setapp (GPT-3.5)",contextLength:16384,source:"Setapp",details:"A free version of OpenAI's GPT-3.5 provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4",{id:"setapp-gpt-4",modelID:"setapp-gpt-4",fastCheapFallback:"setapp-gpt-3.5-turbo",title:"Setapp (GPT-4)",contextLength:8192,source:"Setapp",details:"A free version of OpenAI's GPT-4 provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4o",{id:"setapp-gpt-4o",modelID:"setapp-gpt-4o",fastCheapFallback:"setapp-gpt-3.5-turbo",title:"Setapp GPT-4o",contextLength:128e3,source:"Setapp",details:"A free version of OpenAI's GPT-4o provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4o-mini",{id:"setapp-gpt-4o-mini",modelID:"setapp-gpt-4o-mini",fastCheapFallback:"setapp-gpt-4o-mini",title:"Setapp GPT-4o Mini",contextLength:128e3,source:"Setapp",details:"A free version of OpenAI's GPT-4o provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4-1106-preview",{id:"setapp-gpt-4-1106-preview",title:"Setapp GPT-4 Turbo (1106)",apiType:"setapp",modelID:"setapp-gpt-4-1106-preview",endpoint:"/api/hosted/tm_completions",source:"Setapp",details:"A free version of OpenAI's GPT-4 Turbo provided by Setapp.",contextLength:128e3,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4-turbo",{id:"setapp-gpt-4-turbo",title:"Setapp GPT-4 Turbo",apiType:"setapp",modelID:"setapp-gpt-4-turbo",endpoint:"/api/hosted/tm_completions",source:"Setapp",details:"A free version of OpenAI's GPT-4 Turbo (update 2024-04-09) provided by Setapp.",contextLength:128e3,pluginSupported:!0,visionSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4-turbo-preview",{id:"setapp-gpt-4-turbo-preview",title:"Setapp GPT-4 Turbo (Preview)",apiType:"setapp",modelID:"setapp-gpt-4-turbo-preview",endpoint:"/api/hosted/tm_completions",source:"Setapp",details:"A free version of OpenAI's GPT-4 Turbo (update 0125) provided by Setapp.",contextLength:128e3,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-4-vision-preview",{id:"setapp-gpt-4-vision-preview",modelID:"setapp-gpt-4-vision-preview",fastCheapFallback:"setapp-gpt-3.5-turbo",title:"GPT-4 Vision",contextLength:128e3,source:"Setapp",details:"The GPT-4 model with vision capability that understands images provided by Setapp.",apiType:"openai",pluginSupported:!1,userIdentitySupported:!0,visionSupported:!0,bodyParams:{max_tokens:1e3}}),(0,E.Z)(S,"setapp-gpt-3.5-turbo-0613",{id:"setapp-gpt-3.5-turbo-0613",modelID:"setapp-gpt-3.5-turbo-0613",fastCheapFallback:"setapp-gpt-3.5-turbo-0613",title:"Setapp GPT-3.5 (0613)",contextLength:16384,source:"Setapp",details:"A free version of OpenAI's GPT-3.5 provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0,old:!0}),(0,E.Z)(S,"setapp-gpt-3.5-turbo-0125",{id:"setapp-gpt-3.5-turbo-0125",modelID:"setapp-gpt-3.5-turbo-0125",fastCheapFallback:"setapp-gpt-3.5-turbo-0125",title:"Setapp GPT-3.5 (0125)",contextLength:16384,source:"Setapp",details:"A free version of OpenAI's GPT-3.5 provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),(0,E.Z)(S,"setapp-gpt-3.5-turbo-16k",{id:"setapp-gpt-3.5-turbo-16k",modelID:"setapp-gpt-3.5-turbo-16k",fastCheapFallback:"setapp-gpt-3.5-turbo-16k",title:"Setapp (GPT-3.5 16K)",contextLength:16384,source:"Setapp",details:"A free version of OpenAI's GPT-3.5 (16K tokens) provided by Setapp. Notice: Your API requests will be proxied through Setapp's server.",endpoint:"/api/hosted/tm_completions",apiType:"setapp",skipAPIKey:!0,pluginSupported:!0,userIdentitySupported:!0,system:!0}),S),a_={title:"Custom Model",contextLength:2048,details:""},aA=!0,aE=["chatgpt-4o-latest","gpt-4o-2024-08-06","gpt-4o-mini","gpt-4o","gpt-4","gpt-4-turbo","gpt-4-32k","gpt-4-1106-preview","gpt-4-0125-preview","gpt-4-vision-preview","gpt-4-turbo-preview"].concat((0,_.Z)(aA?["gemini-1.5-flash-exp-0827","gemini-1.5-flash-8b-exp-0827","gemini-1.5-pro-exp-0827","gemini-1.5-pro-exp-0801","gemini-1.5-pro","gemini-1.5-pro-2m-latest","gemini-1.5-flash-latest","gemini-1.5-pro-latest","gemini-ultra","gemini-pro","gemini-pro-vision"]:[]),["gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","claude-3-5-sonnet-20240620","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-3-haiku-20240307","claude-2.1","claude-2","claude-1","claude-instant-1","claude-instant-1.2","gpt-3.5-turbo-0301","gpt-4-0314","gpt-4-32k-0314","gpt-4-32k-0613"]).map(function(e){return aS[e]});["claude-2.1","claude-2","claude-1","claude-instant-1","claude-instant-1.2"].map(function(e){return aS[e]}),["gpt-4o","gpt-4","gpt-4-turbo","gpt-4-turbo-preview","gpt-4-vision-preview","gpt-4-32k","gpt-4-0613","gpt-4-1106-preview","gpt-4-0125-preview","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125"].map(function(e){return aS[e]}),["gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-4-0314","gpt-4-32k-0314","gpt-4-32k-0613"].map(function(e){return aS[e]});var ak=function(e,t){var r=o2((0,ei.cF)().getItem("TM_useCustomModels"))||[];return aS[e]||r.find(function(t){return t.id===e})||(null==t?void 0:t.find(function(t){return t.id===e}))||a_},aM=function(){if(window.navigator.userAgent.includes("TypingMindMac"))return window.navigator.userAgent;var e,t,r,n,i,o=new(en())(window.navigator.userAgent);return[null===(e=o.getOS())||void 0===e?void 0:e.name,null===(t=o.getOS())||void 0===t?void 0:t.version,null===(r=o.getBrowser())||void 0===r?void 0:r.name,null===(n=o.getBrowser())||void 0===n?void 0:n.version,null===(i=o.getDevice())||void 0===i?void 0:i.model].map(function(e){return(e||"").trim()}).filter(Boolean).join(" ")};function aP(){for(var e=arguments.length,t=Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.hiddenButtons,r=e.showLibrary,n=e.enableShare,i=e.canChangeChatSettings,o=[].concat(ax).filter(function(e){return!t.includes(e.id)});return r||(o=o.filter(function(e){return"prompts"!==e.id})),n||(o=o.filter(function(e){return"share"!==e.id})),i||(o=o.filter(function(e){return"change-settings"!==e.id})),o},aC=[{id:"edit",title:"Edit"},{id:"copy",title:"Copy"},{id:"pin",title:"Pin"},{id:"delete",title:"Delete"},{id:"show-raw",title:"Show Raw"},{id:"play",title:"Play"},{id:"fork",title:"Fork Chat"}],aO={navBar:!0,commandK:!0,webSearch:!0,promptLibrary:!0,outputSettings:!0,pickCharacters:!0,uploadDocument:!0,systemMessage:!0,textToSpeech:!0,communityPrompts:!0,syncToCloud:!0,modelSettings:!0,systemPromptsForOnlyMembers:!1,systemCharactersForOnlyMembers:!1,defaultCharacters:!0,addNewCharacters:!0,customModels:!0,usePlugins:!0,addNewPlugins:!0,addExampleChats:!0,yourProfile:!0,useAutoSuggestKeywords:!0,voiceInput:!0,importFromOpenAI:!0,changeUILanguage:!0,externalShare:!0,showUsageLimitsMessage:!1,showNewChatDescription:!0,actionButtons:Object.fromEntries(ax.map(function(e){return[e.id,!0]})),useOpenAIWhisper:!1,showChatInfo:!0,hideWelcomeMessageForLoggedInUsers:!1,useOpenAITextToSpeech:!0,messageActions:Object.fromEntries(aC.map(function(e){return[e.id,!0]})),downloadTextToSpeech:!0,chatMemory:!0,loginRequiredToViewChatInterface:!1,showWorkspaceBar:!0};Object.fromEntries([{id:"admin",label:"Admin"},{id:"content-moderator",label:"Content Moderator"}].map(function(e){return[e.id,e]}));var aR={de:eW,zhCN:tu,vi:tU,el:rr,fr:rI,it:r5,ru:nO,uk:ia,es:iN,pt:oe,lb:oR},aj=function(e,t){var r=es.Z.get("locale");return(0,ea.Z)(e,t,{locale:aR[null==r?void 0:r.replace("-","")]})},aD=function(e){return Array.from(new Map((null==e?void 0:e.flatMap(function(e){return e.tags||[]})).map(function(e){return[e.name,e]})),function(e){var t=(0,A.Z)(e,2);return t[0],t[1]})};function aN(e){return new Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e)},n.readAsDataURL(e)})}function aL(e){return e.filter(function(e){return["user","assistant"].includes(e.role)}).filter(function(e){return e.content}).map(function(e){return{role:e.role,content:e.content}}).map(function(e){if(Array.isArray(e.content)){var t,r=e.content.filter(function(e){return e.type}).join(", ");return oH(oH({},e),{},{content:"Attached: ".concat(r,"\n\n")+(null===(t=e.content.find(function(e){return"text"===e.type}))||void 0===t?void 0:t.text)||0})}return e})}function aU(e){if(!Array.isArray(e.content))return e;var t=e.content.filter(function(e){return"tm_text_file"===e.type});if(!(null!=t&&t.length))return e;var r=e.content.find(function(e){return"text"===e.type}),n=[].concat((0,_.Z)(t.map(function(e){return o3(e.text,{metadata:e.metadata})})),[(null==r?void 0:r.text)||""]).join("\n\n"),i=[].concat((0,_.Z)(e.content.filter(function(e){return"tm_text_file"!==e.type}).filter(function(e){return"text"!==e.type})),[{type:"text",text:n}]),o=0===i.filter(function(e){return"text"!==e.type}).length;return oH(oH({},e),{},{content:o?i[0].text:i})}function aB(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.excludeExceededItems,i=void 0!==n&&n,o=[],a=[],s=0,u=0,c=[],l=.8*t;try{var d,f=oU(e);try{for(f.s();!(d=f.n()).done;){var h=d.value,p=JSON.stringify(h).length;if(p>l&&i){c.push(h.chatID),u++;continue}s+p>l&&(o.push(a),a=[],s=0),a.push(h),s+=p}}catch(e){f.e(e)}finally{f.f()}return a.length&&o.push(a),{chunks:o,ignoredCount:u,ignoredChatIDs:c}}catch(t){throw console.error("chunk items failed",e,t),t}}var aW=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.systemPluginsMap,n=t.userPluginSettings;if(!e||!e.userSettings||!Array.isArray(e.userSettings)||!e.userSettings.some(function(e){return e.required}))return!0;if(!n)return!1;var i=n[e.id]||{},o=(r?null===(a=r[e.uuid])||void 0===a?void 0:a.settings:{})||{};if(!i&&!o)return!1;var a,s,u=oU(e.userSettings.filter(function(e){return e.required}));try{for(u.s();!(s=u.n()).done;){var c=s.value;if(!i[c.name]&&!o[c.name])return!1}}catch(e){u.e(e)}finally{u.f()}return!0},aF={NONE:"NONE",ALL:"ALL",WITH_TAGS:"WITH_TAGS"},aH=[".docx",".csv",".md",".txt",".json",".html",".htm",".jpg",".jpeg",".png",".gif",".webp",".xlsx",".bas",".cls",".frm"],aK=["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","image/jpeg","image/png","image/gif","image/webp","text/*"];aH.concat(aK).join(",");var az=function(e){return oq.hex(e)},aq=function(){return x(10)};function aG(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split(";base64,"),n=r[0].split(":")[1],i=atob(r[1]),o=i.length,a=n.split("/")[1],s="".concat(t||x(),".").concat(a),u=new Uint8Array(o),c=0;c2&&void 0!==arguments[2]?arguments[2]:7e3,n=new AbortController,i=setTimeout(function(){return n.abort()},r);return fetch(e,oH(oH({},t),{},{signal:n.signal})).then(function(e){return clearTimeout(i),e}).catch(function(e){throw clearTimeout(i),e})}var aV=["alloy","echo","fable","onyx","nova","shimmer"];function aY(){return aX.apply(this,arguments)}function aX(){return(aX=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ei.CQ)().entries();case 2:return t=e.sent.map(function(e){var t=(0,A.Z)(e,2),r=t[0];return t[1],r}),e.next=5,(0,ei.CQ)().delMany(t);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}var aQ={elevenStability:.75,elevenClarity:.75,elevenVoice:"EXAVITQu4vr4xnSDxMaL",elevenModelID:"eleven_monolingual_v1",openAISpeechVoice:aV[0],openAISpeechModel:"tts-1",openAISpeechSpeed:1,browserVoiceRate:1,browserVoicePitch:1,autoSpeech:!1},a0=function(e){return null==e?void 0:e.replace(/(.|\n)*?<\/FILE_ATTACHMENT>/g,"")},a1=function(){try{return window.self!==window.top}catch(e){return!0}},a2=function(e){return Array.isArray(e)?e:[]},a4=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string";return"string"===r?"hsl(".concat(e,"deg 50% ").concat(t,"%)"):{h:e,s:50,l:t}},a6=217,a3={CHAT:"CHAT",PROMPT:"PROMPT",CHARACTER:"CHARACTER",PLUGIN:"PLUGIN",BLOB:"BLOB"},a8={CHAT:"CHAT",CHARACTER:"CHARACTER",PLUGIN:"PLUGIN"},a5=function(){var e=(0,k.Z)(P().mark(function e(){var t,r,n;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:if(!((t=o2((0,ei.cF)().getItem("TM_useUserProfiles")))&&Array.isArray(t))){e.next=5;break}return e.abrupt("return");case 5:r=o2((0,ei.cF)().getItem("TM_useUserProfilePicURL")),n=o2((0,ei.cF)().getItem("TM_useUserInformation")),r||n?(0,ei.cF)().setItem("TM_useUserProfiles",JSON.stringify([{id:(0,et.Z)(),picURL:r,information:n,isCurrent:!0}])):(0,ei.cF)().setItem("TM_useUserProfiles",JSON.stringify([]));case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),a7=function(e){return'\n\n\nThis is the profile of the current user you are talking with. Use the information in this profile to personalize the conversation where needed.\n\n\n').concat(e.information||"(Empty)","\n\n\n").concat(e.customInstruction||"(Empty)","\n\n\n")},a9=function(e){return e>=1e6?"".concat((e/1e6).toFixed(0),"M"):e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e},se=function(){var e=(0,k.Z)(P().mark(function e(){var t;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=2;break;case 2:null!==(t=o2((0,ei.cF)().getItem("TM_useDarkTheme")))&&((0,ei.cF)().setItem("TM_useThemeMode",JSON.stringify(t?"dark":"light")),(0,ei.cF)().removeItem("TM_useDarkTheme"));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),st=function(e){var t;if(!e)return"";try{t=JSON.parse(e)}catch(e){}return t?Object.keys(t).map(function(e){return JSON.stringify(t[e])}).join(", "):"(".concat(e.length,") ")+e},sr=function(e){var t,r=e.pluginFunction,n=e.pluginResponse;if(null!=n&&n._TM_CUSTOM_OUTPUT){if((null==n?void 0:n.type)==="markdown")return{outputType:"render_markdown",response:null==n?void 0:n.data};if((null==n?void 0:n.type)==="html")return{outputType:"render_html",response:null===(t=n.data)||void 0===t?void 0:t.source}}return{outputType:r.outputType||"respond_to_ai",response:n}};function sn(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){throw console.error(e),Error("Invalid User Settings. Please check your JSON.")}if(!Array.isArray(e))throw Error("Invalid User Settings: JSON string must be an array");for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[],n={},i=oU(r);try{for(i.s();!(t=i.n()).done;){var o,a=t.value;a.name in e&&""!==e[a.name]?n[a.name]=e[a.name]:"defaultValue"in a?n[a.name]=a.defaultValue:"enum"===a.type?n[a.name]=null===(o=a.values)||void 0===o?void 0:o[0]:"number"===a.type?n[a.name]=0:("text"===a.type||"password"===a.type)&&(n[a.name]="")}}catch(e){i.e(e)}finally{i.f()}return n};function so(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return e===t;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r=i&&t&&o.push(e)}),(o.length>4?[o[0]].concat((0,_.Z)(o.slice(-3))):o).forEach(function(e){Array.isArray(e.content)?e.content.find(function(e){return e.text}).cache_control={type:"ephemeral"}:e.content=[{type:"text",text:e.content,cache_control:{type:"ephemeral"}}]}),n}var sl=function(e){var t,r,n,i;return"tool"===e.role&&("markdown"===e.format||(null===(t=e.pluginResponse)||void 0===t?void 0:t.type)==="markdown"||"html"===e.format||(null===(r=e.pluginResponse)||void 0===r?void 0:r.type)==="html"||(null===(n=e.pluginResponse)||void 0===n?void 0:n.type)==="render_markdown"||(null===(i=e.pluginResponse)||void 0===i?void 0:i.type)==="render_html")},sd=function(){return window.innerWidth>768},sf=function(e){var t=!e.managed||e.managed&&e.allowUserAPIKey&&e.requireLicenseKey;return{showAPIKeysButton:!e.managed||e.managed&&e.allowUserAPIKey,showLicenseKeyButton:t}};new Intl.NumberFormat("en-US",{style:"currency",currency:"usd"})},91118:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(25829)}])},42474:function(e,t,r){var n="/",i=r(48764).Buffer,o=r(70046);!function(){var t={7160:function(e,t,r){var n=t;n.bignum=r(711),n.define=r(495).define,n.base=r(853),n.constants=r(7335),n.decoders=r(6701),n.encoders=r(3418)},495:function(e,t,r){var n=r(7160),i=r(3782);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r(6144).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},6483:function(e,t,r){var n=r(3782),i=r(853).Reporter,o=r(4300).Buffer;function a(e,t){if(i.call(this,t),!o.isBuffer(e)){this.error("Input not Buffer");return}this.base=e,this.offset=0,this.length=e.length}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},853:function(e,t,r){var n=t;n.Reporter=r(1293).b,n.DecoderBuffer=r(6483).C,n.EncoderBuffer=r(6483).R,n.Node=r(9374)},9374:function(e,t,r){var n=r(853).Reporter,i=r(853).EncoderBuffer,o=r(853).DecoderBuffer,a=r(3523),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),c=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function l(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=l;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};d.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},l.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},l.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0),t[e[r]]=r}),t}))},c.forEach(function(e){l.prototype[e]=function(){throw Error(e+" not implemented for encoding: "+this._baseState.enc)}}),s.forEach(function(e){l.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),l.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},l.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var r,n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var i=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(a=this._peekTag(e,u,n.any),e.isError(a))return a}else{var c=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){var l=this._decodeTag(e,n.explicit);if(e.isError(l))return l;e=l}var d=e.offset;if(null===n.use&&null===n.choice){if(n.any)var c=e.save();var f=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(f))return f;n.any?i=e.raw(c):e=f}if(t&&t.track&&null!==n.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(r){r._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var h=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(h,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null!==n.key&&(null!==i||!0===a)?e.leaveKey(s,n.key,i):null!==s&&e.exitKey(s),i},l.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;if("seq"===e||"set"===e)return null;if("seqof"===e||"setof"===e)return this._decodeList(t,e,n.args[0],r);if(/str$/.test(e))return this._decodeStr(t,e,r);if("objid"===e&&n.args)return this._decodeObjid(t,n.args[0],n.args[1],r);if("objid"===e)return this._decodeObjid(t,null,null,r);if("gentime"===e||"utctime"===e)return this._decodeTime(t,e,r);if("null_"===e)return this._decodeNull(t,r);if("bool"===e)return this._decodeBool(t,r);else if("objDesc"===e)return this._decodeStr(t,e,r);else if("int"===e||"enum"===e)return this._decodeInt(t,n.args&&n.args[0],r);return null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return(Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i)?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},l.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},l.prototype._encodeValue=function(e,t,r){var i,o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new n);var i=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var a=null,s=!1;if(o.any)i=this._createEncoderBuffer(e);else if(o.choice)i=this._encodeChoice(e,t);else if(o.contains)a=this._getUse(o.contains,r)._encode(e,t),s=!0;else if(o.children)a=o.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!(o.args&&1===o.args.length))return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},u))}else null!==o.use?i=this._getUse(o.use,r)._encode(e,t):(a=this._encodePrimitive(o.tag,e),s=!0);if(!o.any&&null===o.choice){var c=null!==o.implicit?o.implicit:o.tag,l=null===o.implicit?"universal":"context";null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(i=this._encodeComposite(c,s,l,a))}return null!==o.explicit&&(i=this._encodeComposite(o.explicit,!1,"context",i)),i},l.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);else if("objDesc"===e)return this._encodeStr(t,e);else throw Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1293:function(e,t,r){var n=r(3782);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw Error(this.message)}catch(e){this.stack=e.stack}return this}},9791:function(e,t,r){var n=r(7335);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},7335:function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0),t[e[r]]=r}),t},n.der=r(9791)},2259:function(e,t,r){var n=r(3782),i=r(7160),o=i.base,a=i.bignum,s=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=(32&r)==0;if((31&r)==31){var o=r;for(r=0;(128&o)==128;){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;var a=s.tag[r];return{cls:n,primitive:i,tag:r,tagStr:a}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if((128&n)==0)return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6)}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,a.Node),c.prototype._encodeComposite=function(e,t,r,n){var o=d(e,t,r,this.reporter);if(n.length<128){var a=new i(2);return a[0]=o,a[1]=n.length,this._createEncoderBuffer([a,n])}for(var s=1,u=n.length;u>=256;u>>=8)s++;var a=new i(2+s);a[0]=o,a[1]=128|s;for(var u=1+s,c=n.length;c>0;u--,c>>=8)a[u]=255&c;return this._createEncoderBuffer([a,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var o=0,n=0;n=128;a>>=7)o++}for(var s=new i(o),u=s.length-1,n=e.length-1;n>=0;n--){var a=e[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var o=Array(n),a=o.length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=49&&a<=54?n|=a-49+10:a>=17&&a<=22?n|=a-17+10:n|=15&a}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,o,a=0;a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r,n,i=0;i=t;i-=6)n=a(e,i,i+6),this.words[r]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);i+6!==t&&(n=a(e,t,i+6),this.words[r]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,u=Math.min(o,o-a)+r,c=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u,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 f(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&u,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:c[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==u),this.toArrayLike(u,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i,o,a=this.byteLength(),s=r||Math.max(1,a);n(a<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var u="le"===t,c=new e(s),l=this.clone();if(u){for(o=0;!l.isZero();o++)i=l.andln(255),l.iushrn(8),c[o]=i;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,y=0|a[2],g=8191&y,b=y>>>13,v=0|a[3],w=8191&v,S=v>>>13,_=0|a[4],A=8191&_,E=_>>>13,k=0|a[5],M=8191&k,P=k>>>13,x=0|a[6],I=8191&x,T=x>>>13,C=0|a[7],O=8191&C,R=C>>>13,j=0|a[8],D=8191&j,N=j>>>13,L=0|a[9],U=8191&L,B=L>>>13,W=0|s[0],F=8191&W,H=W>>>13,K=0|s[1],z=8191&K,q=K>>>13,G=0|s[2],Z=8191&G,J=G>>>13,$=0|s[3],V=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],eu=8191&es,ec=es>>>13,el=0|s[8],ed=8191&el,ef=el>>>13,eh=0|s[9],ep=8191&eh,em=eh>>>13;r.negative=e.negative^t.negative,r.length=19;var ey=(c+(n=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(f,F)|0))<<13)|0;c=((o=Math.imul(f,H))+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(m,F)|0,o=Math.imul(m,H);var eg=(c+(n=n+Math.imul(d,z)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(f,z)|0))<<13)|0;c=((o=o+Math.imul(f,q)|0)+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,n=Math.imul(g,F),i=(i=Math.imul(g,H))+Math.imul(b,F)|0,o=Math.imul(b,H),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,q)|0;var eb=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,H))+Math.imul(S,F)|0,o=Math.imul(S,H),n=n+Math.imul(g,z)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,J)|0;var ev=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,H))+Math.imul(E,F)|0,o=Math.imul(E,H),n=n+Math.imul(w,z)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,q)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ew=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(M,F),i=(i=Math.imul(M,H))+Math.imul(P,F)|0,o=Math.imul(P,H),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,q)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var eS=(c+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(f,er)|0))<<13)|0;c=((o=o+Math.imul(f,en)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(I,F),i=(i=Math.imul(I,H))+Math.imul(T,F)|0,o=Math.imul(T,H),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,o=o+Math.imul(m,en)|0;var e_=(c+(n=n+Math.imul(d,eo)|0)|0)+((8191&(i=(i=i+Math.imul(d,ea)|0)+Math.imul(f,eo)|0))<<13)|0;c=((o=o+Math.imul(f,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,H))+Math.imul(R,F)|0,o=Math.imul(R,H),n=n+Math.imul(I,z)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,q)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(g,er)|0,i=(i=i+Math.imul(g,en)|0)+Math.imul(b,er)|0,o=o+Math.imul(b,en)|0,n=n+Math.imul(p,eo)|0,i=(i=i+Math.imul(p,ea)|0)+Math.imul(m,eo)|0,o=o+Math.imul(m,ea)|0;var eA=(c+(n=n+Math.imul(d,eu)|0)|0)+((8191&(i=(i=i+Math.imul(d,ec)|0)+Math.imul(f,eu)|0))<<13)|0;c=((o=o+Math.imul(f,ec)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(D,F),i=(i=Math.imul(D,H))+Math.imul(N,F)|0,o=Math.imul(N,H),n=n+Math.imul(O,z)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(S,er)|0,o=o+Math.imul(S,en)|0,n=n+Math.imul(g,eo)|0,i=(i=i+Math.imul(g,ea)|0)+Math.imul(b,eo)|0,o=o+Math.imul(b,ea)|0,n=n+Math.imul(p,eu)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,eu)|0,o=o+Math.imul(m,ec)|0;var eE=(c+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,ef)|0)+Math.imul(f,ed)|0))<<13)|0;c=((o=o+Math.imul(f,ef)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(U,F),i=(i=Math.imul(U,H))+Math.imul(B,F)|0,o=Math.imul(B,H),n=n+Math.imul(D,z)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(E,er)|0,o=o+Math.imul(E,en)|0,n=n+Math.imul(w,eo)|0,i=(i=i+Math.imul(w,ea)|0)+Math.imul(S,eo)|0,o=o+Math.imul(S,ea)|0,n=n+Math.imul(g,eu)|0,i=(i=i+Math.imul(g,ec)|0)+Math.imul(b,eu)|0,o=o+Math.imul(b,ec)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,ef)|0)+Math.imul(m,ed)|0,o=o+Math.imul(m,ef)|0;var ek=(c+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(f,ep)|0))<<13)|0;c=((o=o+Math.imul(f,em)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(P,er)|0,o=o+Math.imul(P,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(E,eo)|0,o=o+Math.imul(E,ea)|0,n=n+Math.imul(w,eu)|0,i=(i=i+Math.imul(w,ec)|0)+Math.imul(S,eu)|0,o=o+Math.imul(S,ec)|0,n=n+Math.imul(g,ed)|0,i=(i=i+Math.imul(g,ef)|0)+Math.imul(b,ed)|0,o=o+Math.imul(b,ef)|0;var eM=(c+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0))<<13)|0;c=((o=o+Math.imul(m,em)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,J))+Math.imul(B,Z)|0,o=Math.imul(B,J),n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,er)|0,i=(i=i+Math.imul(I,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(P,eo)|0,o=o+Math.imul(P,ea)|0,n=n+Math.imul(A,eu)|0,i=(i=i+Math.imul(A,ec)|0)+Math.imul(E,eu)|0,o=o+Math.imul(E,ec)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,ef)|0)+Math.imul(S,ed)|0,o=o+Math.imul(S,ef)|0;var eP=(c+(n=n+Math.imul(g,ep)|0)|0)+((8191&(i=(i=i+Math.imul(g,em)|0)+Math.imul(b,ep)|0))<<13)|0;c=((o=o+Math.imul(b,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Y))+Math.imul(B,V)|0,o=Math.imul(B,Y),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(R,er)|0,o=o+Math.imul(R,en)|0,n=n+Math.imul(I,eo)|0,i=(i=i+Math.imul(I,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(M,eu)|0,i=(i=i+Math.imul(M,ec)|0)+Math.imul(P,eu)|0,o=o+Math.imul(P,ec)|0,n=n+Math.imul(A,ed)|0,i=(i=i+Math.imul(A,ef)|0)+Math.imul(E,ed)|0,o=o+Math.imul(E,ef)|0;var ex=(c+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(S,ep)|0))<<13)|0;c=((o=o+Math.imul(S,em)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(N,er)|0,o=o+Math.imul(N,en)|0,n=n+Math.imul(O,eo)|0,i=(i=i+Math.imul(O,ea)|0)+Math.imul(R,eo)|0,o=o+Math.imul(R,ea)|0,n=n+Math.imul(I,eu)|0,i=(i=i+Math.imul(I,ec)|0)+Math.imul(T,eu)|0,o=o+Math.imul(T,ec)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,ef)|0)+Math.imul(P,ed)|0,o=o+Math.imul(P,ef)|0;var eI=(c+(n=n+Math.imul(A,ep)|0)|0)+((8191&(i=(i=i+Math.imul(A,em)|0)+Math.imul(E,ep)|0))<<13)|0;c=((o=o+Math.imul(E,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(U,er),i=(i=Math.imul(U,en))+Math.imul(B,er)|0,o=Math.imul(B,en),n=n+Math.imul(D,eo)|0,i=(i=i+Math.imul(D,ea)|0)+Math.imul(N,eo)|0,o=o+Math.imul(N,ea)|0,n=n+Math.imul(O,eu)|0,i=(i=i+Math.imul(O,ec)|0)+Math.imul(R,eu)|0,o=o+Math.imul(R,ec)|0,n=n+Math.imul(I,ed)|0,i=(i=i+Math.imul(I,ef)|0)+Math.imul(T,ed)|0,o=o+Math.imul(T,ef)|0;var eT=(c+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,em)|0)+Math.imul(P,ep)|0))<<13)|0;c=((o=o+Math.imul(P,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(U,eo),i=(i=Math.imul(U,ea))+Math.imul(B,eo)|0,o=Math.imul(B,ea),n=n+Math.imul(D,eu)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(N,eu)|0,o=o+Math.imul(N,ec)|0,n=n+Math.imul(O,ed)|0,i=(i=i+Math.imul(O,ef)|0)+Math.imul(R,ed)|0,o=o+Math.imul(R,ef)|0;var eC=(c+(n=n+Math.imul(I,ep)|0)|0)+((8191&(i=(i=i+Math.imul(I,em)|0)+Math.imul(T,ep)|0))<<13)|0;c=((o=o+Math.imul(T,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(U,eu),i=(i=Math.imul(U,ec))+Math.imul(B,eu)|0,o=Math.imul(B,ec),n=n+Math.imul(D,ed)|0,i=(i=i+Math.imul(D,ef)|0)+Math.imul(N,ed)|0,o=o+Math.imul(N,ef)|0;var eO=(c+(n=n+Math.imul(O,ep)|0)|0)+((8191&(i=(i=i+Math.imul(O,em)|0)+Math.imul(R,ep)|0))<<13)|0;c=((o=o+Math.imul(R,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(U,ed),i=(i=Math.imul(U,ef))+Math.imul(B,ed)|0,o=Math.imul(B,ef);var eR=(c+(n=n+Math.imul(D,ep)|0)|0)+((8191&(i=(i=i+Math.imul(D,em)|0)+Math.imul(N,ep)|0))<<13)|0;c=((o=o+Math.imul(N,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863;var ej=(c+(n=Math.imul(U,ep))|0)+((8191&(i=(i=Math.imul(U,em))+Math.imul(B,ep)|0))<<13)|0;return c=((o=Math.imul(B,em))+(i>>>13)|0)+(ej>>>26)|0,ej&=67108863,u[0]=ey,u[1]=eg,u[2]=eb,u[3]=ev,u[4]=ew,u[5]=eS,u[6]=e_,u[7]=eA,u[8]=eE,u[9]=ek,u[10]=eM,u[11]=eP,u[12]=ex,u[13]=eI,u[14]=eT,u[15]=eC,u[16]=eO,u[17]=eR,u[18]=ej,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):y(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=(i/67108864|0)+(o>>>26),this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=f(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var d=0|this.words[c];this.words[c]=l<<26-o|d>>>o,l=d&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var u=i.length-a.length;if("mod"!==t){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var c=0;c=0;d--){var f=(0|i.words[a.length+d])*67108864+(0|i.words[a.length+d-1]);for(f=Math.min(f/s|0,67108863),i._ishlnsubmul(a,f,d);0!==i.negative;)f--,i.negative=0,i._ishlnsubmul(a,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=f)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;(t.words[0]&h)==0&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,l=1;(r.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;(i.words[0]&f)==0&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=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=t0?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)},i(w,v),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new w;else if("p224"===e)t=new S;else if("p192"===e)t=new _;else if("p25519"===e)t=new A;else throw Error("Unknown prime "+e);return b[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,y=0;0!==m.cmp(s);y++)m=m.redSqr();n(y=0;i--){for(var l=t.words[i],d=c-1;d>=0;d--){var f=l>>d&1;if(a!==n[0]&&(a=this.sqr(a)),0===f&&0===s){u=0;continue}s<<=1,s|=f,(++u===r||0===i&&0===d)&&(a=this.mul(a,n[s]),u=0,s=0)}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.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):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},1670:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{l=r(4300).Buffer}catch(e){}function a(e,t,r){for(var i=0,o=Math.min(e.length,r),a=0,s=t;s=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,a|=u}return n(!(240&a),"Invalid character in "+e),i}function s(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a"}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,o,a=0;a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r,n,i=0;i=t;i-=6)n=a(e,i,i+6),this.words[r]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);i+6!==t&&(n=a(e,t,i+6),this.words[r]|=n<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,u=Math.min(o,o-a)+r,c=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c:o.prototype.inspect=c;var l,d=["","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"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:d[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},l&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function m(e){for(var t=Array(e.bitLength()),r=0;r>>i&1}return t}function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&u,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=p(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,y=0|a[2],g=8191&y,b=y>>>13,v=0|a[3],w=8191&v,S=v>>>13,_=0|a[4],A=8191&_,E=_>>>13,k=0|a[5],M=8191&k,P=k>>>13,x=0|a[6],I=8191&x,T=x>>>13,C=0|a[7],O=8191&C,R=C>>>13,j=0|a[8],D=8191&j,N=j>>>13,L=0|a[9],U=8191&L,B=L>>>13,W=0|s[0],F=8191&W,H=W>>>13,K=0|s[1],z=8191&K,q=K>>>13,G=0|s[2],Z=8191&G,J=G>>>13,$=0|s[3],V=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],eu=8191&es,ec=es>>>13,el=0|s[8],ed=8191&el,ef=el>>>13,eh=0|s[9],ep=8191&eh,em=eh>>>13;r.negative=e.negative^t.negative,r.length=19;var ey=(c+(n=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(f,F)|0))<<13)|0;c=((o=Math.imul(f,H))+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(m,F)|0,o=Math.imul(m,H);var eg=(c+(n=n+Math.imul(d,z)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(f,z)|0))<<13)|0;c=((o=o+Math.imul(f,q)|0)+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,n=Math.imul(g,F),i=(i=Math.imul(g,H))+Math.imul(b,F)|0,o=Math.imul(b,H),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,q)|0;var eb=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,H))+Math.imul(S,F)|0,o=Math.imul(S,H),n=n+Math.imul(g,z)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,J)|0;var ev=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,H))+Math.imul(E,F)|0,o=Math.imul(E,H),n=n+Math.imul(w,z)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,q)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ew=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(M,F),i=(i=Math.imul(M,H))+Math.imul(P,F)|0,o=Math.imul(P,H),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,q)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var eS=(c+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(f,er)|0))<<13)|0;c=((o=o+Math.imul(f,en)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(I,F),i=(i=Math.imul(I,H))+Math.imul(T,F)|0,o=Math.imul(T,H),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,o=o+Math.imul(m,en)|0;var e_=(c+(n=n+Math.imul(d,eo)|0)|0)+((8191&(i=(i=i+Math.imul(d,ea)|0)+Math.imul(f,eo)|0))<<13)|0;c=((o=o+Math.imul(f,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,H))+Math.imul(R,F)|0,o=Math.imul(R,H),n=n+Math.imul(I,z)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,q)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(g,er)|0,i=(i=i+Math.imul(g,en)|0)+Math.imul(b,er)|0,o=o+Math.imul(b,en)|0,n=n+Math.imul(p,eo)|0,i=(i=i+Math.imul(p,ea)|0)+Math.imul(m,eo)|0,o=o+Math.imul(m,ea)|0;var eA=(c+(n=n+Math.imul(d,eu)|0)|0)+((8191&(i=(i=i+Math.imul(d,ec)|0)+Math.imul(f,eu)|0))<<13)|0;c=((o=o+Math.imul(f,ec)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(D,F),i=(i=Math.imul(D,H))+Math.imul(N,F)|0,o=Math.imul(N,H),n=n+Math.imul(O,z)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(S,er)|0,o=o+Math.imul(S,en)|0,n=n+Math.imul(g,eo)|0,i=(i=i+Math.imul(g,ea)|0)+Math.imul(b,eo)|0,o=o+Math.imul(b,ea)|0,n=n+Math.imul(p,eu)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,eu)|0,o=o+Math.imul(m,ec)|0;var eE=(c+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,ef)|0)+Math.imul(f,ed)|0))<<13)|0;c=((o=o+Math.imul(f,ef)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(U,F),i=(i=Math.imul(U,H))+Math.imul(B,F)|0,o=Math.imul(B,H),n=n+Math.imul(D,z)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(E,er)|0,o=o+Math.imul(E,en)|0,n=n+Math.imul(w,eo)|0,i=(i=i+Math.imul(w,ea)|0)+Math.imul(S,eo)|0,o=o+Math.imul(S,ea)|0,n=n+Math.imul(g,eu)|0,i=(i=i+Math.imul(g,ec)|0)+Math.imul(b,eu)|0,o=o+Math.imul(b,ec)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,ef)|0)+Math.imul(m,ed)|0,o=o+Math.imul(m,ef)|0;var ek=(c+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(f,ep)|0))<<13)|0;c=((o=o+Math.imul(f,em)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(P,er)|0,o=o+Math.imul(P,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(E,eo)|0,o=o+Math.imul(E,ea)|0,n=n+Math.imul(w,eu)|0,i=(i=i+Math.imul(w,ec)|0)+Math.imul(S,eu)|0,o=o+Math.imul(S,ec)|0,n=n+Math.imul(g,ed)|0,i=(i=i+Math.imul(g,ef)|0)+Math.imul(b,ed)|0,o=o+Math.imul(b,ef)|0;var eM=(c+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0))<<13)|0;c=((o=o+Math.imul(m,em)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,J))+Math.imul(B,Z)|0,o=Math.imul(B,J),n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,er)|0,i=(i=i+Math.imul(I,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(P,eo)|0,o=o+Math.imul(P,ea)|0,n=n+Math.imul(A,eu)|0,i=(i=i+Math.imul(A,ec)|0)+Math.imul(E,eu)|0,o=o+Math.imul(E,ec)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,ef)|0)+Math.imul(S,ed)|0,o=o+Math.imul(S,ef)|0;var eP=(c+(n=n+Math.imul(g,ep)|0)|0)+((8191&(i=(i=i+Math.imul(g,em)|0)+Math.imul(b,ep)|0))<<13)|0;c=((o=o+Math.imul(b,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Y))+Math.imul(B,V)|0,o=Math.imul(B,Y),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(R,er)|0,o=o+Math.imul(R,en)|0,n=n+Math.imul(I,eo)|0,i=(i=i+Math.imul(I,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(M,eu)|0,i=(i=i+Math.imul(M,ec)|0)+Math.imul(P,eu)|0,o=o+Math.imul(P,ec)|0,n=n+Math.imul(A,ed)|0,i=(i=i+Math.imul(A,ef)|0)+Math.imul(E,ed)|0,o=o+Math.imul(E,ef)|0;var ex=(c+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(S,ep)|0))<<13)|0;c=((o=o+Math.imul(S,em)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(N,er)|0,o=o+Math.imul(N,en)|0,n=n+Math.imul(O,eo)|0,i=(i=i+Math.imul(O,ea)|0)+Math.imul(R,eo)|0,o=o+Math.imul(R,ea)|0,n=n+Math.imul(I,eu)|0,i=(i=i+Math.imul(I,ec)|0)+Math.imul(T,eu)|0,o=o+Math.imul(T,ec)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,ef)|0)+Math.imul(P,ed)|0,o=o+Math.imul(P,ef)|0;var eI=(c+(n=n+Math.imul(A,ep)|0)|0)+((8191&(i=(i=i+Math.imul(A,em)|0)+Math.imul(E,ep)|0))<<13)|0;c=((o=o+Math.imul(E,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(U,er),i=(i=Math.imul(U,en))+Math.imul(B,er)|0,o=Math.imul(B,en),n=n+Math.imul(D,eo)|0,i=(i=i+Math.imul(D,ea)|0)+Math.imul(N,eo)|0,o=o+Math.imul(N,ea)|0,n=n+Math.imul(O,eu)|0,i=(i=i+Math.imul(O,ec)|0)+Math.imul(R,eu)|0,o=o+Math.imul(R,ec)|0,n=n+Math.imul(I,ed)|0,i=(i=i+Math.imul(I,ef)|0)+Math.imul(T,ed)|0,o=o+Math.imul(T,ef)|0;var eT=(c+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,em)|0)+Math.imul(P,ep)|0))<<13)|0;c=((o=o+Math.imul(P,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(U,eo),i=(i=Math.imul(U,ea))+Math.imul(B,eo)|0,o=Math.imul(B,ea),n=n+Math.imul(D,eu)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(N,eu)|0,o=o+Math.imul(N,ec)|0,n=n+Math.imul(O,ed)|0,i=(i=i+Math.imul(O,ef)|0)+Math.imul(R,ed)|0,o=o+Math.imul(R,ef)|0;var eC=(c+(n=n+Math.imul(I,ep)|0)|0)+((8191&(i=(i=i+Math.imul(I,em)|0)+Math.imul(T,ep)|0))<<13)|0;c=((o=o+Math.imul(T,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(U,eu),i=(i=Math.imul(U,ec))+Math.imul(B,eu)|0,o=Math.imul(B,ec),n=n+Math.imul(D,ed)|0,i=(i=i+Math.imul(D,ef)|0)+Math.imul(N,ed)|0,o=o+Math.imul(N,ef)|0;var eO=(c+(n=n+Math.imul(O,ep)|0)|0)+((8191&(i=(i=i+Math.imul(O,em)|0)+Math.imul(R,ep)|0))<<13)|0;c=((o=o+Math.imul(R,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(U,ed),i=(i=Math.imul(U,ef))+Math.imul(B,ed)|0,o=Math.imul(B,ef);var eR=(c+(n=n+Math.imul(D,ep)|0)|0)+((8191&(i=(i=i+Math.imul(D,em)|0)+Math.imul(N,ep)|0))<<13)|0;c=((o=o+Math.imul(N,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863;var ej=(c+(n=Math.imul(U,ep))|0)+((8191&(i=(i=Math.imul(U,em))+Math.imul(B,ep)|0))<<13)|0;return c=((o=Math.imul(B,em))+(i>>>13)|0)+(ej>>>26)|0,ej&=67108863,u[0]=ey,u[1]=eg,u[2]=eb,u[3]=ev,u[4]=ew,u[5]=eS,u[6]=e_,u[7]=eA,u[8]=eE,u[9]=ek,u[10]=eM,u[11]=eP,u[12]=ex,u[13]=eI,u[14]=eT,u[15]=eC,u[16]=eO,u[17]=eR,u[18]=ej,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 v(e,t,r){return b(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(g=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?y(this,e,t):r<1024?b(this,e,t):v(this,e,t)},w.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=(o/67108864|0)+(a>>>26),this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=m(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var d=0|this.words[c];this.words[c]=l<<26-o|d>>>o,l=d&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var u=i.length-a.length;if("mod"!==t){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var c=0;c=0;d--){var f=(0|i.words[a.length+d])*67108864+(0|i.words[a.length+d-1]);for(f=Math.min(f/s|0,67108863),i._ishlnsubmul(a,f,d);0!==i.negative;)f--,i.negative=0,i._ishlnsubmul(a,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=f)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;(t.words[0]&h)==0&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,l=1;(r.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;(i.words[0]&f)==0&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new P(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},_.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=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(A,_),A.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(S[e])return S[e];if("k256"===e)t=new A;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else if("p25519"===e)t=new M;else throw Error("Unknown prime "+e);return S[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.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)},P.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},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,y=0;0!==m.cmp(s);y++)m=m.redSqr();n(y=0;i--){for(var l=t.words[i],d=c-1;d>=0;d--){var f=l>>d&1;if(a!==n[0]&&(a=this.sqr(a)),0===f&&0===s){u=0;continue}s<<=1,s|=f,(++u===r||0===i&&0===d)&&(a=this.mul(a,n[s]),u=0,s=0)}c=26}return a},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,P),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3500:function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^l[p>>>16&255]^d[m>>>8&255]^f[255&y]^t[g++],a=c[p>>>24]^l[m>>>16&255]^d[y>>>8&255]^f[255&h]^t[g++],s=c[m>>>24]^l[y>>>16&255]^d[h>>>8&255]^f[255&p]^t[g++],u=c[y>>>24]^l[h>>>16&255]^d[p>>>8&255]^f[255&m]^t[g++],h=o,p=a,m=s,y=u;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^t[g++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&h])^t[g++],[o>>>=0,a>>>=0,s=((n[m>>>24]<<24|n[y>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[g++])>>>0,u=((n[y>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[g++])>>>0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var l=e[a],d=e[l],f=e[d],h=257*e[c]^16843008*c;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*f^65537*d^257*l^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=l^e[e[e[f^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=(r+1)*4,i=[],o=0;o>>24,a=(u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a])^s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},6624:function(e,t,r){var n=r(1387),i=r(6911).Buffer,o=r(1043),a=r(3782),s=r(7225),u=r(4734),c=r(598);function l(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)throw Error("unable to decrypt data");for(var r=-1;++r16)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},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=p,t.createDecipheriv=h},2:function(e,t,r){var n=r(6370),i=r(6624),o=r(6911).Buffer,a=r(126),s=r(1043),u=r(1387),c=r(8368);function l(e,t,r){s.call(this),this._cache=new f,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(3782)(l,s),l.prototype._update=function(e){this._cache.add(e);for(var t,r,n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var d=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}function p(e,t){var r=n[e.toLowerCase()];if(!r)throw TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return h(e,i.key,i.iv)}l.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(d))throw this._cipher.scrub(),Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=o.concat([this.cache,e])},f.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},f.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=-520093696^r[0])}this.state=a(n)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=s},598:function(e){function t(e){for(var t,r=e.length;r--;)if(255===(t=e.readUInt8(r)))e.writeUInt8(0,r);else{t++,e.writeUInt8(t,r);break}}e.exports=t},9825:function(e,t,r){var n=r(4734);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;return e._prev=t,n(e._cipher.decryptBlock(t),r)}},321:function(e,t,r){var n=r(6911).Buffer,i=r(4734);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;)if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),e._cache.length<=t.length)i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i);else{a=n.concat([a,o(e,t,r)]);break}return a}},3147:function(e,t,r){var n=r(6911).Buffer;function i(e,t,r){for(var n,i,a,s=-1,u=8,c=0;++s>s%8,e._prev=o(e._prev,r?i:a);return c}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(o(t));return r}e.exports=s,s.getr=u},9276:function(e,t,r){e.exports=r(2908)},4078:function(e,t,r){var n=r(6911).Buffer,i=r(9739),o=r(3726),a=r(3782),s=r(9807),u=r(4013),c=r(2908);function l(e){o.Writable.call(this);var t=c[e];if(!t)throw Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){o.Writable.call(this);var t=c[e];if(!t)throw Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new l(e)}function h(e){return new d(e)}Object.keys(c).forEach(function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},l.prototype.sign=function(e,t){this.end();var r=s(this._hash.digest(),e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},a(d,o.Writable),d.prototype._write=function(e,t,r){this._hash.update(e),r()},d.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){return"string"==typeof t&&(t=n.from(t,r)),this.end(),u(t,this._hash.digest(),e,this._signType,this._tag)},e.exports={Sign:f,Verify:h,createSign:f,createVerify:h}},9807:function(e,t,r){var n=r(6911).Buffer,i=r(4873),o=r(7166),a=r(949).ec,s=r(1670),u=r(9902),c=r(9267);function l(e,t,r,i,a){var s=u(t);if(s.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw Error("wrong private key type");return d(e,s)}if("dsa"===s.type){if("dsa"!==i)throw Error("wrong private key type");return f(e,s,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw Error("wrong private key type");e=n.concat([a,e]);for(var c=s.modulus.byteLength(),l=[0,1];e.length+l.length+10&&r.ishrn(n),r}function y(e,t){e=(e=m(e,t)).mod(t);var r=n.from(e.toArray());if(r.length=e.cmpn(0)||e.cmp(t)>=t)throw Error("invalid sig")}e.exports=u},4734:function(e){e.exports=function(e,t){for(var r=Math.min(e.length,t.length),n=new i(r),o=0;or?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengths?t=e(t):t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return(e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t)?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],l=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var d=o.substitute(c,l),f=o.permute(d),h=a;a=(s^f)>>>0,s=h}o.rip(a,s,n,i)}},6159:function(e,t,r){"use strict";var n=r(3523),i=r(3782),o=r(9876),a=r(1016);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);"encrypt"===e?this.ciphers=[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:this.ciphers=[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},5334:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(var a=6;a>=0;a-=2){for(var s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(var s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(var a=4;a<8;a++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var a=1;a<=3;a++){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(var u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(var 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 n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){var o=e>>>18-6*i&63,a=n[64*i+o];r<<=4,r|=a}for(var i=0;i<4;i++){var o=t>>>18-6*i&63,a=n[256+64*i+o];r<<=4,r|=a}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(l).cmp(d);)r.iadd(h)}else for(;r.mod(o).cmp(f);)r.iadd(h);if(y(p=r.shrn(1))&&y(r)&&g(p)&&g(r)&&a.test(p)&&a.test(r))return r}}},949:function(e,t,r){"use strict";var n=t;n.version=r(2531).i8,n.utils=r(4401),n.rand=r(3500),n.curve=r(9359),n.curves=r(6226),n.ec=r(4088),n.eddsa=r(8511)},2727:function(e,t,r){"use strict";var n=r(711),i=r(4401),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw Error("Not implemented")},u.prototype.validate=function(){throw Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=u;t--)c=(c<<1)+n[t];a.push(c)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=i;f>0;f--){for(var u=0;u=0;c--){for(var t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,d=0;d=1;d-=2){var p=d-1,m=d;if(1!==s[p]||1!==s[m]){c[p]=o(r[p],s[p],this._bitLength),c[m]=o(r[m],s[m],this._bitLength),l=Math.max(c[p].length,l),l=Math.max(c[m].length,l);continue}var y=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(y[1]=t[p].add(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].add(t[m].neg())):(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[p],r[m]);l=Math.max(b[0].length,l),c[p]=Array(l),c[m]=Array(l);for(var v=0;v=0;d--){for(var E=0;d>=0;){for(var k=!0,v=0;v=0&&E++,_=_.dblp(E),d<0)break;for(var v=0;v0?f=u[v][M-1>>1]:M<0&&(f=u[v][-M-1>>1].neg()),_="affine"===f.type?_.mixedAdd(f):_.add(f))}}for(var d=0;d=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),l=i.redMul(s),d=a.redMul(o);return this.curve.point(u,c,d,l)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=this.curve._mulA(i),s=a.redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),t=s.redMul(a.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),c=s.redSub(u).redISub(u);e=n.redSub(i).redISub(o).redMul(c),t=s.redMul(a.redSub(o)),r=s.redMul(c)}}else{var a=i.redAdd(o),u=this.curve._mulC(this.z).redSqr(),c=a.redSub(u).redSub(u);e=this.curve._mulC(n.redISub(a)).redMul(c),t=this.curve._mulC(a).redMul(i.redISub(o)),r=a.redMul(c)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),l=s.redMul(u),d=o.redMul(u),f=a.redMul(s);return this.curve.point(c,l,f,d)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(d,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},9359:function(e,t,r){"use strict";var n=t;n.base=r(2727),n.short=r(4720),n.mont=r(6653),n.edwards=r(2705)},6653:function(e,t,r){"use strict";var n=r(711),i=r(3782),o=r(2727),a=r(4401);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},u.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},4720:function(e,t,r){"use strict";var n=r(4401),i=r(711),o=r(3782),a=r(2727),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var t,r,n,o=this._getEndoRoots(this.p);t=(t=0>o[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new i(1),m=new i(0),y=new i(0),g=new i(1),b=0;0!==f.cmpn(0);){var v=h.div(f);c=h.sub(v.mul(f)),l=y.sub(v.mul(p));var w=g.sub(v.mul(m));if(!n&&0>c.cmp(d))t=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++b)break;u=c,h=f,f=c,y=p,p=l,g=m,m=w}a=c.neg(),s=l;var S=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(S)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return(e=new i(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.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)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),d=n.redMul(c),f=u.redSqr().redIAdd(l).redISub(d).redISub(d),h=u.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),d=s.redSqr().redIAdd(c).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},l.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6226:function(e,t,r){"use strict";var n,i=t,o=r(7028),a=r(9359),s=r(4401).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(9702)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},4088:function(e,t,r){"use strict";var n=r(711),i=r(4910),o=r(4401),a=r(6226),s=r(3500),u=o.assert,c=r(4724),l=r(7526);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(u(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.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},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),f=0;;f++){var h=o.k?o.k(f):new n(c.generate(this.n.byteLength()));if(!(0>=(h=this._truncateToN(h,!0)).cmpn(1)||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var g=h.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),b^=1),new l({r:y,s:g,recoveryParam:b})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new l(t,"hex")).r,a=t.s;if(0>o.cmpn(1)||o.cmp(this.n)>=0||0>a.cmpn(1)||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick){var d=this.g.mulAdd(u,r.getPublic(),c);return!d.isInfinity()&&0===d.getX().umod(this.n).cmp(o)}var d=this.g.jmulAdd(u,r.getPublic(),c);return!d.isInfinity()&&d.eqXToP(o)},d.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,d=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),m=c.mul(h).umod(o);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw Error("Unable to find valid recovery factor")}},4724:function(e,t,r){"use strict";var n=r(711),i=r(4401).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},7526:function(e,t,r){"use strict";var n=r(711),i=r(4401),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o||o+r.place!==e.length||2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=u(e,r);if(!1===l||e.length!==l+r.place)return!1;var d=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},8511:function(e,t,r){"use strict";var n=r(7028),i=r(6226),o=r(4401),a=o.assert,s=o.parseBytes,u=r(9917),c=r(9314);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);var e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n}function u(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s=e.andln(3)+n&3,u=t.andln(3)+i&3;if(3===s&&(s=-1),3===u&&(u=-1),(1&s)==0)o=0;else{var c=e.andln(7)+n&7;o=(3===c||5===c)&&2===u?-s:s}if(r[0].push(o),(1&u)==0)a=0;else{var c=t.andln(7)+i&7;a=(3===c||5===c)&&2===s?-u:u}r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function c(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function l(e){return"string"==typeof e?n.toArray(e,"hex"):e}function d(e){return new i(e,"hex","le")}n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=s,n.getJSF=u,n.cachedProperty=c,n.parseBytes=l,n.intFromLE=d},8368:function(e,t,r){var n=r(6911).Buffer,i=r(3533);function o(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,c.length),c.copy(s,f,0,d),a-=d}if(d0){var h=u.length-o,p=Math.min(o,c.length-d);c.copy(u,h,d,d+p),o-=p}}return c.fill(0),{key:s,iv:u}}e.exports=o},9029:function(e,t,r){"use strict";var n=r(6911).Buffer,i=r(3726).Transform;function o(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw TypeError(t+" must be a string or a buffer")}function a(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(3782)(a,i),a.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(o(e,"Data"),this._finalized)throw Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=u,(u=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*u);return this},a.prototype._update=function(){throw Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw 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},a.prototype._digest=function(){throw Error("_digest is not implemented")},e.exports=a},7028:function(e,t,r){var n=t;n.utils=r(263),n.common=r(1330),n.sha=r(301),n.ripemd=r(3079),n.hmac=r(3092),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},1330:function(e,t,r){"use strict";var n=r(263),i=r(3523);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(o=8,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;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3}function d(e){return n(e,17)^n(e,19)^e>>>10}t.ft_1=i,t.ch32=o,t.maj32=a,t.p32=s,t.s0_256=u,t.s1_256=c,t.g0_256=l,t.g1_256=d},263:function(e,t,r){"use strict";var n=r(3523),i=r(3782);function o(e,t){return(64512&e.charCodeAt(t))==55296&&!(t<0)&&!(t+1>=e.length)&&(64512&e.charCodeAt(t+1))==56320}function a(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>6|192:(o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128):r[n++]=a>>12|224,r[n++]=a>>6&63|128),r[n++]=63&a|128)}}else for(i=0;i>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e,t){for(var r="",n=0;n>>0;return s}function h(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>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}function p(e,t){return e>>>t|e<<32-t}function m(e,t){return e<>>32-t}function y(e,t){return e+t>>>0}function g(e,t,r){return e+t+r>>>0}function b(e,t,r,n){return e+t+r+n>>>0}function v(e,t,r,n,i){return e+t+r+n+i>>>0}function w(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o}function S(e,t,r,n){return(t+n>>>0>>0}function _(e,t,r,n){return t+n>>>0}function A(e,t,r,n,i,o,a,s){var u,c=t;return e+r+i+a+(u=0+((c=c+n>>>0)>>0)>>0)>>0}function E(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function k(e,t,r,n,i,o,a,s,u,c){var l,d=t;return e+r+i+a+u+(l=0+((d=d+n>>>0)>>0)>>0)>>0)>>0}function M(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0}function P(e,t,r){return(t<<32-r|e>>>r)>>>0}function x(e,t,r){return(e<<32-r|t>>>r)>>>0}function I(e,t,r){return e>>>r}function T(e,t,r){return(e<<32-r|t>>>r)>>>0}t.inherits=i,t.toArray=a,t.toHex=s,t.htonl=u,t.toHex32=c,t.zero2=l,t.zero8=d,t.join32=f,t.split32=h,t.rotr32=p,t.rotl32=m,t.sum32=y,t.sum32_3=g,t.sum32_4=b,t.sum32_5=v,t.sum64=w,t.sum64_hi=S,t.sum64_lo=_,t.sum64_4_hi=A,t.sum64_4_lo=E,t.sum64_5_hi=k,t.sum64_5_lo=M,t.rotr64_hi=P,t.rotr64_lo=x,t.shr64_hi=I,t.shr64_lo=T},4910:function(e,t,r){"use strict";var n=r(7028),i=r(6545),o=r(3523);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),n=c(n,i,o,r,e[15],1236535329,22),r=l(r,n,i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),n=l(n,i,o,r,e[12],2368359562,20),r=d(r,n,i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),n=d(n,i,o,r,e[2],3299628645,23),r=f(r,n,i,o,e[0],4096336452,6),o=f(o,r,n,i,e[7],1126891415,10),i=f(i,o,r,n,e[14],2878612391,15),n=f(n,i,o,r,e[5],4237533241,21),r=f(r,n,i,o,e[12],1700485571,6),o=f(o,r,n,i,e[3],2399980690,10),i=f(i,o,r,n,e[10],4293915773,15),n=f(n,i,o,r,e[1],2240044497,21),r=f(r,n,i,o,e[8],1873313359,6),o=f(o,r,n,i,e[15],4264355552,10),i=f(i,o,r,n,e[6],2734768916,15),n=f(n,i,o,r,e[13],1309151649,21),r=f(r,n,i,o,e[4],4149444226,6),o=f(o,r,n,i,e[11],3174756917,10),i=f(i,o,r,n,e[2],718787259,15),n=f(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},1354:function(e,t,r){var n=r(711),i=r(3500);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=Math.ceil(e.bitLength()/8);do var r=new n(this.rand.generate(t));while(r.cmp(e)>=0);return r},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),l=s.toRed(o),d=!0;t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var h=f.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(l)){for(var p=1;p0;t--){var l=this._randrange(new n(2),a),d=e.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(c)){for(var h=1;h>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;rt||r!=r)throw TypeError("Bad key length")}},2127:function(e,t,r){var n={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},i=r(4873),o=r(6911).Buffer,a=r(5349),s=r(7007),u=r(5407);function c(e,t,r,c,l){a(r,c),e=u(e,s,"Password"),t=u(t,s,"Salt"),l=l||"sha1";var d=o.allocUnsafe(c),f=o.allocUnsafe(t.length+4);t.copy(f,0,0,t.length);for(var h=0,p=n[l],m=Math.ceil(c/p),y=1;y<=m;y++){f.writeUInt32BE(y,t.length);for(var g=i(l,e).update(f).digest(),b=g,v=1;v=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 Error("decryption error");return t.slice(i)}function h(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++ih||new a(t).cmp(u.modulus)>=0)throw Error("decryption error");o=r?c(new a(t),u):s(t,u);var p=l.alloc(h-o.length);if(o=l.concat([p,o],h),4===i)return d(u,o);if(1===i)return f(u,o,r);if(3===i)return o;throw Error("unknown padding")}},3995:function(e,t,r){var n=r(9902),i=r(7223),o=r(9739),a=r(5520),s=r(6386),u=r(711),c=r(1607),l=r(7166),d=r(6911).Buffer;function f(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(d.alloc(0)).digest(),l=c.length,f=2*l;if(n>r-f-2)throw Error("message too long");var h=d.alloc(r-n-f-2),p=r-l-1,m=i(l),y=s(d.concat([c,h,d.alloc(1,1),t],p),a(m,p)),g=s(m,a(y,l));return new u(d.concat([d.alloc(1),g,y],r))}function h(e,t,r){var n,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw Error("message too long");return n=r?d.alloc(o-i-3,255):p(o-i-3),new u(d.concat([d.from([0,r?1:2]),n,d.alloc(1),t],o))}function p(e){for(var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;n=0)throw Error("data too long for modulus")}else throw Error("unknown padding");return r?l(o,a):c(o,a)}},1607:function(e,t,r){var n=r(711),i=r(6911).Buffer;function o(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}e.exports=o},6386:function(e){e.exports=function(e,t){for(var r=e.length,n=-1;++na)throw RangeError("requested too many random bytes");var r=u.allocUnsafe(e);if(e>0){if(e>i)for(var n=0;nl||e<0)throw TypeError("offset must be a uint32");if(e>u||e>t)throw RangeError("offset out of range")}function f(e,t,r){if("number"!=typeof e||e!=e)throw TypeError("size must be a number");if(e>l||e<0)throw TypeError("size must be a uint32");if(e+t>r||e>u)throw RangeError("buffer too small")}function h(e,t,n,i){if(!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw TypeError('"cb" argument must be a function');return d(t,e.length),f(n,t,e.length),p(e,t,n,i)}function p(e,t,r,n){var i=new Uint8Array(e.buffer,t,r);if(c.getRandomValues(i),n){o.nextTick(function(){n(null,e)});return}return e}function m(e,t,n){if(void 0===t&&(t=0),!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');return d(t,e.length),void 0===n&&(n=e.length-t),f(n,t,e.length),p(e,t,n)}c&&c.getRandomValues?(t.randomFill=h,t.randomFillSync=m):(t.randomFill=i,t.randomFillSync=i)},4646:function(e){"use strict";let t={};function r(e,r,n){function i(e,t,n){return"string"==typeof r?r:r(e,t,n)}n||(n=Error);class o extends n{constructor(e,t,r){super(i(e,t,r))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,u;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))u=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";u=`The "${e}" ${r} ${s} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},2403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(1709),a=r(7337);r(3782)(l,i);for(var s=n(a.prototype),u=0;u0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=p(t)),n)s.endEmitted?k(e,new E):C(e,s,t,!0);else if(s.ended)k(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):B(e,s)):C(e,s,t,!1)}}else n||(s.reading=!1,B(e,s));return!s.ended&&(s.length=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function D(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=j(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function N(e,t){if(a("onEofChunk"),!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,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,U(e)))}}function L(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(U,e))}function U(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e)}function B(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(W,e,t))}function W(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){a("readable nexttick read 0"),e.read(0)}function z(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(q,e,t))}function q(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0)}function G(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function Z(e,t){var r;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)}function J(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick($,t,e))}function $(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function V(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?J(this):L(this),null;if(0===(e=D(e,r))&&r.ended)return 0===r.length&&J(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e0?Z(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&&J(this)),null!==t&&this.emit("data",t),t},I.prototype._read=function(e){k(this,new A("_read()"))},I.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,a("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end||e===o.stdout||e===o.stderr?g:u;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function u(){a("onend"),e.end()}n.endEmitted?o.nextTick(i):r.once("end",i),e.on("unpipe",s);var c=F(r);e.on("drain",c);var d=!1;function f(){a("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}function h(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==V(n.pipes,e))&&!d&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){a("onerror",t),g(),e.removeListener("error",p),0===l(e,"error")&&k(e,t)}function m(){e.removeListener("finish",y),g()}function y(){a("onfinish"),e.removeListener("close",m),g()}function g(){a("unpipe"),r.unpipe(e)}return r.on("data",h),P(e,"error",p),e.once("close",m),e.once("finish",y),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},I.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;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?L(this):n.reading||o.nextTick(K,this)),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(H,this),r},I.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&o.nextTick(H,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,z(this,e)),e.paused=!1,this},I.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("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){a("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-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new b("_write()"))},x.prototype._writev=null,x.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||z(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=p.destroy,x.prototype._undestroy=p.undestroy,x.prototype._destroy=function(e,t){t(e)}},6871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,a=r(9698),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[d]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function y(e){o.nextTick(m,e)}function g(e,t){return function(r,n){e.then(function(){if(t[l]){r(p(void 0,!0));return}t[f](r,n)},n)}}var b=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((n(i={get stream(){return this[h]},next:function(){var e,t=this,r=this[c];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise(function(e,r){o.nextTick(function(){t[c]?r(t[c]):e(p(void 0,!0))})});var n=this[d];if(n)e=new Promise(g(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(p(i,!1));e=new Promise(this[f])}return this[d]=e,e}},Symbol.asyncIterator,function(){return this}),n(i,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){if(e){r(e);return}t(p(void 0,!0))})})}),i),b),w=function(e){var t,r=Object.create(v,(n(t={},h,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,l,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[h].read();n?(r[d]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[d]=null,r[s]=null,r[u]=null,t(e)),r[c]=e;return}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0}),e.on("readable",y.bind(null,r)),r};e.exports=w},4379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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 c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,n=0;r;)f(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.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=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},7025:function(e){"use strict";function t(e,t){var i=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(a,this,e)):o.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?i._writableState?i._writableState.errorEmitted?o.nextTick(n,i):(i._writableState.errorEmitted=!0,o.nextTick(r,i,e)):o.nextTick(r,i,e):t?(o.nextTick(n,i),t(e)):o.nextTick(n,i)})),this}function r(e,t){a(e,t),n(e)}function n(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function i(){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)}function a(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:t,undestroy:i,errorOrDestroy:s}},9698:function(e,t,r){"use strict";var n=r(4646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(d),a||(o.forEach(d),i(e))})});return r.reduce(f)}e.exports=p},6776:function(e,t,r){"use strict";var n=r(4646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},4678:function(e,t,r){e.exports=r(2781)},3726:function(e,t,r){var n=r(2781);"disable"===o.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(1709)).Stream=n||t,t.Readable=t,t.Writable=r(7337),t.Duplex=r(2403),t.Transform=r(1170),t.PassThrough=r(7889),t.finished=r(9698),t.pipeline=r(8442))},3225:function(e,t,r){"use strict";var n=r(4300).Buffer,i=r(3782),o=r(9029),a=Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function m(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e,t,r=a,n=0;n<16;++n)r[n]=this._block.readInt32LE(4*n);for(var i=0|this._a,o=0|this._b,h=0|this._c,w=0|this._d,S=0|this._e,_=0|this._a,A=0|this._b,E=0|this._c,k=0|this._d,M=0|this._e,P=0;P<80;P+=1)P<16?(e=m(i,o,h,w,S,r[s[P]],d[0],c[P]),t=v(_,A,E,k,M,r[u[P]],f[0],l[P])):P<32?(e=y(i,o,h,w,S,r[s[P]],d[1],c[P]),t=b(_,A,E,k,M,r[u[P]],f[1],l[P])):P<48?(e=g(i,o,h,w,S,r[s[P]],d[2],c[P]),t=g(_,A,E,k,M,r[u[P]],f[2],l[P])):P<64?(e=b(i,o,h,w,S,r[s[P]],d[3],c[P]),t=y(_,A,E,k,M,r[u[P]],f[3],l[P])):(e=v(i,o,h,w,S,r[s[P]],d[4],c[P]),t=m(_,A,E,k,M,r[u[P]],f[4],l[P])),i=S,S=w,w=p(h,10),h=o,o=e,_=M,M=k,k=p(E,10),E=A,A=t;var x=this._b+h+k|0;this._b=this._c+w+M|0,this._c=this._d+S+_|0,this._d=this._e+i+A|0,this._e=this._a+o+E|0,this._a=x},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},5055:function(e,t,r){var n=r(4300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},6911:function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(4300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},2858:function(e,t,r){var n=r(6911).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=i},4371:function(e,t,r){var n=e.exports=function(e){var t=n[e=e.toLowerCase()];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4018),n.sha1=r(4179),n.sha224=r(532),n.sha256=r(1843),n.sha384=r(7455),n.sha512=r(9934)},4018:function(e,t,r){var n=r(3782),i=r(2858),o=r(6911).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var f=0;f<80;++f){var h=~~(f/20),p=c(r)+d(h,n,i,o)+s+t[f]+a[h]|0;s=o,o=i,i=l(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},4179:function(e,t,r){var n=r(3782),i=r(2858),o=r(6911).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<1|e>>>31}function l(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=c(t[u-3]^t[u-8]^t[u-14]^t[u-16]);for(var h=0;h<80;++h){var p=~~(h/20),m=l(r)+f(p,n,i,o)+s+t[h]+a[p]|0;s=o,o=i,i=d(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},532:function(e,t,r){var n=r(3782),i=r(1843),o=r(2858),a=r(6911).Buffer,s=Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},1843:function(e,t,r){var n=r(3782),i=r(2858),o=r(6911).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)t[g]=e.readInt32BE(4*g);for(;g<64;++g)t[g]=p(t[g-2])+t[g-7]+h(t[g-15])+t[g-16]|0;for(var b=0;b<64;++b){var v=y+f(s)+c(s,u,m)+a[b]+t[b]|0,w=d(r)+l(r,n,i)|0;y=m,m=u,u=s,s=o+v|0,o=i,i=n,n=r,r=v+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},7455:function(e,t,r){var n=r(3782),i=r(9934),o=r(2858),a=r(6911).Buffer,s=Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},9934:function(e,t,r){var n=r(3782),i=r(2858),o=r(6911).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,S=0|this._bl,_=0|this._cl,A=0|this._dl,E=0|this._el,k=0|this._fl,M=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var I=t[x-30],T=t[x-30+1],C=h(I,T),O=p(T,I),R=m(I=t[x-4],T=t[x-4+1]),j=y(T,I),D=t[x-14],N=t[x-14+1],L=t[x-32],U=t[x-32+1],B=O+N|0,W=C+D+g(B,O)|0;W=(W=W+R+g(B=B+j|0,j)|0)+L+g(B=B+U|0,U)|0,t[x]=W,t[x+1]=B}for(var F=0;F<160;F+=2){W=t[F],B=t[F+1];var H=l(r,n,i),K=l(w,S,_),z=d(r,w),q=d(w,r),G=f(s,E),Z=f(E,s),J=a[F],$=a[F+1],V=c(s,u,b),Y=c(E,k,M),X=P+Z|0,Q=v+G+g(X,P)|0;Q=(Q=(Q=Q+V+g(X=X+Y|0,Y)|0)+J+g(X=X+$|0,$)|0)+W+g(X=X+B|0,B)|0;var ee=q+K|0,et=z+H+g(ee,q)|0;v=b,P=M,b=u,M=k,u=s,k=E,s=o+Q+g(E=A+X|0,A)|0,o=i,A=_,i=n,_=S,n=r,S=w,r=Q+et+g(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+_|0,this._dl=this._dl+A|0,this._el=this._el+E|0,this._fl=this._fl+k|0,this._gl=this._gl+M|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,S)|0,this._ch=this._ch+i+g(this._cl,_)|0,this._dh=this._dh+o+g(this._dl,A)|0,this._eh=this._eh+s+g(this._el,E)|0,this._fh=this._fh+u+g(this._fl,k)|0,this._gh=this._gh+b+g(this._gl,M)|0,this._hh=this._hh+v+g(this._hl,P)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},3704:function(e,t,r){"use strict";var n=r(5055).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)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}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=y,this.end=g,t=3;break;default:this.write=b,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(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)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(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 m(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 y(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 g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return rString(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,u;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))u=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";u=`The "${e}" ${r} ${s} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(709),a=r(337);r(782)(l,o);for(var s=n(a.prototype),u=0;u0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=p(t)),n)s.endEmitted?k(e,new E):C(e,s,t,!0);else if(s.ended)k(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):B(e,s)):C(e,s,t,!1)}}else n||(s.reading=!1,B(e,s));return!s.ended&&(s.length=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function D(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=j(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function N(e,t){if(a("onEofChunk"),!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,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,U(e)))}}function L(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(U,e))}function U(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e)}function B(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(W,e,t))}function W(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){a("readable nexttick read 0"),e.read(0)}function z(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(q,e,t))}function q(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0)}function G(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function Z(e,t){var r;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)}function J(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick($,t,e))}function $(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function V(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?J(this):L(this),null;if(0===(e=D(e,r))&&r.ended)return 0===r.length&&J(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e0?Z(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&&J(this)),null!==t&&this.emit("data",t),t},I.prototype._read=function(e){k(this,new A("_read()"))},I.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,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?g:u;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function u(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var c=F(r);e.on("drain",c);var d=!1;function f(){a("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}function h(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==V(n.pipes,e))&&!d&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){a("onerror",t),g(),e.removeListener("error",p),0===l(e,"error")&&k(e,t)}function m(){e.removeListener("finish",y),g()}function y(){a("onfinish"),e.removeListener("close",m),g()}function g(){a("unpipe"),r.unpipe(e)}return r.on("data",h),P(e,"error",p),e.once("close",m),e.once("finish",y),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},I.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;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?L(this):n.reading||i.nextTick(K,this)),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(H,this),r},I.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(H,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,z(this,e)),e.paused=!1,this},I.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("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){a("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-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new b("_write()"))},x.prototype._writev=null,x.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||z(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=p.destroy,x.prototype._undestroy=p.undestroy,x.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[d]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function y(e){i.nextTick(m,e)}function g(e,t){return function(r,n){e.then(function(){if(t[l]){r(p(void 0,!0));return}t[f](r,n)},n)}}var b=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((n(o={get stream(){return this[h]},next:function(){var e,t=this,r=this[c];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[c]?r(t[c]):e(p(void 0,!0))})});var n=this[d];if(n)e=new Promise(g(n,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));e=new Promise(this[f])}return this[d]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){if(e){r(e);return}t(p(void 0,!0))})})}),o),b),w=function(e){var t,r=Object.create(v,(n(t={},h,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,l,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[h].read();n?(r[d]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[d]=null,r[s]=null,r[u]=null,t(e)),r[c]=e;return}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0}),e.on("readable",y.bind(null,r)),r};e.exports=w},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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 c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,n=0;r;)f(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.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=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){"use strict";function t(e,t){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,e)):i.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?o._writableState?o._writableState.errorEmitted?i.nextTick(n,o):(o._writableState.errorEmitted=!0,i.nextTick(r,o,e)):i.nextTick(r,o,e):t?(i.nextTick(n,o),t(e)):i.nextTick(n,o)})),this}function r(e,t){a(e,t),n(e)}function n(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function o(){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)}function a(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:t,undestroy:o,errorOrDestroy:s}},698:function(e,t,r){"use strict";var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(d),a||(o.forEach(d),i(e))})});return r.reduce(f)}e.exports=p},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)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}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=y,this.end=g,t=3;break;default:this.write=b,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(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)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(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 m(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 y(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 g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r-1?i(r):r}},139:function(e,t,r){"use strict";var n=r(174),i=r(925),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=P(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],S(r,w([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=v(c,p),c=c[p];h&&!l&&(m[s]=c)}}return c}},925:function(e,t,r){"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},l=u?function(){try{return arguments.callee,c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,d=r(115)(),f=r(504)(),h=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},m="undefined"!=typeof Uint8Array&&h?h(Uint8Array):n,y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(e){var g=h(h(e));y["%Error.prototype%"]=g}var b=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return y[t]=r,r},v={"%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"]},w=r(174),S=r(101),_=w.call(Function.call,Array.prototype.concat),A=w.call(Function.apply,Array.prototype.splice),E=w.call(Function.call,String.prototype.replace),k=w.call(Function.call,String.prototype.slice),M=w.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,I=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,P,function(e,t,r,i){n[n.length]=r?E(i,x,"$1"):t||e}),n},T=function(e,t){var r,n=e;if(S(v,n)&&(n="%"+(r=v[n])[0]+"%"),S(y,n)){var o=y[n];if(o===p&&(o=b(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],A(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=S(c,p),c=c[p];h&&!l&&(y[s]=c)}}return c}},504:function(e){"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},942:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773:function(e){"use strict";e.exports=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||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832:function(e){"use strict";e.exports=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||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},101:function(e,t,r){"use strict";var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),u=n(942)()&&"symbol"==typeof Symbol.toStringTag,c=o(),l=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1)}},369:function(e){e.exports=function(e){return e instanceof i}},584:function(e,t,r){"use strict";var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function y(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch}function b(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||F(e)}function v(e){return"Uint8Array"===o(e)}function w(e){return"Uint8ClampedArray"===o(e)}function S(e){return"Uint16Array"===o(e)}function _(e){return"Uint32Array"===o(e)}function A(e){return"Int8Array"===o(e)}function E(e){return"Int16Array"===o(e)}function k(e){return"Int32Array"===o(e)}function M(e){return"Float32Array"===o(e)}function P(e){return"Float64Array"===o(e)}function x(e){return"BigInt64Array"===o(e)}function I(e){return"BigUint64Array"===o(e)}function T(e){return"[object Map]"===l(e)}function C(e){return"undefined"!=typeof Map&&(T.working?T(e):e instanceof Map)}function O(e){return"[object Set]"===l(e)}function R(e){return"undefined"!=typeof Set&&(O.working?O(e):e instanceof Set)}function j(e){return"[object WeakMap]"===l(e)}function D(e){return"undefined"!=typeof WeakMap&&(j.working?j(e):e instanceof WeakMap)}function N(e){return"[object WeakSet]"===l(e)}function L(e){return N(e)}function U(e){return"[object ArrayBuffer]"===l(e)}function B(e){return"undefined"!=typeof ArrayBuffer&&(U.working?U(e):e instanceof ArrayBuffer)}function W(e){return"[object DataView]"===l(e)}function F(e){return"undefined"!=typeof DataView&&(W.working?W(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=g,t.isArrayBufferView=b,t.isUint8Array=v,t.isUint8ClampedArray=w,t.isUint16Array=S,t.isUint32Array=_,t.isInt8Array=A,t.isInt16Array=E,t.isInt32Array=k,t.isFloat32Array=M,t.isFloat64Array=P,t.isBigInt64Array=x,t.isBigUint64Array=I,T.working="undefined"!=typeof Map&&T(new Map),t.isMap=C,O.working="undefined"!=typeof Set&&O(new Set),t.isSet=R,j.working="undefined"!=typeof WeakMap&&j(new WeakMap),t.isWeakMap=D,N.working="undefined"!=typeof WeakSet&&N(new WeakSet),t.isWeakSet=L,U.working="undefined"!=typeof ArrayBuffer&&U(new ArrayBuffer),t.isArrayBuffer=B,W.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&W(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=F;var H="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function K(e){return"[object SharedArrayBuffer]"===l(e)}function z(e){return void 0!==H&&(void 0===K.working&&(K.working=K(new H)),K.working?K(e):e instanceof H)}function q(e){return"[object AsyncFunction]"===l(e)}function G(e){return"[object Map Iterator]"===l(e)}function Z(e){return"[object Set Iterator]"===l(e)}function J(e){return"[object Generator]"===l(e)}function $(e){return"[object WebAssembly.Module]"===l(e)}function V(e){return y(e,d)}function Y(e){return y(e,f)}function X(e){return y(e,h)}function Q(e){return u&&y(e,p)}function ee(e){return c&&y(e,m)}function et(e){return V(e)||Y(e)||X(e)||Q(e)||ee(e)}function er(e){return"undefined"!=typeof Uint8Array&&(B(e)||z(e))}t.isSharedArrayBuffer=z,t.isAsyncFunction=q,t.isMapIterator=G,t.isSetIterator=Z,t.isGeneratorObject=J,t.isWebAssemblyCompiledModule=$,t.isNumberObject=V,t.isStringObject=Y,t.isBooleanObject=X,t.isBigIntObject=Q,t.isSymbolObject=ee,t.isBoxedPrimitive=et,t.isAnyArrayBuffer=er,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),w(r)?n.showHidden=r:r&&t._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=l),h(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"\x1b["+c.colors[r][0]+"m"+e+"\x1b["+c.colors[r][1]+"m":e}function d(e,t){return e}function f(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function h(e,r,n){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return E(o)||(o=h(e,o,n)),o}var a=p(e,r);if(a)return a;var s=Object.keys(r),u=f(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),T(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return m(r);if(0===s.length){if(C(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(P(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(I(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return m(r)}var l="",d=!1,w=["{","}"];return(v(r)&&(d=!0,w=["[","]"]),C(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),P(r)&&(l=" "+RegExp.prototype.toString.call(r)),I(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+m(r)),0!==s.length||d&&0!=r.length)?n<0?P(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),i=d?y(e,r,n,u,s):s.map(function(t){return g(e,r,n,u,t,d)}),e.seen.pop(),b(i,l,w)):w[0]+l+w[1]}function p(e,t){if(M(t))return e.stylize("undefined","undefined");if(E(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return A(t)?e.stylize(""+t,"number"):w(t)?e.stylize(""+t,"boolean"):S(t)?e.stylize("null","null"):void 0}function m(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,i){for(var o=[],a=0,s=t.length;ae.seen.indexOf(u.value)?(s=S(r)?h(e,u.value,null):h(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 b(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function v(e){return Array.isArray(e)}function w(e){return"boolean"==typeof e}function S(e){return null===e}function _(e){return null==e}function A(e){return"number"==typeof e}function E(e){return"string"==typeof e}function k(e){return"symbol"==typeof e}function M(e){return void 0===e}function P(e){return x(e)&&"[object RegExp]"===R(e)}function x(e){return"object"==typeof e&&null!==e}function I(e){return x(e)&&"[object Date]"===R(e)}function T(e){return x(e)&&("[object Error]"===R(e)||e instanceof Error)}function C(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function R(e){return Object.prototype.toString.call(e)}function j(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()]){if(s.test(e)){var r=o.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){}}return a[e]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=v,t.isBoolean=w,t.isNull=S,t.isNullOrUndefined=_,t.isNumber=A,t.isString=E,t.isSymbol=k,t.isUndefined=M,t.isRegExp=P,t.types.isRegExp=P,t.isObject=x,t.isDate=I,t.types.isDate=I,t.isError=T,t.types.isNativeError=T,t.isFunction=C,t.isPrimitive=O,t.isBuffer=r(369);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var e=new Date,t=[j(e.getHours()),j(e.getMinutes()),j(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",N(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var U="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function B(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function W(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r0&&!i.call(e,0))for(var h=0;h0)for(var m=0;m=0&&"[object Function]"===t.call(e.callee)),n}},63931:function(e){"use strict";e.exports=()=>{let e={};return e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r}),e}},70046:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}function u(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c=[],l=!1,d=-1;function f(){l&&n&&(l=!1,n.length?c=n.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(n=c,c=[];++d1)for(var r=1;r */var n=r(48764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},67771:function(e,t,r){"use strict";var n=r(56633),i=r(12296),o=r(31044)(),a=r(27296),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},83623:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(n=d[0],A(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var b=u(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=S(c,p),c=c[p];h&&!l&&(y[s]=c)}}return c}},32553:function(e,t,r){"use strict";var n=r(89509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)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}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=y,this.end=g,t=3;break;default:this.write=b,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function d(e){var t=this.lastTotal-this.lastNeed,r=l(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)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var r=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(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 m(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 y(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 g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r0?2===a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,u):this[a[0]]=a[1]:3===a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=u?u.replace(a[1],a[2]):void 0:this[a[0]]=u?a[1].call(this,u,a[2]):void 0:4===a.length&&(this[a[0]]=u?a[3].call(this,u.replace(a[1],a[2])):o):this[a]=u||o;l+=2}},et=function(e,t){for(var r in t)if(typeof t[r]===d&&t[r].length>0){for(var n=0;n2&&(e[p]="iPad",e[y]=_),e},this.getEngine=function(){var e={};return e[m]=o,e[b]=o,ee.call(e,n,u.engine),e},this.getOS=function(){var e={};return e[m]=o,e[b]=o,ee.call(e,n,u.os),w&&!e[m]&&a&&"Unknown"!=a.platform&&(e[m]=a.platform.replace(/chrome os/i,G).replace(/macos/i,Z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===f&&e.length>M?Q(e,M):e,this},this.setUA(n),this};ei.VERSION=a,ei.BROWSER=$([m,b,h]),ei.CPU=$([v]),ei.DEVICE=$([p,g,y,w,S,A,_,E,k]),ei.ENGINE=ei.OS=$([m,b]),typeof t!==l?("object"!==l&&e.exports&&(t=e.exports=ei),t.UAParser=ei):"function"===c&&r.amdO?o!==(n=(function(){return ei}).call(t,r,t,e))&&(e.exports=n):typeof i!==l&&(i.UAParser=ei);var eo=typeof i!==l&&(i.jQuery||i.Zepto);if(eo&&!eo.ua){var ea=new ei;eo.ua=ea.getResult(),eo.ua.get=function(){return ea.getUA()},eo.ua.set=function(e){ea.setUA(e);var t=ea.getResult();for(var r in t)eo.ua[r]=t[r]}}}("object"==typeof window?window:this)},57632:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return c}});var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o=new Uint8Array(16);function a(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}let s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function u(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}var c=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let n=(e=e||{}).random||(e.rng||a)();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 u(n)}},89555:function(e,t,r){"use strict";r.d(t,{ag:function(){return g}});let n=e=>"string"==typeof e,i=e=>"function"==typeof e,o=new Map;function a(e){return[...Array.isArray(e)?e:[e],"en"]}function s(e,t,r){let i=a(e);return l(()=>d("date",i,r),()=>new Intl.DateTimeFormat(i,r)).format(n(t)?new Date(t):t)}function u(e,t,r){let n=a(e);return l(()=>d("number",n,r),()=>new Intl.NumberFormat(n,r)).format(t)}function c(e,t,r,{offset:n=0,...i}){let o=a(e),s=t?l(()=>d("plural-ordinal",o),()=>new Intl.PluralRules(o,{type:"ordinal"})):l(()=>d("plural-cardinal",o),()=>new Intl.PluralRules(o,{type:"cardinal"}));return i[r]??i[s.select(r-n)]??i.other}function l(e,t){let r=e(),n=o.get(r);return n||(n=t(),o.set(r,n)),n}function d(e,t,r){let n=t.join("-");return`${e}-${n}-${JSON.stringify(r)}`}let f=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,h=(e,t,r={})=>{t=t||e;let i=e=>n(e)?r[e]||{style:e}:e,o=(e,n)=>{let o=Object.keys(r).length?i("number"):{},a=u(t,e,o);return n.replace("#",a)};return{plural:(e,r)=>{let{offset:n=0}=r,i=c(t,!1,e,r);return o(e-n,i)},selectordinal:(e,r)=>{let{offset:n=0}=r,i=c(t,!0,e,r);return o(e-n,i)},select:(e,t)=>t[e]??t.other,number:(e,r)=>u(t,e,i(r)),date:(e,r)=>s(t,e,i(r)),undefined:e=>e}};function p(e,t,r){return(i,o={})=>{let a=h(t,r,o),s=e=>Array.isArray(e)?e.reduce((e,t)=>{if(n(t))return e+t;let[r,o,u]=t,c={};null==u||n(u)?c=u:Object.keys(u).forEach(e=>{c[e]=s(u[e])});let l=a[o](i[r],c);return null==l?e:e+l},""):e,u=s(e);return n(u)&&f.test(u)?JSON.parse(`"${u.trim()}"`):n(u)?u.trim():u}}class m{constructor(){this._events={}}on(e,t){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){if(!this._hasEvent(e))return;let r=this._events[e].indexOf(t);~r&&this._events[e].splice(r,1)}emit(e,...t){this._hasEvent(e)&&this._events[e].map(e=>e.apply(this,t))}_hasEvent(e){return Array.isArray(this._events[e])}}class y extends m{constructor(e){super(),this.t=this._.bind(this),this._messages={},this._localeData={},null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),(null!=e.locale||null!=e.locales)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){null==this._localeData[e]?this._localeData[e]=t:Object.assign(this._localeData[e],t)}loadLocaleData(e,t){null!=t?this._loadLocaleData(e,t):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,t){null==this._messages[e]?this._messages[e]=t:Object.assign(this._messages[e],t)}load(e,t){null!=t?this._load(e,t):Object.keys(e).forEach(t=>this._load(t,e[t])),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:r}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t={},{message:r,formats:o}={}){n(e)||(t=e.values||t,r=e.message,e=e.id);let a=!this.messages[e],s=this._missing;if(s&&a)return i(s)?s(this._locale,e):s;a&&this.emit("missing",{id:e,locale:this._locale});let u=this.messages[e]||r||e;return n(u)&&f.test(u)?JSON.parse(`"${u}"`):n(u)?u:p(u,this._locale,this._locales)(t,o)}date(e,t){return s(this._locales||this._locale,e,t)}number(e,t){return u(this._locales||this._locale,e,t)}}let g=function(e={}){return new y(e)}()},4361:function(e,t,r){"use strict";r.d(t,{bd:function(){return a},cC:function(){return h},mV:function(){return o}});var n=r(67294);let i=n.createContext(null);function o(){return n.useContext(i)}let a=({i18n:e,defaultComponent:t,children:r})=>{let o=n.useRef(e.locale),a=n.useCallback(()=>({i18n:e,defaultComponent:t}),[e,t]),[s,u]=n.useState(a());return(n.useEffect(()=>{let t=()=>{o.current=e.locale,u(a())},r=e.on("change",t);return o.current!==e.locale&&t(),r},[e,a]),o.current)?n.createElement(i.Provider,{value:s},r):null},s=/<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/,u=/(?:\r\n|\r|\n)/g,c={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0};function l(e,t={}){let r=f(0,"$lingui$"),i=e.replace(u,"").split(s);if(1===i.length)return e;let o=[],a=i.shift();for(let[e,s,u]of(a&&o.push(a),d(i))){let i=t[e];(!i||c[i.type]&&s)&&(i?console.error(`${i.type} is a void element tag therefore it must have no children`):console.error(`Can't use element at index '${e}' as it is not declared in the original translation`),i=n.createElement(n.Fragment)),Array.isArray(i)&&(i=n.createElement(n.Fragment,{},i)),o.push(n.cloneElement(i,{key:r()},s?l(s,t):i.props.children)),u&&o.push(u)}return o}function d(e){if(!e.length)return[];let[t,r,n,i]=e.slice(0,4);return[[t||n,r||"",i]].concat(d(e.slice(4,e.length)))}let f=(e=0,t="")=>()=>`${t}_${e++}`;function h(e){let{i18n:t,defaultComponent:r}=o(),{render:i,component:a,id:s,message:u,formats:c}=e,d={...e.values},f={...e.components};d&&Object.keys(d).forEach(e=>{let t=d[e];if(!(n.isValidElement(t)||Array.isArray(t)&&t.every(e=>n.isValidElement(e))))return;let r=Object.keys(f).length;f[r]=t,d[e]=`<${r}/>`});let h=t&&"function"==typeof t._?t._(s,d,{message:u,formats:c}):s,m=h?l(h,f):null;if(null===i||null===a)return m;let y=r||p,g={id:s,message:u,translation:m,isTranslated:s!==m&&u!==m,children:m};if(i&&a)console.error("You can't use both `component` and `render` prop at the same time. `component` is ignored.");else if(i&&"function"!=typeof i)console.error(`Invalid value supplied to prop \`render\`. It must be a function, provided ${i}`);else if(a&&"function"!=typeof a)return console.error(`Invalid value supplied to prop \`component\`. It must be a React component, provided ${a}`),n.createElement(y,g,m);if("function"==typeof i)return i(g);let b=a||y;return n.createElement(b,g,m)}let p=({children:e})=>n.createElement(n.Fragment,null,e)},78789:function(e,t,r){"use strict";let n;r.r(t),r.d(t,{CompactEncrypt:function(){return tk},CompactSign:function(){return tx},EmbeddedJWK:function(){return tU},EncryptJWT:function(){return tj},FlattenedEncrypt:function(){return tn},FlattenedSign:function(){return tP},GeneralEncrypt:function(){return to},GeneralSign:function(){return tT},SignJWT:function(){return tR},UnsecuredJWT:function(){return tV},base64url:function(){return o},calculateJwkThumbprint:function(){return tN},calculateJwkThumbprintUri:function(){return tL},compactDecrypt:function(){return e3},compactVerify:function(){return tl},createLocalJWKSet:function(){return tq},createRemoteJWKSet:function(){return t$},cryptoRuntime:function(){return t8},decodeJwt:function(){return t0},decodeProtectedHeader:function(){return tQ},errors:function(){return i},exportJWK:function(){return te},exportPKCS8:function(){return e9},exportSPKI:function(){return e7},flattenedDecrypt:function(){return e6},flattenedVerify:function(){return tc},generalDecrypt:function(){return e8},generalVerify:function(){return td},generateKeyPair:function(){return t6},generateSecret:function(){return t3},importJWK:function(){return eG},importPKCS8:function(){return eq},importSPKI:function(){return eK},importX509:function(){return ez},jwtDecrypt:function(){return tE},jwtVerify:function(){return tA}});var i={};r.r(i),r.d(i,{JOSEAlgNotAllowed:function(){return M},JOSEError:function(){return A},JOSENotSupported:function(){return P},JWEDecryptionFailed:function(){return x},JWEInvalid:function(){return I},JWKInvalid:function(){return O},JWKSInvalid:function(){return R},JWKSMultipleMatchingKeys:function(){return D},JWKSNoMatchingKey:function(){return j},JWKSTimeout:function(){return N},JWSInvalid:function(){return T},JWSSignatureVerificationFailed:function(){return L},JWTClaimValidationFailed:function(){return E},JWTExpired:function(){return k},JWTInvalid:function(){return C}});var o={};r.r(o),r.d(o,{decode:function(){return tX},encode:function(){return tY}});var a=crypto;let s=e=>e instanceof CryptoKey;var u=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await a.subtle.digest(r,t))};let c=new TextEncoder,l=new TextDecoder,d=4294967296;function f(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function h(e,t){return f(c.encode(e),new Uint8Array([0]),t)}function p(e,t,r){if(t<0||t>=d)throw RangeError(`value must be >= 0 and <= ${d-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function m(e){let t=Math.floor(e/d),r=e%d,n=new Uint8Array(8);return p(n,t,0),p(n,r,4),n}function y(e){let t=new Uint8Array(4);return p(t,e),t}function g(e){return f(y(e.length),e)}async function b(e,t,r){let n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n);for(let t=0;t>3)}let v=e=>{let t=e;"string"==typeof t&&(t=c.encode(t));let r=32768,n=[];for(let e=0;ev(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),S=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=l.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return S(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}};class A extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class E extends A{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,r="unspecified",n="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=n,this.payload=t}}class k extends A{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,r="unspecified",n="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=n,this.payload=t}}class M extends A{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class P extends A{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class x extends A{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class I extends A{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class T extends A{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class C extends A{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class O extends A{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class R extends A{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class j extends A{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class D extends A{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class N extends A{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class L extends A{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}var U=a.getRandomValues.bind(a);function B(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}var W=e=>U(new Uint8Array(B(e)>>3)),F=(e,t)=>{if(t.length<<3!==B(e))throw new I("Invalid Initialization Vector length")},H=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new I(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},K=(e,t)=>{if(!(e instanceof Uint8Array))throw TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw TypeError("Second argument must be a buffer");if(e.length!==t.length)throw TypeError("Input buffers must have the same length");let r=e.length,n=0,i=-1;for(;++ie.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function $(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!q(e.algorithm,"HMAC"))throw z("HMAC");let r=parseInt(t.slice(2),10);if(G(e.algorithm.hash)!==r)throw z(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!q(e.algorithm,"RSASSA-PKCS1-v1_5"))throw z("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(G(e.algorithm.hash)!==r)throw z(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!q(e.algorithm,"RSA-PSS"))throw z("RSA-PSS");let r=parseInt(t.slice(2),10);if(G(e.algorithm.hash)!==r)throw z(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw z("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!q(e.algorithm,"ECDSA"))throw z("ECDSA");let r=Z(t);if(e.algorithm.namedCurve!==r)throw z(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}J(e,r)}function V(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!q(e.algorithm,"AES-GCM"))throw z("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw z(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!q(e.algorithm,"AES-KW"))throw z("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw z(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw z("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!q(e.algorithm,"PBKDF2"))throw z("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!q(e.algorithm,"RSA-OAEP"))throw z("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(G(e.algorithm.hash)!==r)throw z(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}J(e,r)}function Y(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var X=(e,...t)=>Y("Key must be ",e,...t);function Q(e,t,...r){return Y(`Key for the ${e} algorithm must be `,t,...r)}var ee=e=>s(e);let et=["CryptoKey"];async function er(e,t,r,n,i,o){let s,u;if(!(t instanceof Uint8Array))throw TypeError(X(t,"Uint8Array"));let c=parseInt(e.slice(1,4),10),l=await a.subtle.importKey("raw",t.subarray(c>>3),"AES-CBC",!1,["decrypt"]),d=await a.subtle.importKey("raw",t.subarray(0,c>>3),{hash:`SHA-${c<<1}`,name:"HMAC"},!1,["sign"]),h=f(o,n,r,m(o.length<<3)),p=new Uint8Array((await a.subtle.sign("HMAC",d,h)).slice(0,c>>3));try{s=K(i,p)}catch{}if(!s)throw new x;try{u=new Uint8Array(await a.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch{}if(!u)throw new x;return u}async function en(e,t,r,n,i,o){let s;t instanceof Uint8Array?s=await a.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(V(t,e,"decrypt"),s=t);try{return new Uint8Array(await a.subtle.decrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,f(r,i)))}catch{throw new x}}var ei=async(e,t,r,n,i,o)=>{if(!s(t)&&!(t instanceof Uint8Array))throw TypeError(X(t,...et,"Uint8Array"));if(!n)throw new I("JWE Initialization Vector missing");if(!i)throw new I("JWE Authentication Tag missing");switch(F(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&H(t,parseInt(e.slice(-3),10)),er(e,t,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&H(t,parseInt(e.slice(1,4),10)),en(e,t,r,n,i,o);default:throw new P("Unsupported JWE Content Encryption Algorithm")}},eo=(...e)=>{let t;let r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0};function ea(e){return"object"==typeof e&&null!==e}function es(e){if(!ea(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var eu=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ec(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function el(e,t,r){if(s(e))return V(e,t,r),e;if(e instanceof Uint8Array)return a.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(X(e,...et,"Uint8Array"))}let ed=async(e,t,r)=>{let n=await el(t,e,"wrapKey");ec(n,e);let i=await a.subtle.importKey("raw",r,...eu);return new Uint8Array(await a.subtle.wrapKey("raw",i,n,"AES-KW"))},ef=async(e,t,r)=>{let n=await el(t,e,"unwrapKey");ec(n,e);let i=await a.subtle.unwrapKey("raw",r,n,"AES-KW",...eu);return new Uint8Array(await a.subtle.exportKey("raw",i))};async function eh(e,t,r,n,i=new Uint8Array(0),o=new Uint8Array(0)){let u;if(!s(e))throw TypeError(X(e,...et));if(V(e,"ECDH"),!s(t))throw TypeError(X(t,...et));V(t,"ECDH","deriveBits");let l=f(g(c.encode(r)),g(i),g(o),y(n));return u="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,b(new Uint8Array(await a.subtle.deriveBits({name:e.algorithm.name,public:e},t,u)),n,l)}async function ep(e){if(!s(e))throw TypeError(X(e,...et));return a.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function em(e){if(!s(e))throw TypeError(X(e,...et));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}function ey(e){if(!(e instanceof Uint8Array)||e.length<8)throw new I("PBES2 Salt Input must be 8 or more octets")}function eg(e,t){if(e instanceof Uint8Array)return a.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(s(e))return V(e,t,"deriveBits","deriveKey"),e;throw TypeError(X(e,...et,"Uint8Array"))}async function eb(e,t,r,n){ey(e);let i=h(t,e),o=parseInt(t.slice(13,16),10),s={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},u={length:o,name:"AES-KW"},c=await eg(n,t);if(c.usages.includes("deriveBits"))return new Uint8Array(await a.subtle.deriveBits(s,c,o));if(c.usages.includes("deriveKey"))return a.subtle.deriveKey(s,c,u,!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let ev=async(e,t,r,n=2048,i=U(new Uint8Array(16)))=>{let o=await eb(i,e,n,t);return{encryptedKey:await ed(e.slice(-6),o,r),p2c:n,p2s:w(i)}},ew=async(e,t,r,n,i)=>{let o=await eb(i,e,n,t);return ef(e.slice(-6),o,r)};function eS(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}var e_=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};let eA=async(e,t,r)=>{if(!s(t))throw TypeError(X(t,...et));if(V(t,e,"encrypt","wrapKey"),e_(e,t),t.usages.includes("encrypt"))return new Uint8Array(await a.subtle.encrypt(eS(e),t,r));if(t.usages.includes("wrapKey")){let n=await a.subtle.importKey("raw",r,...eu);return new Uint8Array(await a.subtle.wrapKey("raw",n,t,eS(e)))}throw TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},eE=async(e,t,r)=>{if(!s(t))throw TypeError(X(t,...et));if(V(t,e,"decrypt","unwrapKey"),e_(e,t),t.usages.includes("decrypt"))return new Uint8Array(await a.subtle.decrypt(eS(e),t,r));if(t.usages.includes("unwrapKey")){let n=await a.subtle.unwrapKey("raw",r,t,eS(e),...eu);return new Uint8Array(await a.subtle.exportKey("raw",n))}throw TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function ek(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}var eM=e=>U(new Uint8Array(ek(e)>>3)),eP=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join("\n");return`-----BEGIN ${t}----- +${r} +-----END ${t}-----`};let ex=async(e,t,r)=>{if(!s(r))throw TypeError(X(r,...et));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eP(v(new Uint8Array(await a.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},eI=e=>ex("public","spki",e),eT=e=>ex("private","pkcs8",e),eC=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let n=e.indexOf(t[0],r);if(-1===n)return!1;let i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||eC(e,t,n+1))},eO=e=>{switch(!0){case eC(e,[42,134,72,206,61,3,1,7]):return"P-256";case eC(e,[43,129,4,0,34]):return"P-384";case eC(e,[43,129,4,0,35]):return"P-521";case eC(e,[43,101,110]):return"X25519";case eC(e,[43,101,111]):return"X448";case eC(e,[43,101,112]):return"Ed25519";case eC(e,[43,101,113]):return"Ed448";default:throw new P("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},eR=async(e,t,r,n,i)=>{let o,s;let u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),c="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},s=c?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},s=c?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},s=c?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},s=c?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},s=c?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},s=c?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let e=eO(u);o=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},s=c?[]:["deriveBits"];break}case"EdDSA":o={name:eO(u)},s=c?["verify"]:["sign"];break;default:throw new P('Invalid or unsupported "alg" (Algorithm) value')}return a.subtle.importKey(t,u,o,i?.extractable??!1,s)},ej=(e,t,r)=>eR(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),eD=(e,t,r)=>eR(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function eN(e){let t=[],r=0;for(;r=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw TypeError("invalid indefinite form length");n++}let r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}else{let r=127&e[t];t++,n=0;for(let i=0;i{let n;try{n=eB(e)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return eD(n,t,r)};function eF(e){let t,r;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new P('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var eH=async e=>{if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=eF(e),n=[t,e.ext??!1,e.key_ops??r],i={...e};return delete i.alg,delete i.use,a.subtle.importKey("jwk",i,...n)};async function eK(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return eD(e,t,r)}async function ez(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return eW(e,t,r)}async function eq(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return ej(e,t,r)}async function eG(e,t){if(!es(e))throw TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');return _(e.k);case"RSA":if(void 0!==e.oth)throw new P('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return eH({...e,alg:t});default:throw new P('Unsupported "kty" (Key Type) Parameter value')}}let eZ=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ee(t))throw TypeError(Q(e,t,...et,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${et.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},eJ=(e,t,r)=>{if(!ee(t))throw TypeError(Q(e,t,...et));if("secret"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${et.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)};var e$=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?eZ(e,t):eJ(e,t,r)};async function eV(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(X(r,"Uint8Array"));let o=parseInt(e.slice(1,4),10),s=await a.subtle.importKey("raw",r.subarray(o>>3),"AES-CBC",!1,["encrypt"]),u=await a.subtle.importKey("raw",r.subarray(0,o>>3),{hash:`SHA-${o<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await a.subtle.encrypt({iv:n,name:"AES-CBC"},s,t)),l=f(i,n,c,m(i.length<<3));return{ciphertext:c,tag:new Uint8Array((await a.subtle.sign("HMAC",u,l)).slice(0,o>>3)),iv:n}}async function eY(e,t,r,n,i){let o;r instanceof Uint8Array?o=await a.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(V(r,e,"encrypt"),o=r);let s=new Uint8Array(await a.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,t)),u=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:u,iv:n}}var eX=async(e,t,r,n,i)=>{if(!s(r)&&!(r instanceof Uint8Array))throw TypeError(X(r,...et,"Uint8Array"));switch(n?F(e,n):n=W(e),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&H(r,parseInt(e.slice(-3),10)),eV(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&H(r,parseInt(e.slice(1,4),10)),eY(e,t,r,n,i);default:throw new P("Unsupported JWE Content Encryption Algorithm")}};async function eQ(e,t,r,n){let i=e.slice(0,7),o=await eX(i,r,t,n,new Uint8Array(0));return{encryptedKey:o.ciphertext,iv:w(o.iv),tag:w(o.tag)}}async function e0(e,t,r,n,i){return ei(e.slice(0,7),t,r,n,i,new Uint8Array(0))}var e1=async function(e,t,r,n,i){switch(e$(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new I("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new I("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,o;if(!es(n.epk))throw new I('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!em(t))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");let a=await eG(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new I('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=_(n.apu)}catch{throw new I("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new I('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{o=_(n.apv)}catch{throw new I("Failed to base64url decode the apv")}}let s=await eh(a,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?ek(n.enc):parseInt(e.slice(-5,-2),10),i,o);if("ECDH-ES"===e)return s;if(void 0===r)throw new I("JWE Encrypted Key missing");return ef(e.slice(-6),s,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new I("JWE Encrypted Key missing");return eE(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let o;if(void 0===r)throw new I("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new I('JOSE Header "p2c" (PBES2 Count) missing or invalid');let a=i?.maxPBES2Count||1e4;if(n.p2c>a)throw new I('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new I('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{o=_(n.p2s)}catch{throw new I("Failed to base64url decode the p2s")}return ew(e,t,r,n.p2c,o)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new I("JWE Encrypted Key missing");return ef(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let i,o;if(void 0===r)throw new I("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new I('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new I('JOSE Header "tag" (Authentication Tag) missing or invalid');try{i=_(n.iv)}catch{throw new I("Failed to base64url decode the iv")}try{o=_(n.tag)}catch{throw new I("Failed to base64url decode the tag")}return e0(e,t,r,i,o)}default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}},e2=function(e,t,r,n,i){let o;if(void 0!==i.crit&&n?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new P(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)},e4=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function e6(e,t,r){let n,i,o,a,s,u,d;if(!es(e))throw new I("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new I("JOSE Header missing");if(void 0!==e.iv&&"string"!=typeof e.iv)throw new I("JWE Initialization Vector incorrect type");if("string"!=typeof e.ciphertext)throw new I("JWE Ciphertext missing or incorrect type");if(void 0!==e.tag&&"string"!=typeof e.tag)throw new I("JWE Authentication Tag incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new I("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new I("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new I("JWE AAD incorrect type");if(void 0!==e.header&&!es(e.header))throw new I("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!es(e.unprotected))throw new I("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=_(e.protected);n=JSON.parse(l.decode(t))}catch{throw new I("JWE Protected Header is invalid")}if(!eo(n,e.header,e.unprotected))throw new I("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let h={...n,...e.header,...e.unprotected};if(e2(I,new Map,r?.crit,n,h),void 0!==h.zip)throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');let{alg:p,enc:m}=h;if("string"!=typeof p||!p)throw new I("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof m||!m)throw new I("missing JWE Encryption Algorithm (enc) in JWE Header");let y=r&&e4("keyManagementAlgorithms",r.keyManagementAlgorithms),g=r&&e4("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(y&&!y.has(p)||!y&&p.startsWith("PBES2"))throw new M('"alg" (Algorithm) Header Parameter value not allowed');if(g&&!g.has(m))throw new M('"enc" (Encryption Algorithm) Header Parameter value not allowed');if(void 0!==e.encrypted_key)try{i=_(e.encrypted_key)}catch{throw new I("Failed to base64url decode the encrypted_key")}let b=!1;"function"==typeof t&&(t=await t(n,e),b=!0);try{o=await e1(p,t,i,h,r)}catch(e){if(e instanceof TypeError||e instanceof I||e instanceof P)throw e;o=eM(m)}if(void 0!==e.iv)try{a=_(e.iv)}catch{throw new I("Failed to base64url decode the iv")}if(void 0!==e.tag)try{s=_(e.tag)}catch{throw new I("Failed to base64url decode the tag")}let v=c.encode(e.protected??"");u=void 0!==e.aad?f(v,c.encode("."),c.encode(e.aad)):v;try{d=_(e.ciphertext)}catch{throw new I("Failed to base64url decode the ciphertext")}let w={plaintext:await ei(m,o,d,a,s,u)};if(void 0!==e.protected&&(w.protectedHeader=n),void 0!==e.aad)try{w.additionalAuthenticatedData=_(e.aad)}catch{throw new I("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(w.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(w.unprotectedHeader=e.header),b)?{...w,key:t}:w}async function e3(e,t,r){if(e instanceof Uint8Array&&(e=l.decode(e)),"string"!=typeof e)throw new I("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:s,length:u}=e.split(".");if(5!==u)throw new I("Invalid Compact JWE");let c=await e6({ciphertext:a,iv:o||void 0,protected:n,tag:s||void 0,encrypted_key:i||void 0},t,r),d={plaintext:c.plaintext,protectedHeader:c.protectedHeader};return"function"==typeof t?{...d,key:c.key}:d}async function e8(e,t,r){if(!es(e))throw new I("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(es))throw new I("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new I("JWE Recipients has no members");for(let n of e.recipients)try{return await e6({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch{}throw new x}var e5=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:w(e)};if(!s(e))throw TypeError(X(e,...et,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...o}=await a.subtle.exportKey("jwk",e);return o};async function e7(e){return eI(e)}async function e9(e){return eT(e)}async function te(e){return e5(e)}var tt=async function(e,t,r,n,i={}){let o,a,s;switch(e$(e,r,"encrypt"),e){case"dir":s=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!em(r))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:u,apv:c}=i,{epk:l}=i;l||(l=(await ep(r)).privateKey);let{x:d,y:f,crv:h,kty:p}=await te(l),m=await eh(r,l,"ECDH-ES"===e?t:e,"ECDH-ES"===e?ek(t):parseInt(e.slice(-5,-2),10),u,c);if(a={epk:{x:d,crv:h,kty:p}},"EC"===p&&(a.epk.y=f),u&&(a.apu=w(u)),c&&(a.apv=w(c)),"ECDH-ES"===e){s=m;break}s=n||eM(t);let y=e.slice(-6);o=await ed(y,m,s);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s=n||eM(t),o=await eA(e,r,s);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{s=n||eM(t);let{p2c:u,p2s:c}=i;({encryptedKey:o,...a}=await ev(e,r,s,u,c));break}case"A128KW":case"A192KW":case"A256KW":s=n||eM(t),o=await ed(e,r,s);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{s=n||eM(t);let{iv:u}=i;({encryptedKey:o,...a}=await eQ(e,r,s,u));break}default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:s,encryptedKey:o,parameters:a}};let tr=Symbol();class tn{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){let r,n,i,o,a;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new I("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!eo(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new I("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let s={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(e2(I,new Map,t?.crit,this._protectedHeader,s),void 0!==s.zip)throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');let{alg:u,enc:d}=s;if("string"!=typeof u||!u)throw new I('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof d||!d)throw new I('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(this._cek&&("dir"===u||"ECDH-ES"===u))throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${u}`);{let i;({cek:n,encryptedKey:r,parameters:i}=await tt(u,d,e,this._cek,this._keyManagementParameters)),i&&(t&&tr in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...i}:this.setUnprotectedHeader(i):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...i}:this.setProtectedHeader(i))}o=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(a=w(this._aad),i=f(o,c.encode("."),c.encode(a))):i=o;let{ciphertext:h,tag:p,iv:m}=await eX(d,this._plaintext,n,this._iv,i),y={ciphertext:w(h)};return m&&(y.iv=w(m)),p&&(y.tag=w(p)),r&&(y.encrypted_key=w(r)),a&&(y.aad=a),this._protectedHeader&&(y.protected=l.decode(o)),this._sharedUnprotectedHeader&&(y.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(y.header=this._unprotectedHeader),y}}class ti{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class to{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){let r=new ti(this,e,{crit:t?.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(){let e;if(!this._recipients.length)throw new I("at least one recipient must be added");if(1===this._recipients.length){let[e]=this._recipients,t=await new tn(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(e.unprotectedHeader).encrypt(e.key,{...e.options}),r={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.aad&&(r.aad=t.aad),t.protected&&(r.protected=t.protected),t.unprotected&&(r.unprotected=t.unprotected),t.encrypted_key&&(r.recipients[0].encrypted_key=t.encrypted_key),t.header&&(r.recipients[0].header=t.header),r}for(let t=0;t>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function ts(e,t,r){if(s(t))return $(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(X(t,...et));return a.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(X(t,...et,"Uint8Array"))}var tu=async(e,t,r,n)=>{let i=await ts(e,t,"verify");e_(e,i);let o=ta(e,i.algorithm);try{return await a.subtle.verify(o,i,r,n)}catch{return!1}};async function tc(e,t,r){let n,i;if(!es(e))throw new T("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new T('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new T("JWS Protected Header incorrect type");if(void 0===e.payload)throw new T("JWS Payload missing");if("string"!=typeof e.signature)throw new T("JWS Signature missing or incorrect type");if(void 0!==e.header&&!es(e.header))throw new T("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{let t=_(e.protected);o=JSON.parse(l.decode(t))}catch{throw new T("JWS Protected Header is invalid")}if(!eo(o,e.header))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let a={...o,...e.header},s=e2(T,new Map([["b64",!0]]),r?.crit,o,a),u=!0;if(s.has("b64")&&"boolean"!=typeof(u=o.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:d}=a;if("string"!=typeof d||!d)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');let h=r&&e4("algorithms",r.algorithms);if(h&&!h.has(d))throw new M('"alg" (Algorithm) Header Parameter value not allowed');if(u){if("string"!=typeof e.payload)throw new T("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new T("JWS Payload must be a string or an Uint8Array instance");let p=!1;"function"==typeof t&&(t=await t(o,e),p=!0),e$(d,t,"verify");let m=f(c.encode(e.protected??""),c.encode("."),"string"==typeof e.payload?c.encode(e.payload):e.payload);try{n=_(e.signature)}catch{throw new T("Failed to base64url decode the signature")}if(!await tu(d,t,n,m))throw new L;if(u)try{i=_(e.payload)}catch{throw new T("Failed to base64url decode the payload")}else i="string"==typeof e.payload?c.encode(e.payload):e.payload;let y={payload:i};return(void 0!==e.protected&&(y.protectedHeader=o),void 0!==e.header&&(y.unprotectedHeader=e.header),p)?{...y,key:t}:y}async function tl(e,t,r){if(e instanceof Uint8Array&&(e=l.decode(e)),"string"!=typeof e)throw new T("Compact JWS must be a string or Uint8Array");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a)throw new T("Invalid Compact JWS");let s=await tc({payload:i,protected:n,signature:o},t,r),u={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...u,key:s.key}:u}async function td(e,t,r){if(!es(e))throw new T("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(es))throw new T("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await tc({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch{}throw new L}var tf=e=>Math.floor(e.getTime()/1e3);let th=60,tp=3600,tm=86400,ty=604800,tg=31557600,tb=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var tv=e=>{let t;let r=tb.exec(e);if(!r||r[4]&&r[1])throw TypeError("Invalid time period format");let n=parseFloat(r[2]);switch(r[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":t=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":t=Math.round(n*th);break;case"hour":case"hours":case"hr":case"hrs":case"h":t=Math.round(n*tp);break;case"day":case"days":case"d":t=Math.round(n*tm);break;case"week":case"weeks":case"w":t=Math.round(n*ty);break;default:t=Math.round(n*tg)}return"-"===r[1]||"ago"===r[4]?-t:t};let tw=e=>e.toLowerCase().replace(/^application\//,""),tS=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));var t_=(e,t,r={})=>{let n,i;try{n=JSON.parse(l.decode(t))}catch{}if(!es(n))throw new C("JWT Claims Set must be a top-level JSON object");let{typ:o}=r;if(o&&("string"!=typeof e.typ||tw(e.typ)!==tw(o)))throw new E('unexpected "typ" JWT header value',n,"typ","check_failed");let{requiredClaims:a=[],issuer:s,subject:u,audience:c,maxTokenAge:d}=r,f=[...a];for(let e of(void 0!==d&&f.push("iat"),void 0!==c&&f.push("aud"),void 0!==u&&f.push("sub"),void 0!==s&&f.push("iss"),new Set(f.reverse())))if(!(e in n))throw new E(`missing required "${e}" claim`,n,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new E('unexpected "iss" claim value',n,"iss","check_failed");if(u&&n.sub!==u)throw new E('unexpected "sub" claim value',n,"sub","check_failed");if(c&&!tS(n.aud,"string"==typeof c?[c]:c))throw new E('unexpected "aud" claim value',n,"aud","check_failed");switch(typeof r.clockTolerance){case"string":i=tv(r.clockTolerance);break;case"number":i=r.clockTolerance;break;case"undefined":i=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:h}=r,p=tf(h||new Date);if((void 0!==n.iat||d)&&"number"!=typeof n.iat)throw new E('"iat" claim must be a number',n,"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new E('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>p+i)throw new E('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new E('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=p-i)throw new k('"exp" claim timestamp check failed',n,"exp","check_failed")}if(d){let e=p-n.iat;if(e-i>("number"==typeof d?d:tv(d)))throw new k('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(e<0-i)throw new E('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function tA(e,t,r){let n=await tl(e,t,r);if(n.protectedHeader.crit?.includes("b64")&&!1===n.protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");let i={payload:t_(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return"function"==typeof t?{...i,key:n.key}:i}async function tE(e,t,r){let n=await e3(e,t,r),i=t_(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new E('replicated "iss" claim header parameter mismatch',i,"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new E('replicated "sub" claim header parameter mismatch',i,"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new E('replicated "aud" claim header parameter mismatch',i,"aud","mismatch");let a={payload:i,protectedHeader:o};return"function"==typeof t?{...a,key:n.key}:a}class tk{constructor(e){this._flattened=new tn(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}var tM=async(e,t,r)=>{let n=await ts(e,t,"sign");return e_(e,n),new Uint8Array(await a.subtle.sign(ta(e,n.algorithm),n,r))};class tP{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let r;if(!this._protectedHeader&&!this._unprotectedHeader)throw new T("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!eo(this._protectedHeader,this._unprotectedHeader))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},i=e2(T,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n),o=!0;if(i.has("b64")&&"boolean"!=typeof(o=this._protectedHeader.b64))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;if("string"!=typeof a||!a)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');e$(a,e,"sign");let s=this._payload;o&&(s=c.encode(w(s)));let u=f(r=this._protectedHeader?c.encode(w(JSON.stringify(this._protectedHeader))):c.encode(""),c.encode("."),s),d={signature:w(await tM(a,e,u)),payload:""};return o&&(d.payload=l.decode(s)),this._unprotectedHeader&&(d.header=this._unprotectedHeader),this._protectedHeader&&(d.protected=l.decode(r)),d}}class tx{constructor(e){this._flattened=new tP(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let r=await this._flattened.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class tI{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class tT{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){let r=new tI(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new T("at least one signature must be added");let e={signatures:[],payload:""};for(let t=0;t{if("string"!=typeof e||!e)throw new O(`${t} missing or invalid`)};async function tN(e,t){let r;if(!es(e))throw TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(e.kty){case"EC":tD(e.crv,'"crv" (Curve) Parameter'),tD(e.x,'"x" (X Coordinate) Parameter'),tD(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":tD(e.crv,'"crv" (Subtype of Key Pair) Parameter'),tD(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":tD(e.e,'"e" (Exponent) Parameter'),tD(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":tD(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new P('"kty" (Key Type) Parameter missing or unsupported')}let n=c.encode(JSON.stringify(r));return w(await u(t,n))}async function tL(e,t){t??(t="sha256");let r=await tN(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function tU(e,t){let r={...e,...t?.header};if(!es(r.jwk))throw new T('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eG({...r.jwk,ext:!0},r.alg);if(n instanceof Uint8Array||"public"!==n.type)throw new T('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function tB(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new P('Unsupported "alg" value for a JSON Web Key Set')}}function tW(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(tF)}function tF(e){return es(e)}function tH(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class tK{constructor(e){if(this._cached=new WeakMap,!tW(e))throw new R("JSON Web Key Set malformed");this._jwks=tH(e)}async getKey(e,t){let{alg:r,kid:n}={...e,...t?.header},i=tB(r),o=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t}),{0:a,length:s}=o;if(0===s)throw new j;if(1!==s){let e=new D,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(let e of o)try{yield await tz(t,e,r)}catch{}},e}return tz(this._cached,a,r)}}async function tz(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await eG({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new R("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function tq(e){let t=new tK(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>tH(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}var tG=async(e,t,r)=>{let n,i;let o=!1;"function"==typeof AbortController&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},t));let a=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(e=>{if(o)throw new N;throw e});if(void 0!==i&&clearTimeout(i),200!==a.status)throw new A("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch{throw new A("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function tZ(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){let e="jose",t="v5.4.0";n=`${e}/${t}`}class tJ{constructor(e,t){if(!(e instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now(){this._local=tq(e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}function t$(e,t){let r=new tJ(e,t),n=async(e,t)=>r.getKey(e,t);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>r._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}class tV extends tO{encode(){let e=w(JSON.stringify({alg:"none"})),t=w(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){let r;if("string"!=typeof e)throw new C("Unsecured JWT must be a string");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a||""!==o)throw new C("Invalid Unsecured JWT");try{if(r=JSON.parse(l.decode(_(n))),"none"!==r.alg)throw Error()}catch{throw new C("Invalid Unsecured JWT")}return{payload:t_(r,_(i),t),header:r}}}let tY=w,tX=_;function tQ(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e){if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header")}try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(l.decode(tX(t)));if(!es(e))throw Error();return e}catch{throw TypeError("Invalid Token or Protected Header formatting")}}function t0(e){let t,r;if("string"!=typeof e)throw new C("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new C("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new C("Invalid JWT");if(!n)throw new C("JWTs must contain a payload");try{t=tX(n)}catch{throw new C("Failed to base64url decode the payload")}try{r=JSON.parse(l.decode(t))}catch{throw new C("Failed to parse the decoded payload as JSON")}if(!es(r))throw new C("Invalid JWT Claims Set");return r}async function t1(e,t){let r,n,i;switch(e){case"HS256":case"HS384":case"HS512":r=parseInt(e.slice(-3),10),n={name:"HMAC",hash:`SHA-${r}`,length:r},i=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return U(new Uint8Array((r=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":n={name:"AES-KW",length:r=parseInt(e.slice(1,4),10)},i=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":n={name:"AES-GCM",length:r=parseInt(e.slice(1,4),10)},i=["encrypt","decrypt"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return a.subtle.generateKey(n,t?.extractable??!1,i)}function t2(e){let t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new P("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function t4(e,t){let r,n;switch(e){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t2(t)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t2(t)},n=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:t2(t)},n=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":r={name:"ECDSA",namedCurve:"P-256"},n=["sign","verify"];break;case"ES384":r={name:"ECDSA",namedCurve:"P-384"},n=["sign","verify"];break;case"ES512":r={name:"ECDSA",namedCurve:"P-521"},n=["sign","verify"];break;case"EdDSA":{n=["sign","verify"];let e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":r={name:e};break;default:throw new P("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{n=["deriveKey","deriveBits"];let e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":r={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":r={name:e};break;default:throw new P("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return a.subtle.generateKey(r,t?.extractable??!1,n)}async function t6(e,t){return t4(e,t)}async function t3(e,t){return t1(e,t)}var t8="WebCryptoAPI"},31955:function(e,t,r){"use strict";/*! js-cookie v3.0.5 | MIT */function n(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function u(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||i,a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,u=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+a+";":n+="f"==o[1]?c(a,o):o+"{"+c(a,"k"==o[1]?"":t)+"}":"object"==typeof a?n+=c(a,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,a):o+":"+a+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},d=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+d(e[r]);return t}return e},f=(e,t,r,n,i)=>{let o=d(e),f=l[o]||(l[o]=(e=>{let t=0,r=11;for(;t>>0;return"go"+r})(o));if(!l[f]){let t=o!==e?e:(e=>{let t,r,n=[{}];for(;t=a.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(u," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(u," ").trim();return n[0]})(e);l[f]=c(i?{["@keyframes "+f]:t}:t,r?"":"."+f)}let h=r&&l.g?l.g:null;return r&&(l.g=l[f]),((e,t,r,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(l[f],t,n,h),f},h=(e,t,r)=>e.reduce((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)},"");function p(e){let t=this||{},r=e.call?e(t.p):e;return f(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):r,o(t.target),t.g,t.o,t.k)}p.bind({g:1});let m,y,g,b=p.bind({k:1});function v(e,t,r,n){c.p=t,m=e,y=r,g=n}function w(e,t){let r=this||{};return function(){let n=arguments;function i(o,a){let s=Object.assign({},o),u=s.className||i.className;r.p=Object.assign({theme:y&&y()},s),r.o=/ *go\d+/.test(u),s.className=p.apply(r,n)+(u?" "+u:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),g&&c[0]&&g(s),m(c,s)}return t?t(i):i}}var S=e=>"function"==typeof e,_=(e,t)=>S(e)?e(t):e,A=(()=>{let e=0;return()=>(++e).toString()})(),E=(()=>{let e;return()=>{if(void 0===e&&"u">typeof window){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),k=20,M=new Map,P=1e3,x=e=>{if(M.has(e))return;let t=setTimeout(()=>{M.delete(e),R({type:4,toastId:e})},P);M.set(e,t)},I=e=>{let t=M.get(e);t&&clearTimeout(t)},T=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,k)};case 1:return t.toast.id&&I(t.toast.id),{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return e.toasts.find(e=>e.id===r.id)?T(e,{type:1,toast:r}):T(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?x(n):e.toasts.forEach(e=>{x(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},C=[],O={toasts:[],pausedAt:void 0},R=e=>{O=T(O,e),C.forEach(e=>{e(O)})},j={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},D=(e={})=>{let[t,r]=(0,n.useState)(O);(0,n.useEffect)(()=>(C.push(r),()=>{let e=C.indexOf(r);e>-1&&C.splice(e,1)}),[t]);let i=t.toasts.map(t=>{var r,n;return{...e,...e[t.type],...t,duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||j[t.type],style:{...e.style,...null==(n=e[t.type])?void 0:n.style,...t.style}}});return{...t,toasts:i}},N=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||A()}),L=e=>(t,r)=>{let n=N(t,e,r);return R({type:2,toast:n}),n.id},U=(e,t)=>L("blank")(e,t);U.error=L("error"),U.success=L("success"),U.loading=L("loading"),U.custom=L("custom"),U.dismiss=e=>{R({type:3,toastId:e})},U.remove=e=>R({type:4,toastId:e}),U.promise=(e,t,r)=>{let n=U.loading(t.loading,{...r,...null==r?void 0:r.loading});return e.then(e=>(U.success(_(t.success,e),{id:n,...r,...null==r?void 0:r.success}),e)).catch(e=>{U.error(_(t.error,e),{id:n,...r,...null==r?void 0:r.error})}),e};var B=(e,t)=>{R({type:1,toast:{id:e,height:t}})},W=()=>{R({type:5,time:Date.now()})},F=e=>{let{toasts:t,pausedAt:r}=D(e);(0,n.useEffect)(()=>{if(r)return;let e=Date.now(),n=t.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(r<0){t.visible&&U.dismiss(t.id);return}return setTimeout(()=>U.dismiss(t.id),r)});return()=>{n.forEach(e=>e&&clearTimeout(e))}},[t,r]);let i=(0,n.useCallback)(()=>{r&&R({type:6,time:Date.now()})},[r]),o=(0,n.useCallback)((e,r)=>{let{reverseOrder:n=!1,gutter:i=8,defaultPosition:o}=r||{},a=t.filter(t=>(t.position||o)===(e.position||o)&&t.height),s=a.findIndex(t=>t.id===e.id),u=a.filter((e,t)=>te.visible).slice(...n?[u+1]:[0,u]).reduce((e,t)=>e+(t.height||0)+i,0)},[t]);return{toasts:t,handlers:{updateHeight:B,startPause:W,endPause:i,calculateOffset:o}}},H=b` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,K=b` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,z=b` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,q=w("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${H} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${K} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${z} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,G=b` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,Z=w("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${G} 1s linear infinite; +`,J=b` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,$=b` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,V=w("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${J} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${$} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,Y=w("div")` + position: absolute; +`,X=w("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,Q=b` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,ee=w("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${Q} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,et=({toast:e})=>{let{icon:t,type:r,iconTheme:i}=e;return void 0!==t?"string"==typeof t?n.createElement(ee,null,t):t:"blank"===r?null:n.createElement(X,null,n.createElement(Z,{...i}),"loading"!==r&&n.createElement(Y,null,"error"===r?n.createElement(q,{...i}):n.createElement(V,{...i})))},er=e=>` +0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,en=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;} +`,ei="0%{opacity:0;} 100%{opacity:1;}",eo="0%{opacity:1;} 100%{opacity:0;}",ea=w("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,es=w("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,eu=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=E()?[ei,eo]:[er(r),en(r)];return{animation:t?`${b(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${b(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ec=n.memo(({toast:e,position:t,style:r,children:i})=>{let o=e.height?eu(e.position||t||"top-center",e.visible):{opacity:0},a=n.createElement(et,{toast:e}),s=n.createElement(es,{...e.ariaProps},_(e.message,e));return n.createElement(ea,{className:e.className,style:{...o,...r,...e.style}},"function"==typeof i?i({icon:a,message:s}):n.createElement(n.Fragment,null,a,s))});v(n.createElement);var el=({id:e,className:t,style:r,onHeightUpdate:i,children:o})=>{let a=n.useCallback(t=>{if(t){let r=()=>{i(e,t.getBoundingClientRect().height)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,i]);return n.createElement("div",{ref:a,className:t,style:r},o)},ed=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:E()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},ef=p` + z-index: 9999; + > * { + pointer-events: auto; + } +`,eh=16,ep=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:i,children:o,containerStyle:a,containerClassName:s})=>{let{toasts:u,handlers:c}=F(r);return n.createElement("div",{style:{position:"fixed",zIndex:9999,top:eh,left:eh,right:eh,bottom:eh,pointerEvents:"none",...a},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(r=>{let a=r.position||t,s=ed(a,c.calculateOffset(r,{reverseOrder:e,gutter:i,defaultPosition:t}));return n.createElement(el,{id:r.id,key:r.id,onHeightUpdate:c.updateHeight,className:r.visible?ef:"",style:s},"custom"===r.type?_(r.message,r):o?o(r):n.createElement(ec,{toast:r,position:a}))}))},em=U},79544:function(e){"use strict";e.exports=JSON.parse('{"f":[{"chatTitle":"(Example) Learn English","syncedAt":null,"messages":[{"role":"system","plugins":[],"originalContent":"You are an English teacher, you help the user improve their English language skills, including grammar, vocabulary, pronunciation, and reading comprehension.","content":"You are an English teacher, you help the user improve their English language skills, including grammar, vocabulary, pronunciation, and reading comprehension."},{"role":"assistant","type":"character-welcome-message","content":"Hello, I\'m an English teacher. I can help you improve your English language skills. What specific area would you like to focus on today?","model":"claude-2"},{"role":"user","content":"Explain this word with definition, examples, pronunciation, and opposite meaning: Cacophony"},{"role":"assistant","content":" Here\'s a breakdown of the word cacophony:\\n\\nDefinition: A harsh, discordant mixture of sounds.\\n\\nPronunciation: kə-kŏf′ə-nē\\n\\nExamples:\\n- The cacophony of car horns during rush hour traffic was deafening. \\n- The band\'s music was an unlistenable cacophony of distorted guitars and screaming.\\n\\nOpposites: \\n- Euphony - a pleasing smooth sound or combination of sounds. \\n- Harmony - a combination of simultaneously sounded musical notes to produce chords and chord progressions.\\n- Melody - a sequence of single notes perceived as a unity.\\n\\nIn summary, cacophony refers to a displeasing mixture of loud, clashing noises. Its opposites refer to more melodic, harmonious, and pleasant sounding combinations of sounds.","model":"claude-2","usage":{"completion_tokens":182,"prompt_tokens":77,"total_tokens":259},"finish":"stop_sequence","titleUsage":null,"keywords":["discordant sounds","unpleasant sounds","euphony","harmony","melody"]}],"model":"claude-2","documentText":"","systemMessage":"You are an English teacher, you help the user improve their English language skills, including grammar, vocabulary, pronunciation, and reading comprehension.","character":{"id":"character-da07da71-248d-44d0-aea8-61d0970cf363","color":"#fff","title":"English Teacher","syncedAt":"2023-08-03T14:06:08.973Z","avatarURL":"/assets/ai-characters/english-teacher.png","createdAt":"2023-08-03T14:02:15.027Z","deletedAt":null,"lastUsedAt":"2023-08-03T14:06:00.779Z","description":"An English teacher who can help you improve your English language skills, including grammar, vocabulary, pronunciation, and reading comprehension.","instruction":"You are an English teacher, you help the user improve their English language skills, including grammar, vocabulary, pronunciation, and reading comprehension.","welcomeMessage":"Hello, I\'m an English teacher. I can help you improve your English language skills. What specific area would you like to focus on today?","trainingExamples":[]},"chatID":"ch-0d98d335-31fa-47f0-9d5a-1f29d9d0d005","updatedAt":"2023-08-06T12:01:06.417Z"},{"messages":[{"role":"system","plugins":[],"originalContent":"You are a helpful AI assistant.","content":"You are a helpful AI assistant."},{"role":"user","content":"I want you to act as a tech writer.\\n\\nYou will act as a creative and engaging technical writer and create guides on how to do different stuff on specific software.\\n\\nI will provide you with basic steps of an app functionality and you will come up with an engaging article on how to do those basic steps.\\n\\nYou can ask for screenshots, just add (screenshot) to where you think there should be one and I will add those later.\\n\\nNow write a short tech article on how to use Apple Notes on macOS.\\n\\nFormat in Markdown."},{"role":"assistant","content":" Here is a draft tech article on how to use Apple Notes on macOS:\\n\\n# Get Organized with Apple Notes on macOS\\n\\nApple Notes is a handy app that comes pre-installed on all Mac computers running macOS. It provides a simple yet powerful way to jot down notes, create checklists, scan documents, and more. In this guide, we\'ll walk through the basics of using Apple Notes to help you get organized.\\n\\n## Create a New Note\\n\\nGetting started with Apple Notes is easy. Here\'s how to create a new note:\\n\\n1. Open the Notes app on your Mac. It\'s located in the Applications folder or you can use Spotlight Search to find it.\\n\\n2. Click the New Note button (it looks like a sheet of paper with a + symbol) in the bottom left corner of the app window. Alternatively, use the keyboard shortcut **⌘N**.\\n\\n3. A new note will open up. Type in a title at the top and start entering your note content below it.\\n\\n(screenshot of new note window)\\n\\nThat\'s all there is to creating a note! Now let\'s look at ways to enhance your notes.\\n\\n## Add Lists, Photos, Scanned Documents\\n\\nApple Notes allows you to do more than just type text. You can enhance your notes by adding lists, photos, scanned documents, and more:\\n\\n- **Lists** - Create checklists by typing dashes (-) or asterisks (*) followed by your list item. Check them off when complete.\\n\\n- **Photos** - Drag and drop photos right into a note or copy/paste them.\\n\\n- **Scanned Documents** - Use your iPhone\'s camera to scan documents directly into a note. Requires iOS 11 or later.\\n\\n- **Sketches** - Use your trackpad or mouse to draw simple sketches.\\n\\n- **Web links** - Paste in web links to add related sites.\\n\\nAdding visual elements helps make your notes more useful and easy to refer back to later.\\n\\n(screenshot of note with a photo)\\n\\n## Organize Notes with Folders\\n\\nTo keep your growing collection of notes tidy, use folders to categorize and organize them:\\n\\n1. Click the New Folder button at the bottom of the sidebar. Give your folder a name.\\n\\n2. Click and drag notes onto the folder to file them away.\\n\\n3. Right-click a folder to nest subfolders inside.\\n\\nFolders allow you to group related notes and stay organized as your library of notes grows.\\n\\n(screenshot of notes sidebar with folders)\\n\\nAnd that\'s the basics of using Apple Notes on your Mac! With a few notes and folders set up, you\'ll be on your way to being more organized and productive. Notes seamlessly syncs across all your Apple devices using iCloud, so you can also access all your notes on your iPhone and iPad too.","model":"claude-2","usage":{"completion_tokens":620,"prompt_tokens":126,"total_tokens":746},"finish":"stop_sequence","titleUsage":null,"keywords":["macos notes","lists","checklists","organize notes","folders"]}],"chatTitle":"(Example) Writing Content","model":"claude-2","documentText":"","systemMessage":"You are a helpful AI assistant.","chatID":"ch-dfad4a34-7112-42cc-8468-3f5b2eb7a850","updatedAt":"2023-08-06T11:58:15.427Z","syncedAt":null},{"messages":[{"role":"system","plugins":[{"id":"get_web_search_results","title":"Web Search","emoji":"\uD83D\uDD0D"}],"originalContent":"You are a helpful AI assistant.","content":"You are a helpful AI assistant."},{"role":"user","content":"What is the current top stories on hacker news?"},{"content":null,"role":"assistant","function_call":{"name":"get_web_search_results","arguments":"{\\n \\"keyword\\": \\"top stories hacker news\\"\\n}"},"usage":{"completion_tokens":0,"prompt_tokens":18,"total_tokens":18},"model":"gpt-4"},{"role":"function","type":"tool-response","name":"get_web_search_results","content":"\\nTitle: Top Links | Hacker News\\nResult: Hacker News \xb7 1. Bram Moolenaar has died (groups.google.com) \xb7 2. Successful room temperature ambient-pressure magnetic levitation of LK-99 (arxiv.org) \xb7 3. A list\xa0...\\nURL: https://news.ycombinator.com/best\\n\\nTitle: HackerNews/API: Documentation and Samples for the ... - GitHub\\nResult: Hacker News API Overview URI and Versioning Design Items Users Live Data Max Item ID New, Top and Best Stories Ask, Show and Job Stories Changed Items and\xa0...\\nURL: https://github.com/HackerNews/API\\n\\nTitle: Ask HN: Best books read in 2022? | Hacker News\\nResult: \\"The Dawn of Everything: A New History of Humanity\\" by Graeber and Wengrow since it really shows how narrow our political imagination has been for the last 250\xa0...\\nURL: https://news.ycombinator.com/item?id=33849267\\n\\nTitle: Top Hacker News Books of All Time\\nResult: 1. Code: The Hidden Language of Computer Hardware and Software \xb7 2. Why We Sleep: Unlocking the Power of Sleep and Dreams \xb7 3. Influence: The Psychology of\xa0...\\nURL: https://hackernewsbooks.com/top-books-on-hacker-news\\n\\nTitle: Daily top stories from Hacker News* http://www.daemonology.n...\\nResult: Hacker News Daily: Daily top stories from Hacker News. http://www.daemonology.net/hn-daily/. The 10 highest-rated articles on Hacker News [.\\nURL: https://news.ycombinator.com/item?id=23784070\\n\\nTitle: The Hacker News | #1 Trusted Cybersecurity News Site\\nResult: The Hacker News is the most trusted and popular cybersecurity publication for information security professionals seeking breaking news, actionable insights\xa0...\\nURL: https://thehackernews.com/\\n\\nTitle: Hacker News Books\\nResult: The Best Books Mentioned On Hacker News This Week \xb7 1. The No-Cry Sleep Solution for Toddlers and Preschoolers: Gentle Ways to Stop Bedtime Battles and Improve\xa0...\\nURL: https://hackernewsbooks.com/\\n\\nTitle: javascript - How to display all stories from the Hacker News API on ...\\nResult: Aug 2, 2019 ... Here is an example of how you can use the \\"HackerNews API\\": First, the TopStories endpoint returns a list of post ids .\\nURL: https://stackoverflow.com/questions/57327773/how-to-display-all-stories-from-the-hacker-news-api-on-my-react-app-when-loading\\n\\nTitle: Search Hacker News\\nResult: Hacker News Search, millions articles and comments at your fingertips.\\nURL: https://hn.algolia.com/\\n\\nTitle: Hacker News\\nResult: New and Top Stories. get/topstories.json. Up to 500 top and new stories are at https://hacker-news.firebaseio.com/v0/topstories and\xa0...\\nURL: https://hackernews.api-docs.io/v0/live-data/new-and-top-stories\\n"},{"content":"The top stories being discussed on Hacker News right now are:\\n\\n1. The unfortunate passing of Bram Moolenaar. [[source]](https://groups.google.com)\\n2. A publication about successful room temperature ambient-pressure magnetic levitation of LK-99. [[source]](https://arxiv.org)\\n3. A discussion on the best books read in 2022 with \\"The Dawn of Everything: A New History of Humanity\\" by Graeber and Wengrow being highlighted. [[source]](https://news.ycombinator.com/item?id=33849267)\\n\\nPlease note the stories change frequently as the community upvotes new discussions.","role":"assistant","usage":{"completion_tokens":146,"prompt_tokens":735,"total_tokens":881},"model":"gpt-4","titleUsage":{"prompt_tokens":280,"completion_tokens":44,"total_tokens":324},"keywords":["Bram Moolenaar","room temperature ambient-pressure magnetic levitation","LK-99","The Dawn of Everything: A New History of Humanity","Graeber and Wengrow"]}],"chatTitle":"(Example) Web Search","model":"gpt-4","documentText":"","systemMessage":"You are a helpful AI assistant.","chatID":"ch-8204bffc-11e3-41fa-8476-309b87e265b5","updatedAt":"2023-08-06T11:54:22.285Z","syncedAt":null},{"messages":[{"role":"system","plugins":[],"originalContent":"You are a helpful AI assistant.","content":"You are a helpful AI assistant."},{"role":"user","content":"How to send a http request in python?"},{"content":"To send a HTTP request in Python, you can use the `requests` library. Here\'s an example of how you can send a GET request:\\n\\n```python\\nimport requests\\n\\nurl = \\"https://api.example.com/data\\"\\nresponse = requests.get(url)\\n\\nif response.status_code == 200:\\n # Request successful, you can access the response data using response.text, response.json(), etc.\\n print(response.text)\\nelse:\\n # Request failed, display the error code\\n print(f\\"Request failed with status code: {response.status_code}\\")\\n```\\n\\nIn this example, we import the `requests` library and define the URL we want to send a request to. We then use the `requests.get()` method to send a GET request to that URL. The response from the server is stored in the `response` variable.\\n\\nYou can check the status code of the response to see if the request was successful (e.g., 200 for success, 404 for not found, etc.). If the request was successful, you can access the response data using `response.text`, `response.json()`, or other methods depending on the type of response you expect.\\n\\nIf the request fails, you can handle the error by displaying the error code or taking appropriate action based on your application\'s needs.\\n\\nNote: Before using the `requests` library, you need to make sure it is installed on your system. You can install it using pip: `pip install requests`.","role":"assistant","usage":{"completion_tokens":346,"prompt_tokens":17,"total_tokens":363},"model":"gpt-3.5-turbo","titleUsage":{"prompt_tokens":443,"completion_tokens":29,"total_tokens":472},"keywords":["send HTTP request in Python","requests library Python","GET request Python","response.status_code Python","install requests library Python"]}],"chatTitle":"(Example) Coding Help","model":"gpt-3.5-turbo","documentText":"","systemMessage":"You are a helpful AI assistant.","chatID":"ch-ed03a8f9-5c20-4c8d-9fe1-571e6b17826c","updatedAt":"2023-08-06T11:52:50.475Z","syncedAt":null}]}')},1841:function(e){"use strict";e.exports=JSON.parse('[{"uuid":"51bb73c9-9a33-46f0-ba3e-07094b5a3d95","id":"get_web_search_results","emoji":"\uD83D\uDD0D","title":"Web Search","userSettings":[{"name":"searchEngineID","label":"Search Engine ID","required":true},{"name":"searchEngineAPIKey","label":"Search Engine API Key","type":"password","required":true}],"openaiSpec":{"name":"get_web_search_results","description":"Search for information from the internet in real-time using Google Search.","parameters":{"type":"object","properties":{"keyword":{"type":"string","description":"The search keyword"}},"required":["keyword"]}},"httpAction":{"id":"03544138-b83c-426f-b157-636e87907aae","method":"GET","name":"","url":"https://customsearch.googleapis.com/customsearch/v1?q={keyword}&cx={searchEngineID}&key={searchEngineAPIKey}","resultTransform":{"engine":"jmes","expression":"items[*].{Title: title, Result: snippet, Link: link}"},"hasResultTransform":true},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"This plugin allows the AI assistant to search for information from the internet in real-time using Google Search.\\n\\n**\uD83D\uDD11 Search API Key needed**. Click the Settings tab and enter your Google Search API Key and Search Engine ID. To get your Google Search API Key and Search Engine ID, follow [the instructions here](https://docs.typingmind.com/other-resources/how-tos/how-to-get-search-engine-id-and-api-key-on-programmable-search-engine-by-google)\\n\\nExample usage:\\n\\n> What\'s the gold price?\\n\\n> How\'s the weather at HCMC at the moment?\\n","code":"function get_web_search_results(params, userSettings) {\\n var keyword = params.keyword;\\n var cx = userSettings.searchEngineID;\\n var key = userSettings.searchEngineAPIKey;\\n\\n if (!cx || !key) {\\n throw new Error(\\n \'Please set the Search Engine ID and API Key in the plugin settings.\'\\n );\\n }\\n\\n return fetch(\\n `https://customsearch.googleapis.com/customsearch/v1?q=${encodeURIComponent(\\n keyword\\n )}&key=${key}&cx=${cx}`\\n )\\n .then((r) => r.json())\\n .then((response) => {\\n if (response.error) {\\n throw new Error(\'Error: \' + response.error.message);\\n }\\n const items = response.items;\\n return items\\n .map(\\n (item) => `\\nTitle:${item.title}\\nResult:${item.snippet}\\nURL:${item.link}\\n `\\n )\\n .join(\'\');\\n });\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-web-search","system":true,"org":null},{"uuid":"70606b50-137b-45c3-8688-545398dc85a0","id":"search_via_perplexity","iconURL":"https://custom.typingmind.com/assets/models/perplexityai.png","emoji":"\uD83D\uDD0D","title":"Perplexity Search","userSettings":[{"name":"apiKey","label":"Perplexity API Key","type":"password","required":true,"description":"Get your API Key from Perplexity: https://www.perplexity.ai/settings/api"},{"name":"model","label":"Model","description":"Optional, default: \\"llama-3.1-sonar-small-128k-online\\"","defaultValue":"llama-3.1-sonar-small-128k-online"},{"name":"systemMessage","label":"System Message","description":"Optional, default: \\"Be precise and concise\\"","defaultValue":"Be precise and concise"}],"openaiSpec":{"name":"search_via_perplexity","description":"Search for information from the internet using Perplexity.","parameters":{"type":"object","properties":{"keyword":{"type":"string","description":"The search keyword"}},"required":["keyword"]}},"httpAction":{"id":"b156833f-9599-4155-bba9-e713dd21aa01","method":"POST","name":"","url":"https://api.perplexity.ai/chat/completions","requestBody":"{\\"model\\": \\"{model}\\",\\"messages\\": [{\\"role\\": \\"system\\",\\"content\\": \\"{systemMessage}\\"},{\\"role\\": \\"user\\",\\"content\\": \\"{keyword}\\"}]}","requestHeaders":"{\\"accept\\": \\"application/json\\",\\"authorization\\": \\"Bearer {apiKey}\\"}","resultTransform":{"engine":"jmes","expression":"choices[*].message.content | join(\' \', @)"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"This plugin allows the AI assistant to search for information from the internet using Perplexity.\\n\\n**\uD83D\uDD11 Perplexity API Key needed**. Click the Settings tab and enter your API Key. Get your Perplexity API Key from [here](https://www.perplexity.ai/settings/api)\\n\\nExample usage:\\n\\n> What\'s the gold price?\\n\\n> How\'s the weather at HCMC at the moment?\\n","code":"function search_via_perplexity(params, userSettings) {\\n const keyword = params.keyword;\\n const model = userSettings.model || \'llama-3.1-sonar-small-128k-online\';\\n const systemMessage = userSettings.systemMessage || \'Be precise and concise.\';\\n const key = userSettings.apiKey;\\n\\n if (!key) {\\n throw new Error(\\n \'Please set the Perplexity API Key in the plugin settings.\'\\n );\\n }\\n\\n return fetch(\'https://api.perplexity.ai/chat/completions\', {\\n method: \'POST\',\\n headers: {\\n \'content-type\': \'application/json\',\\n accept: \'application/json\',\\n authorization: \'Bearer \' + key,\\n },\\n body: JSON.stringify({\\n model: model,\\n messages: [\\n {\\n role: \'system\',\\n content: systemMessage,\\n },\\n {\\n role: \'user\',\\n content: keyword,\\n },\\n ],\\n }),\\n })\\n .then((r) => r.json())\\n .then((response) => {\\n return response.choices.map((c) => c.message.content).join(\' \');\\n });\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-perplexity-search","system":true,"org":null},{"id":"image_generation_via_dalle_3","uuid":"0ee9d4d8-c453-40bd-b2e1-04b94e935fa2","userSettings":[{"name":"openaikey","label":"OpenAI API Key (Required)","description":"The images will be generated using this OpenAI API. Get your API key from https://platform.openai.com/account/api-keys","type":"password","required":true,"placeholder":"sk-******"},{"name":"resolution","label":"Resolution","description":"Optional, default: \\"1024x1024\\"","type":"enum","values":["1024x1024","1024x1792","1792x1024"]},{"name":"quality","label":"Quality","description":"Optional, default: \\"standard\\"","type":"enum","values":["standard","hd"]}],"emoji":"✨","title":"DALL-E 3","openaiSpec":{"name":"image_generation_via_dalle_3","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The description of the image as defined in the guidelines."}}},"description":"Generate images using DALL-E 3 based on image descriptions. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\nWhen creating prompts: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"httpAction":{"hasBody":true,"hasHeaders":true,"hasResultTransform":true,"id":"a317a913-6d54-4d0e-b2a0-285712d45640","method":"POST","name":"","requestBody":"{\\n \\"model\\": \\"dall-e-3\\",\\n \\"prompt\\": \\"{prompt}\\",\\n \\"n\\": 1,\\n \\"size\\": \\"{resolution}\\",\\n \\"quality\\": \\"{quality}\\",\\n \\"response_format\\": \\"url\\"\\n }","requestHeaders":"{\\n\\"Content-Type\\": \\"application/json\\",\\n\\"Authorization\\": \\"Bearer {openaikey}\\"\\n}","resultTransform":{"engine":"handlebars","templateString":"![{{data.[0].revised_prompt}}]({{data.[0].url}})\\n\\n_Note: Generated images will expire after 1 hour. Save them to your device if you wish to keep the images._"},"url":"https://api.openai.com/v1/images/generations"},"implementationType":"javascript","outputType":"render_markdown","overviewMarkdown":"## Dall-E 3\\n\\nDall-E 3 allows you to use state-of-the-art image generation with Dall-E 3 using the OpenAI API.\\n\\nMake sure you’ve entered your OpenAI API key in settings.\\n\\nExample usage:\\n\\n> Generate a picture of a cat\\n","code":"async function createOpenAIURL(prompt, openaikey, quality, resolution) {\\n var requestHeaders = new Headers();\\n requestHeaders.append(\'Content-Type\', \'application/json\');\\n requestHeaders.append(\'Authorization\', \'Bearer \' + openaikey);\\n\\n var raw = JSON.stringify({\\n model: \'dall-e-3\',\\n prompt: prompt,\\n n: 1,\\n size: resolution,\\n quality: quality,\\n response_format: \'url\',\\n });\\n\\n var requestOptions = {\\n method: \'POST\',\\n headers: requestHeaders,\\n body: raw,\\n redirect: \'follow\',\\n };\\n\\n let response = await fetch(\\n \'https://api.openai.com/v1/images/generations\',\\n requestOptions\\n );\\n if (response.status === 401) {\\n throw new Error(\'Invalid OpenAI API Key. Please check your settings.\');\\n }\\n\\n if (!response.ok) {\\n const errorText = await response.text();\\n throw new Error(errorText);\\n }\\n\\n let data = await response.json();\\n\\n let url = data.data[0].url;\\n\\n let endresult = \'![\' + prompt.replace(/[[]]/, \'\') + \'](\' + url + \')\';\\n return endresult;\\n}\\n\\nasync function generateOpenAIResult(prompts, openaikey, quality, resolution) {\\n const results = await Promise.all(\\n prompts.map((prompt) =>\\n createOpenAIURL(prompt, openaikey, quality, resolution)\\n )\\n );\\n return (\\n results.join(\'\\\\n\\\\n\') +\\n \'\\\\n_Note: Generated images will expire after 1 hour. Save them to your device if you wish to keep the images._\'\\n );\\n}\\n\\nasync function image_generation_via_dalle_3(params, userSettings) {\\n const openaikey = userSettings.openaikey;\\n const quality = getQuality(userSettings);\\n const resolution = getResolution(userSettings);\\n if (!openaikey) {\\n throw new Error(\\n \'No OpenAI key provided to the DALL-3 plugin. Please enter your OpenAI key in the plugin settings seperately and try again.\'\\n );\\n }\\n\\n const prompts = [\\n params.prompt\\n ].filter(Boolean);\\n const result = await generateOpenAIResult(\\n prompts,\\n openaikey,\\n quality,\\n resolution\\n );\\n return result;\\n}\\n\\nfunction getQuality(userSettings) {\\n // Only return userSettings quality if valid\\n if (!userSettings.quality) {\\n return \'standard\';\\n }\\n\\n switch (userSettings.quality.toLowerCase()) {\\n case \'hd\':\\n return \'hd\';\\n case \'standard\':\\n return \'standard\';\\n default:\\n return \'standard\';\\n }\\n}\\n\\nfunction getResolution(userSettings) {\\n switch (userSettings.resolution) {\\n case \'1024x1024\':\\n return \'1024x1024\';\\n case \'1024x1792\':\\n return \'1024x1792\';\\n case \'1792x1024\':\\n return \'1792x1024\';\\n default:\\n return \'1024x1024\'; // default resolution\\n }\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-dall-e-3","system":true,"org":null},{"id":"image_generation_via_stable_diffusion","uuid":"f582e880-16d8-4a02-b247-86b4cbe9b389","userSettings":[{"name":"stabilityAPIKey","required":true,"type":"password","label":"StabilityAI API Key","description":"Get your free API Key from StabilityAI: https://platform.stability.ai/account/keys"},{"name":"width","type":"number","label":"Width of the image (min: 320, max: 1536)","description":"Must be specified in increments of 64. (e.g. 512, 1024)","placeholder":"512","defaultValue":512},{"name":"height","type":"number","label":"Height of the image (min: 320, max: 1536)","description":"Must be specified in increments of 64. (e.g. 512, 1024)","placeholder":"512","defaultValue":512}],"emoji":"\uD83D\uDDBC️","title":"Stable Diffusion v2 Image","openaiSpec":{"name":"image_generation_via_stable_diffusion","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text description of the desired image."}}},"description":"Generate images using Stable Diffusion based on a text description. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\n\\nWhen creating prompt: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\n\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\n\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"httpAction":{"id":"86d0cd86-f4de-4ca4-b712-1bfb01dfbfe6","method":"POST","name":"","url":"https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image","requestBody":"{\\"text_prompts\\":[{\\"text\\":\\"{prompt}\\"}],\\"cfg_scale\\":7,\\"samples\\":1,\\"steps\\":30,\\"width\\":{width},\\"height\\":{height}}","requestHeaders":"{\\"Content-Type\\":\\"application/json\\",\\"Authorization\\":\\"Bearer {stabilityAPIKey}\\"}","resultTransform":{"engine":"handlebars","templateString":"![{{__VARIABLES.prompt}}](data:image/png;base64,{{artifacts.[0].base64}})"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"implementationType":"javascript","outputType":"render_markdown","overviewMarkdown":"# Stable Diffusion v2 Image\\n\\nGenerate Unique Images with the Stable Diffusion Plugin\\n\\nTransform your imagination into stunning visuals using the power of Stable Diffusion. Easily create captivating images from just a few words.\\n\\n**API Key Required:** You\'ll need a valid Stable API key. Obtain one from their website (free): https://platform.stability.ai/account/keys\\n\\n## Examples\\n\\n- \\"Create an image of a majestic lion standing proudly on a cliff overlooking a vast savanna at sunset.\\"\\n- \\"Generate a vibrant cyberpunk cityscape illuminated by neon signs and bustling with activity.\\"\\n- \\"Draw a photorealistic portrait of a woman with fiery red hair and emerald green eyes.\\"\\n","code":"async function image_generation_via_stable_diffusion(params, userSettings) {\\n const { prompt } = params;\\n const { stabilityAPIKey, width, height } = userSettings;\\n validateAPIKey(stabilityAPIKey);\\n\\n try {\\n const imageData = await generateImageFromStabilityAPI(\\n stabilityAPIKey,\\n prompt,\\n Number(width) || 512,\\n Number(height) || 512\\n );\\n\\n return imageData;\\n } catch (error) {\\n console.error(\'Error generating image:\', error);\\n throw new Error(`Error: ${error.message}`);\\n }\\n}\\n\\nfunction validateAPIKey(apiKey) {\\n if (!apiKey) {\\n throw new Error(\\n \'Please set a Stable Diffusion API Key in the plugin settings.\'\\n );\\n }\\n}\\nasync function generateImageFromStabilityAPI(apiKey, prompt, width, height) {\\n const apiUrl =\\n \'https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image\';\\n\\n const response = await fetch(apiUrl, {\\n method: \'POST\',\\n headers: {\\n \'Content-Type\': \'application/json\',\\n Authorization: `Bearer ${apiKey}`,\\n },\\n body: JSON.stringify({\\n text_prompts: [{ text: prompt }],\\n cfg_scale: 7,\\n samples: 1,\\n steps: 30,\\n width: width,\\n height: height,\\n }),\\n });\\n\\n if (!response.ok) {\\n const errorText = await response.text();\\n throw new Error(\\n `Stability API error: ${response.status}, Message: ${errorText}`\\n );\\n }\\n\\n const data = await response.json();\\n return `![${prompt}](data:image/png;base64,${data.artifacts[0].base64})`;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-stable-diffusion-v2-image","system":true,"org":null},{"id":"image_generation_via_stable_diffusion_3","uuid":"f582e880-16d8-4a02-b247-86b4cbe9b390","userSettings":[{"name":"stabilityAPIKey","required":true,"type":"password","label":"StabilityAI API Key","description":"Get your free API Key from StabilityAI: https://platform.stability.ai/account/keys"},{"name":"output_format","label":"Format of the generated image","description":"Optional, default: \\"png\\"","type":"enum","values":["png","jpeg"]},{"name":"aspect_ratio","label":"Aspect ratio of the generated image","description":"Optional, default: \\"1:1\\"","type":"enum","values":["16:9","1:1","21:9","2:3","3:2","4:5","5:4","9:16","9:21"]},{"name":"model","label":"Model to use for generation","description":"Optional, default: \\"sd3-large\\"","type":"enum","values":["sd3-medium","sd3-large","sd3-large-turbo"],"defaultValue":"sd3-large"},{"name":"negative_prompt","label":"Negative prompt","description":"Optional, a blurb of text describing what you do not wish to see in the output image"}],"iconURL":"https://www.typingmind.com/stable-diffusion.png","title":"Stable Diffusion v3 Image","openaiSpec":{"name":"image_generation_via_stable_diffusion_3","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text description of the desired image."}}},"description":"Generate images using Stable Diffusion v3 based on a text description. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\n\\nWhen creating prompt: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\n\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\n\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"httpAction":{"id":"4105dcae-c4c5-432f-91cd-af69188adda4","method":"POST","name":"","url":"https://api.stability.ai/v2beta/stable-image/generate/sd3","requestBody":"{\\"prompt\\":\\"{prompt}\\",\\"model\\":\\"{model}\\",\\"aspect_ratio\\":\\"{aspect_ratio}\\",\\"negative_prompt\\":\\"{negative_prompt}\\",\\"output_format\\":\\"{output_format}\\"}","requestBodyFormat":"form-data","requestHeaders":"{\\"Accept\\":\\"application/json; type=image/*\\",\\"Authorization\\":\\"Bearer {stabilityAPIKey}\\"}","resultTransform":{"engine":"handlebars","templateString":"![{{__VARIABLES.prompt}}](data:image/{{__VARIABLES.output_format}};base64,{{image}})"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"implementationType":"javascript","outputType":"render_markdown","overviewMarkdown":"# Stable Diffusion v3 Image\\n\\nGenerate Unique Images with the Stable Diffusion Plugin\\n\\nTransform your imagination into stunning visuals using the power of Stable Diffusion. Easily create captivating images from just a few words.\\n\\n**API Key Required:** You\'ll need a valid Stable API key. Obtain one from their website (free): https://platform.stability.ai/account/keys\\n\\n## Examples\\n\\n- \\"Create an image of a majestic lion standing proudly on a cliff overlooking a vast savanna at sunset.\\"\\n- \\"Generate a vibrant cyberpunk cityscape illuminated by neon signs and bustling with activity.\\"\\n- \\"Draw a photorealistic portrait of a woman with fiery red hair and emerald green eyes.\\"\\n","code":"async function image_generation_via_stable_diffusion_3(params, userSettings) {\\n const { prompt } = params;\\n const { stabilityAPIKey } = userSettings;\\n validateAPIKey(stabilityAPIKey);\\n\\n try {\\n const imageData = await generateImageFromStabilityAPI(\\n stabilityAPIKey,\\n prompt,\\n userSettings\\n );\\n\\n return imageData;\\n } catch (error) {\\n console.error(\'Error generating image:\', error);\\n throw new Error(\'Error: \' + error.message);\\n }\\n}\\n\\nfunction validateAPIKey(apiKey) {\\n if (!apiKey) {\\n throw new Error(\\n \'Please set a Stable Diffusion API Key in the plugin settings.\'\\n );\\n }\\n}\\nasync function generateImageFromStabilityAPI(\\n apiKey,\\n prompt,\\n { output_format, aspect_ratio, model, negative_prompt } = {}\\n) {\\n const apiUrl = \'https://api.stability.ai/v2beta/stable-image/generate/sd3\';\\n\\n const body = new FormData();\\n\\n body.append(\'prompt\', prompt);\\n\\n output_format && body.append(\'output_format\', output_format);\\n aspect_ratio && body.append(\'aspect_ratio\', aspect_ratio);\\n model && body.append(\'model\', model);\\n negative_prompt && body.append(\\"negative_prompt\\", negative_prompt);\\n\\n const response = await fetch(apiUrl, {\\n method: \'POST\',\\n headers: {\\n Authorization: \'Bearer \' + apiKey,\\n Accept: \'application/json; type=image/*\',\\n },\\n body: body,\\n });\\n\\n if (!response.ok) {\\n const errorText = await response.text();\\n throw new Error(\\n `Stability API error: ${response.status}, Message: ${errorText}`\\n );\\n }\\n\\n const data = await response.json();\\n return `![${prompt}](data:image/${output_format || \'png\'};base64,${\\n data.image\\n })`;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-stable-diffusion-v3-image","system":true,"org":null},{"id":"search_images_via_google","uuid":"1ac26080-96ca-47ed-bd10-f62454bae2dc","userSettings":[{"name":"searchEngineID","label":"Search Engine ID","required":true},{"name":"searchEngineAPIKey","label":"Search Engine API Key","type":"password","required":true}],"emoji":"\uD83C\uDF05","title":"Image Search","openaiSpec":{"name":"search_images_via_google","description":"Search for images from the internet in real-time using Google Search.","parameters":{"type":"object","properties":{"keyword":{"type":"string","description":"The search keyword"}},"required":["keyword"]}},"httpAction":{"id":"8bda801d-9017-434c-92e4-64d5b6ef7ffa","method":"GET","name":"","url":"https://www.googleapis.com/customsearch/v1?q={keyword}&cx={searchEngineID}&key={searchEngineAPIKey}&searchType=image","resultTransform":{"engine":"jmes","expression":"items[*].{Title: title, Link: link}"},"hasResultTransform":true},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"## Image Search\\n\\nAllows the AI assistant to search the web or images using Google search.\\n\\n**\uD83D\uDD11 Search API Key needed**. Click the Settings tab and enter your Google Search API Key and Search Engine ID. To get your Google Search API Key and Search Engine ID, follow [the instructions here](https://docs.typingmind.com/other-resources/how-tos/how-to-get-search-engine-id-and-api-key-on-programmable-search-engine-by-google)\\n\\nExample usage:\\n\\n> Show me a cute cat picture\\n","code":"function search_images_via_google(params, userSettings) {\\n var keyword = params.keyword;\\n var cx = userSettings.searchEngineID;\\n var key = userSettings.searchEngineAPIKey;\\n\\n if (!cx || !key) {\\n throw new Error(\\n \'Please set the Search Engine ID and API Key in the plugin settings.\'\\n );\\n }\\n\\n let url = `https://www.googleapis.com/customsearch/v1?q=${keyword}&cx=${cx}&key=${key}&searchType=image`;\\n\\n return fetch(url)\\n .then((response) => response.json())\\n .then((data) => {\\n if (!data.items) {\\n throw new Error(\\n \'Cannot search images. Make sure you have enable Image Search in your Google Search Engine settings.\'\\n );\\n }\\n return data.items.map((item) => ({\\n title: item.title,\\n snippet: item.snippet,\\n imageURL: item.link,\\n }));\\n });\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-image-search","system":true,"org":null},{"id":"read_web_page_content","uuid":"aa2ebdf6-564e-4994-8d30-1b9f13f9518a","userSettings":[{"name":"pluginServer","label":"Plugin Server","placeholder":"https://...","description":"The URL of the plugin server","required":true}],"emoji":"\uD83D\uDCC3","title":"Web Page Reader","openaiSpec":{"name":"read_web_page_content","parameters":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of the article to be summarized"}}},"description":"Read the content of a web page via its URL."},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"# Web Page Reader\\n\\nRead the text content from a web URL.\\n\\n**Important Notes:**\\n\\n- This plugin requires a plugin server to be set up. [Learn how to set up a plugin server here (open-source)](https://docs.typingmind.com/plugins/plugins-server/how-to-deploy-plugins-server-on-render)\\n- Long web pages may results in long response and consume more tokens or exceed the maximum context length. This plugin is best used for short articles or blog posts.\\n\\n## Example usage\\n\\n- \\"summarise this article https://www.cnbc.com/2024/03/15/ceo-of-top-ocean-freight-carrier-hapag-lloyd-on-global-economy-demand.html\\"\\n","code":"async function fetchPageContent(url, pluginServer) {\\n const response = await fetch(\\n `${pluginServer}/get-content?url=${encodeURIComponent(url)}`\\n );\\n\\n if (!response.ok) {\\n throw new Error(\\n `Failed to fetch web content: ${response.status} - ${response.statusText}`\\n );\\n }\\n\\n const data = await response.json();\\n return data.responseObject;\\n}\\n\\nasync function read_web_page_content(params, userSettings) {\\n const { url } = params;\\n const { pluginServer } = userSettings;\\n\\n if (!pluginServer) {\\n throw new Error(\\n \'Missing plugin server URL. Please set it in the plugin settings.\'\\n );\\n }\\n\\n const cleanPluginServer = pluginServer.replace(/\\\\/$/, \'\');\\n\\n try {\\n return await fetchPageContent(url, cleanPluginServer);\\n } catch (error) {\\n console.error(\'Error summarizing webpage:\', error);\\n return \'Error: Unable to generate a summary. Please try again later.\';\\n }\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-web-page-reader","system":true,"org":null},{"id":"fetch_market_news_sentiment","uuid":"345e2340-4831-4f9f-a495-cea4a96b6575","userSettings":[{"name":"alphaVantageAPIKey","required":true,"type":"password","label":"Alpha Vantage API Key"}],"emoji":"\uD83D\uDCC8","title":"Market News","openaiSpec":{"name":"fetch_market_news_sentiment","parameters":{"type":"object","required":[],"properties":{"time_to":{"type":"string","format":"date-time","description":"End date and time of news range (YYYYMMDDTHHMM format)"},"time_from":{"type":"string","format":"date-time","description":"Start date and time of news range (YYYYMMDDTHHMM format)"},"searchMode":{"enum":["tickers","topics"],"type":"string","description":"Choose whether to search by tickers or topics."},"searchTerms":{"type":"string","description":"Comma-separated tickers (if searchMode is \'tickers\') or topics (if searchMode is \'topics\'). tickers is the stock/crypto/forex symbols of your choice. For example: tickers=IBM will filter for articles that mention the IBM ticker; tickers=COIN,CRYPTO:BTC,FOREX:USD will filter for articles that simultaneously mention Coinbase (COIN), Bitcoin (CRYPTO:BTC), and US Dollar (FOREX:USD) in their content. make sure add COIN for tickers is user search crypto. topics is he news topics of your choice. For example: topics=technology will filter for articles that write about the technology sector; topics=technology,ipo will filter for articles that simultaneously cover technology and IPO in their content. Below is the full list of supported topics: Blockchain: blockchain Earnings: earnings IPO: ipo Mergers & Acquisitions: mergers_and_acquisitions Financial Markets: financial_markets Economy - Fiscal Policy (e.g., tax reform, government spending): economy_fiscal Economy - Monetary Policy (e.g., interest rates, inflation): economy_monetary Economy - Macro/Overall: economy_macro Energy & Transportation: energy_transportation Finance: finance Life Sciences: life_sciences Manufacturing: manufacturing Real Estate & Construction: real_estate Retail & Wholesale: retail_wholesale Technology: technology"}}},"description":"Fetches market news articles from Alpha Vantage. This plugin automatically displays the fetched news results to the user. Your response should not include any additional output intended for the user."},"implementationType":"javascript","outputType":"render_html","overviewMarkdown":"## Market News\\n\\nProvides up-to-date financial information from Alpha Vantage.\\n\\n- **API Key Required**: You need an Alpha Vantage API key to use this plugin. Get yours for free at [https://www.alphavantage.co/support/#api-key](https://www.alphavantage.co/support/#api-key).\\n\\n## Get Real-Time Market Insights with the Market News Plugin\\n\\nThis plugin empowers you to stay on top of the latest market trends by fetching live and historical market news and sentiment data directly within your workspace.\\n\\n**Example Queries**\\n\\n- **\\"Give me market news about Apple stock\\"**\\n- **\\"Show me the latest news about Bitcoin\\"**\\n- **\\"Give me news about the IPO and earnings in the finance sector from last week\\"**\\n","code":"async function fetch_market_news_sentiment(params, userSettings) {\\n const { searchMode, searchTerms, time_from, time_to } = params;\\n const { alphaVantageAPIKey } = userSettings;\\n\\n if (!alphaVantageAPIKey) {\\n return displayErrorMessage(\\n \'Please provide an Alpha Vantage API key in plugin settings\'\\n );\\n }\\n\\n const queryParams = buildQueryParams(\\n searchMode,\\n searchTerms,\\n time_from,\\n time_to,\\n alphaVantageAPIKey\\n );\\n const apiUrl = `https://www.alphavantage.co/query?${queryParams}`;\\n\\n try {\\n const response = await fetch(apiUrl);\\n handleResponseError(response);\\n\\n const data = await response.json();\\n handleDataError(data);\\n\\n const newsFeed = data.feed;\\n handleNewsFeedError(newsFeed, searchTerms);\\n\\n return generateHTML(newsFeed);\\n } catch (error) {\\n throw new Error(error.message);\\n }\\n}\\n\\nfunction buildQueryParams(\\n searchMode,\\n searchTerms,\\n time_from,\\n time_to,\\n alphaVantageAPIKey\\n) {\\n const queryParams = new URLSearchParams({\\n function: \'NEWS_SENTIMENT\',\\n apikey: alphaVantageAPIKey,\\n limit: 5,\\n sort: \'RELEVANCE\',\\n });\\n\\n if (searchMode === \'tickers\') {\\n queryParams.set(\'tickers\', searchTerms);\\n } else if (searchMode === \'topics\') {\\n queryParams.set(\'topics\', searchTerms);\\n }\\n\\n if (time_from) queryParams.set(\'time_from\', time_from);\\n if (time_to) queryParams.set(\'time_to\', time_to);\\n\\n return queryParams;\\n}\\n\\nfunction handleResponseError(response) {\\n if (!response.ok) {\\n throw new Error(`API Error: ${response.status}`);\\n }\\n}\\n\\nfunction handleDataError(data) {\\n if (data.Information) {\\n if (data.Information.includes(\'Invalid inputs\')) {\\n throw new Error(\'No news found for the search terms.\');\\n }\\n throw new Error(data.Information);\\n }\\n}\\n\\nfunction handleNewsFeedError(newsFeed, searchTerms) {\\n if (newsFeed.length === 0) {\\n throw new Error(\\n `No news found for the search terms: ${searchTerms}. Let try with specific symbols, example: GOOG, AAPL, TSLA, etc, or include \\"topics\\" in the search terms`\\n );\\n }\\n}\\n\\nfunction generateHTML(newsFeed) {\\n return `\\n
\\n \\n ${newsFeed\\n .slice(0, 5)\\n .map((article) => {\\n let formattedTime = formatTime(article.time_published);\\n return `\\n
\\n
\\n \\"${article.title}\\"\\n
\\n
\\n

${\\n article.title\\n }

\\n

Source: ${\\n article.source\\n } - Published: ${formattedTime}

\\n

${article.summary || \'Summary not available\'}

\\n
\\n
\\n `;\\n })\\n .join(\'\')}\\n
\\n `;\\n}\\n\\nfunction formatTime(timePublished) {\\n let year = timePublished.slice(0, 4);\\n let month = timePublished.slice(4, 6);\\n let day = timePublished.slice(6, 8);\\n let hour = timePublished.slice(9, 11);\\n let minute = timePublished.slice(11, 13);\\n let second = timePublished.slice(13, 15);\\n\\n let date = new Date(year, month - 1, day, hour, minute, second);\\n return date.toLocaleString();\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-market-news","system":true,"org":null},{"uuid":"8cbc7b5b-62bd-428a-83a3-448f51bff58e","id":"get_calculation_result","emoji":"\uD83E\uDDEE","userSettings":null,"title":"Simple Calculator","openaiSpec":{"name":"get_calculation_result","description":"Calculate a math expression. For example, \\"2 + 2\\" or \\"2 * 2\\". The expression must be a valid JavaScript math expression.","parameters":{"type":"object","properties":{"expression":{"type":"string","description":"A valid JavaScript math expression for the calculation."}},"required":["expression"]}},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"Help the AI assistant does math calculations more accurately.\\n\\nExample usage:\\n\\n> What is the total of 2 plus 2?\\n\\n> What is 2^10?\\n","code":"function get_calculation_result(params) {\\n return eval(params.expression);\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-simple-calculator","system":true,"org":null},{"uuid":"c312e33b-135c-4299-bcce-e88344cf276d","id":"execute_javascript","userSettings":null,"emoji":"⌨️","title":"JavaScript Interpreter","openaiSpec":{"name":"execute_javascript","description":"Execute a JavaScript code snippet that evaluates to a readable value or a Promise. Use this function to evaluate a JavaScript expression, send a fetch request, or use other JavaScript features or Browser APIs. The JavaScript will be executed on the user\'s local browser in a secure sandboxed context.","parameters":{"type":"object","properties":{"code":{"type":"string","description":"A valid JavaScript code snippet to be executed on the browser."}},"required":["code"]}},"implementationType":"javascript","outputType":"respond_to_ai","overviewMarkdown":"## JavaScript Interpreter\\n\\nThis is an example plugin for plugin developers. [Learn how to develop Typing Mind plugins here](https://www.typingmind.com/plugins-docs).\\n\\nThis plugin allows the AI assistant to run any JavaScript on your browser in a sandboxed secure environment.\\n\\nExample usage:\\n\\n> Send a request to the GitHub public API\\n\\n> What is the current time?\\n","code":"async function execute_javascript(params) {\\n try {\\n // remove \\"return\\" keyword in case the AI confused that the code is inside a function\\n const cleanCode = params.code.replace(/^return /, \'\');\\n return await eval(cleanCode);\\n } catch (e) {\\n return \'Error: \' + e.message;\\n }\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-javascript-interpreter","system":true,"org":null},{"id":"render_interactive_canvas","uuid":"f76b6080-3e40-4f94-b4be-54297103956f","emoji":"\uD83D\uDD32","title":"Interactive Canvas","openaiSpec":{"name":"render_interactive_canvas","parameters":{"type":"object","required":["htmlSource"],"properties":{"htmlSource":{"type":"string","description":"The HTML source to render to the canvas."},"canvasHeight":{"type":"number","description":"The height of the canvas in pixels. Default is 500."}}},"description":"Render an interactive canvas with HTML source to the user interface. The HTML source can include JavaScript and CSS to create interactive elements. This can be used to create custom user interfaces, games, demos, charts, and more. The canvas width is always 100% of the container width, and the height can be specified in pixels."},"implementationType":"javascript","outputType":"render_html","overviewMarkdown":"## Interactive Canvas\\n\\nAllow the AI to create an interactive canvas with the user.\\n\\nThe canvas can be used to create forms, HTML/JS/CSS code, games, visualizations, or any other interactive content.\\n\\nExample usage:\\n\\n> create a form with a text input and a submit button\\n\\n> render a simple tictactoe game\\n\\n> render a smiley face in SVG in the interactive canvas\\n","code":"async function render_interactive_canvas(params, userSettings) {\\n const htmlSource = params.htmlSource;\\n return htmlSource;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-interactive-canvas","system":true,"org":null},{"id":"render_mermaid_diagram","uuid":"0bb7f6b3-d454-4ddd-a140-06d5dc2cd24d","title":"Mermaid Diagram","iconURL":"https://raw.githubusercontent.com/TypingMind/plugin-mermaid-diagram/main/mermaid.svg","openaiSpec":{"name":"render_mermaid_diagram","parameters":{"type":"object","required":["title","source"],"properties":{"title":{"type":"string","description":"The title of the diagram."},"source":{"type":"string","description":"The Mermaid diagram source in raw text to render."}}},"description":"Generate a diagram using Mermaid.js (version 10.x). This can be used to render various types of diagrams, including Flowchart, Sequence Diagram, Class Diagram, State Diagram, Entity Relationship Diagram, User Journey, Gantt, Pie Chart, Quadrant Chart, Requirement Diagram, Gitgraph Diagram, C4 Diagram, Mindmaps, Timeline, Zenuml, Sankey, XYChart, Block Diagram, etc."},"implementationType":"javascript","outputType":"render_html","overviewMarkdown":"## Mermaid Diagram\\n\\nGenerate and render diagrams using the Mermaid.js library.\\n\\nThis can be used to render various types of diagrams, including Flowchart, Sequence Diagram, Class Diagram, etc.\\n\\n[Learn how to develop Typing Mind plugins here](https://www.typingmind.com/plugins-docs).\\n\\n### Example usage:\\n\\n> render a state diagram of a simple traffic light system\\n\\n> render a sequence diagram of a simple message exchange\\n","code":"function render_mermaid_diagram(params) {\\n const { title, source } = params;\\n\\n const htmlString = `\\n\\n\\n\\n \\n \\n ${title}\\n \\n\\n\\n
\\n${source}\\n
\\n\\n\\n `;\\n return htmlString;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-mermaid-diagram","system":true,"org":null},{"id":"query_training_data","uuid":"16a65367-04c1-418d-a5c9-69d4faf3715e","userSettings":[{"name":"searchServiceName","label":"Search Service Name","description":"Find this in the \\"Azure AI Services\\" section in the Azure portal.","required":true},{"name":"indexName","label":"Index Name","description":"Find this in \\"Search managements\\" → \\"Indexes\\" page in the Azure portal.","required":true},{"name":"queryKey","type":"password","label":"Query Key","description":"Find this in \\"Settings\\" → \\"Keys\\" page in the Azure portal.","required":true},{"name":"apiVersion","label":"API Version","required":true,"description":"Find the latest API version here: https://learn.microsoft.com/en-us/rest/api/searchservice/search-service-api-versions","defaultValue":"2023-11-01"}],"iconURL":"https://custom.typingmind.com/assets/models/azureopenai.png","title":"Azure AI Search","openaiSpec":{"name":"query_training_data","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The keywords or topics to search for the internal training data. Multiple keywords or topics are accepted (separated with commas)."}}},"description":"Search the internal training data for relevant information. When the user ask you something you don\'t know, you can use this function to search for relevant information in the internal training data. Don\'t use questions as search query, use keywords instead. The search query should contains the keywords or topics related to the conversation."},"httpAction":{"id":"6a69b196-c5de-4550-9ad2-bf717f4808f2","url":"https://{searchServiceName}.search.windows.net/indexes/{indexName}/docs/search?api-version={apiVersion}","name":"","method":"POST","hasBody":true,"hasHeaders":true,"requestBody":"{\\n \\"search\\": \\"{query}\\"\\n}","requestHeaders":"{\\n \\"api-key\\": \\"{queryKey}\\"\\n}"},"implementationType":"http","system":true,"outputType":"respond_to_ai","overviewMarkdown":"# Azure AI Search (Cognitive Search)\\n\\nThis plugin connects TypingMind to your training data in Azure AI Search (Cognitive Search).\\n\\n## How to use\\n\\nWhen the user asks the AI a question but the AI does not have the answer, the AI will query the training data in Azure AI Search to find the answer.\\n\\nSometimes, you need to ask the AI to specifically search from the training data if the AI does not do it automatically.\\n\\nExample:\\n\\n > \\"search from training data for the latest refund policy\\"\\n > \\"who is the founder of the company (search from training data)\\"\\n\\n## Configuration\\n\\nTo use this plugin, you need to have an Azure AI Search service and an index with training data.\\n\\n**[Step-by-step Guide](https://docs.typingmind.com/plugins/set-up-query-training-data-azure-ai-search)** \\n\\nTo get started with Azure AI Search, follow the [official documentation](https://docs.microsoft.com/en-us/azure/search/search-what-is-azure-search).\\n\\n**Note:** if you use this plugin in client side, the CORS setting must be set to \\"All\\" in the Azure AI Search service. Go to Azure Portal -> Azure AI Search -> Indexes -> CORS -> Select \\"All\\" in the \\"Allowed origin type\\" section.\\n","code":"","githubURL":"https://github.com/TypingMind/plugin-query-azure-training-data","org":null},{"id":"render_chart","uuid":"9cff2e31-1e10-4b45-b2b7-87edc20865bc","title":"Render Chart","iconURL":"https://raw.githubusercontent.com/TypingMind/plugin-render-chart/main/icon.png","openaiSpec":{"name":"render_chart","parameters":{"type":"object","required":["title","chartType","data","options"],"properties":{"title":{"type":"string","description":"The title of the chart"},"chartType":{"enum":["line","bar","doughnut","pie","radar","polarArea","bubble","scatter"],"type":"string","description":"Type of the chart to render"},"data":{"type":"object","required":["labels","datasets"],"properties":{"labels":{"type":"array","items":{"type":"string"},"description":"Labels for the chart"},"datasets":{"type":"array","items":{"type":"object","required":["label","data"],"properties":{"data":{"type":"array","items":{"type":"number"},"description":"Data points for the dataset"},"label":{"type":"string","description":"Label for the dataset"},"fill":{"type":"object","description":"Both line and radar charts support a fill option on the dataset object which can be used to create space between two datasets or a dataset and a boundary, i.e. the scale"},"borderColor":{"type":"array","items":{"type":"string","description":"Border color of the item"},"description":"Border color for the dataset"},"borderWidth":{"type":"number","description":"Border width for the dataset"},"backgroundColor":{"type":"array","items":{"type":"string","description":"Color of the item"},"description":"Background color for the dataset"},"borderSkipped":{"type":"string","description":"This setting is used to avoid drawing the bar stroke at the base of the fill, or disable the border radius. In general, this does not need to be changed except when creating chart types that derive from a bar chart."},"borderRadius":{"type":"number","description":"If this value is a number, it is applied to all corners of the rectangle (topLeft, topRight, bottomLeft, bottomRight), except corners touching the borderSkipped. If this value is an object, the topLeft property defines the top-left corners border radius. Similarly, the topRight, bottomLeft, and bottomRight properties can also be specified. Omitted corners and those touching the borderSkipped are skipped. For example if the top border is skipped, the border radius for the corners topLeft and topRight will be skipped as well."},"stepped":{"type":"string","enum":["false","true","before","after","middle"],"description":"false: No Step Interpolation (default); true: Step-before Interpolation (eq. before); \'before\': Step-before Interpolation; \'after\': Step-after Interpolation; \'middle\': Step-middle.\\n InterpolationIf the stepped value is set to anything other than false, tension will be ignored."},"tension":{"type":"number","description":"Bezier curve tension of the line. Set to 0 to draw straightlines. This option is ignored if monotone cubic interpolation is used."}}},"description":"Datasets to be rendered in the chart"}},"description":"Data to be rendered in the chart"},"options":{"type":"object","description":"Additional options for the Chart.js chart","properties":{"responsive":{"type":"boolean","description":"When true, the chart will re-render if the browser window is resized."},"maintainAspectRatio":{"type":"boolean","description":"When true, the chart maintains the original canvas aspect ratio (width/height) when resizing."},"aspectRatio":{"type":"number","description":"Canvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas). Note that this option is ignored if the height is explicitly defined either as attribute or via the style. The default value varies by chart type; Radial charts (doughnut, pie, polarArea, radar) default to 1 and others default to 2."},"scales":{"type":"object","description":"Configuration for chart scales","properties":{"y":{"type":"object","properties":{"beginAtZero":{"type":"boolean"}}},"x":{"type":"object","properties":{"beginAtZero":{"type":"boolean"}}}}},"plugins":{"type":"object","properties":{"legend":{"type":"object","properties":{"display":{"type":"boolean","description":"Is the legend shown? default = true"},"position":{"type":"string","enum":["top","left","right","bottom","chartArea"],"description":"Position of the legend. When using the \'chartArea\' option the legend position is at the moment not configurable, it will always be on the left side of the chart in the middle."}}},"tooltip":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}}}}},"description":"Generate a Chart.js chart"},"implementationType":"javascript","outputType":"render_html","overviewMarkdown":"## Render Chart\\n\\nThis is a plugin to visualize data by drawing charts.\\n\\n[Learn how to develop Typing Mind plugins here](https://www.typingmind.com/plugins-docs).\\n\\n### Example usage:\\n\\n> create a bar chart with the following data: labels: [\\"Red\\", \\"Blue\\", \\"Yellow\\", \\"Green\\", \\"Purple\\", \\"Orange\\"], data: [12, 19, 3, 5, 2, 3]\\n\\n> render a pie chart with these categories: [\\"Electronics\\", \\"Fashion\\", \\"Home & Garden\\", \\"Toys\\", \\"Sports\\"], values: [25, 15, 20, 10, 30]","code":"function render_chart(params) {\\n const { chartType, options, title, data } = params;\\n const dataString = JSON.stringify(data)\\n .replace(/\\\\\\\\/g, \'\\\\\\\\\\\\\\\\\')\\n .replace(/\\"/g, \'\\\\\\\\\\"\')\\n .replace(/\\\\n/g, \'\\\\\\\\n\')\\n .replace(/\\\\r/g, \'\\\\\\\\r\')\\n .replace(/\\\\t/g, \'\\\\\\\\t\');\\n\\n const optionsString = JSON.stringify(options)\\n .replace(/\\\\\\\\/g, \'\\\\\\\\\\\\\\\\\')\\n .replace(/\\"/g, \'\\\\\\\\\\"\')\\n .replace(/\\\\n/g, \'\\\\\\\\n\')\\n .replace(/\\\\r/g, \'\\\\\\\\r\')\\n .replace(/\\\\t/g, \'\\\\\\\\t\');\\n\\n const htmlString = `\\n \\n \\n \\n ${title}\\n \\n \\n \\n \\n \\n \\n \\n `;\\n return htmlString;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-render-chart","system":true,"org":null},{"id":"render_html","uuid":"c6894955-44cf-46f3-958d-2b6d7f9e46c8","emoji":"\uD83D\uDDA5️","title":"Render HTML","openaiSpec":{"name":"render_html","parameters":{"type":"object","required":["htmlSource"],"properties":{"htmlSource":{"type":"string","description":"The HTML Source to render to the user interface."}}},"description":"Render a HTML source to the user interface that will be shown to the users for interactive contents."},"implementationType":"javascript","outputType":"render_html","overviewMarkdown":"## Render HTML\\n\\nThis is an example plugin for plugin developers. [Learn how to develop Typing Mind plugins here](https://www.typingmind.com/plugins-docs).\\n\\nThis plugin demonstrates how to render HTML to the end users.\\n\\nExample usage:\\n\\n> what are the HTML headings? render them.\\n\\n> create a ping pong game in html/js and render it\\n","code":"async function render_html(params, userSettings) {\\n const htmlSource = params.htmlSource;\\n return htmlSource;\\n}\\n","githubURL":"https://github.com/TypingMind/plugin-render-html","system":true,"org":null},{"uuid":"8d87b292-bcc2-400a-a5b3-5ae022d70909","id":"server_get_web_search_results","emoji":"\uD83D\uDD0D","title":"Web Search","userSettings":[{"name":"searchEngineID","label":"Search Engine ID","required":true},{"name":"searchEngineAPIKey","label":"Search Engine API Key","type":"password","required":true}],"openaiSpec":{"name":"server_get_web_search_results","description":"Search for information from the internet in real-time using Google Search.","parameters":{"type":"object","properties":{"keyword":{"type":"string","description":"The search keyword"}},"required":["keyword"]}},"httpAction":{"id":"03544138-b83c-426f-b157-636e87907aae","method":"GET","name":"","url":"https://customsearch.googleapis.com/customsearch/v1?q={keyword}&cx={searchEngineID}&key={searchEngineAPIKey}","resultTransform":{"engine":"jmes","expression":"items[*].{Title: title, Result: snippet, Link: link}"},"hasResultTransform":true},"code":"","implementationType":"http","outputType":"respond_to_ai","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-web-search instead.**\\n\\nThis plugin allows the AI assistant to search for information from the internet in real-time using Google Search.\\n\\nExample usage:\\n\\n> What\'s today gold price?\\n\\n> How\'s the weather at HCMC at the moment?\\n","githubURL":"https://github.com/TypingMind/server-web-search","system":true,"org":null,"isServerPlugin":true,"deprecated":true},{"uuid":"2664f78d-d933-46db-a9b1-4a48342d4276","id":"server_search_images_via_google","emoji":"\uD83C\uDF05","title":"Image Search","code":"","httpAction":{"id":"8bda801d-9017-434c-92e4-64d5b6ef7ffa","method":"GET","name":"","url":"https://www.googleapis.com/customsearch/v1?q={keyword}&cx={searchEngineID}&key={searchEngineAPIKey}&searchType=image","resultTransform":{"engine":"jmes","expression":"items[*].{Title: title, Link: link}"},"hasResultTransform":true},"implementationType":"http","openaiSpec":{"description":"Search for images from the internet in real-time using Google Search.","name":"server_search_images_via_google","parameters":{"properties":{"keyword":{"description":"The search keyword","type":"string"}},"required":["keyword"],"type":"object"}},"outputType":"respond_to_ai","userSettings":[{"label":"Search Engine ID","name":"searchEngineID","required":true},{"label":"Search Engine API Key","name":"searchEngineAPIKey","required":true,"type":"password"}],"overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-image-search instead**\\n\\n## Image Search\\n\\nAllows the AI assistant to search the web or images using Google search.\\n\\nExample usage:\\n\\n> Show me a cute cat picture\\n","githubURL":"https://github.com/TypingMind/server-image-search","system":true,"org":null,"isServerPlugin":true,"deprecated":true},{"id":"server_generate_image_via_dalle_3","uuid":"897e5037-3b05-448d-bc24-c6ebe432ae09","userSettings":[{"name":"openaikey","label":"OpenAI API Key (Required)","description":"The images will be generated using this OpenAI API. Get your API key from https://platform.openai.com/account/api-keys","type":"password","required":true,"placeholder":"sk-******"},{"name":"resolution","label":"Resolution","description":"Optional, default: \\"1024x1024\\"","type":"enum","values":["1024x1024","1024x1792","1792x1024"]},{"name":"quality","label":"Quality","description":"Optional, default: \\"standard\\"","type":"enum","values":["standard","hd"]}],"emoji":"✨","title":"DALL-E 3","openaiSpec":{"name":"server_generate_image_via_dalle_3","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The description of one (the first) image as defined in the guidelines."}}},"description":"Generate images using DALL-E 3 based on image descriptions. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\nWhen creating prompts: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"implementationType":"http","httpAction":{"hasBody":true,"hasHeaders":true,"hasResultTransform":true,"id":"a317a913-6d54-4d0e-b2a0-285712d45640","method":"POST","name":"","requestBody":"{\\n \\"model\\": \\"dall-e-3\\",\\n \\"prompt\\": \\"{prompt}\\",\\n \\"n\\": 1,\\n \\"size\\": \\"{resolution}\\",\\n \\"quality\\": \\"{quality}\\",\\n \\"response_format\\": \\"url\\"\\n }","requestHeaders":"{\\n\\"Content-Type\\": \\"application/json\\",\\n\\"Authorization\\": \\"Bearer {openaikey}\\"\\n}","resultTransform":{"engine":"handlebars","templateString":"![{{data.[0].revised_prompt}}]({{data.[0].url}})\\n\\n_Note: Generated images will expire after 1 hour. Save them to your device if you wish to keep the images._"},"url":"https://api.openai.com/v1/images/generations"},"outputType":"render_markdown","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-dall-e-3**\\n\\n## Dall-E 3\\n\\nDall-E 3 allows you to use state-of-the-art image generation with Dall-E 3 using the OpenAI API.\\n\\nExample usage:\\n\\n> Generate a picture of a cat\\n","code":"","githubURL":"https://github.com/TypingMind/server-dall-e-3","system":true,"org":null,"isServerPlugin":true,"deprecated":true},{"uuid":"50da3859-83cf-4857-a8a2-60ab2ea947f5","id":"server_search_via_perplexity","iconURL":"https://custom.typingmind.com/assets/models/perplexityai.png","emoji":"\uD83D\uDD0D","title":"Perplexity Search","isServerPlugin":true,"disabled":true,"userSettings":[{"name":"apiKey","label":"Perplexity API Key","type":"password","required":true,"description":"Get your API Key from Perplexity: https://www.perplexity.ai/settings/api"},{"name":"model","label":"Model","description":"All supported models here: https://docs.perplexity.ai/docs/model-cards","placeholder":"llama-3-sonar-small-32k-online","defaultValue":"llama-3-sonar-small-32k-online"},{"name":"systemMessage","label":"System Message","description":"Instruction for the search AI","placeholder":"Be precise and concise","defaultValue":"Be precise and concise"}],"openaiSpec":{"name":"server_search_via_perplexity","description":"Search for information from the internet using Perplexity.","parameters":{"type":"object","properties":{"keyword":{"type":"string","description":"The search keyword"}},"required":["keyword"]}},"httpAction":{"id":"b156833f-9599-4155-bba9-e713dd21aa01","method":"POST","name":"","url":"https://api.perplexity.ai/chat/completions","requestBody":"{\\"model\\": \\"{model}\\",\\"messages\\": [{\\"role\\": \\"system\\",\\"content\\": \\"{systemMessage}\\"},{\\"role\\": \\"user\\",\\"content\\": \\"{keyword}\\"}]}","requestHeaders":"{\\"accept\\": \\"application/json\\",\\"authorization\\": \\"Bearer {apiKey}\\"}","resultTransform":{"engine":"jmes","expression":"choices[*].message.content | join(\' \', @)"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"implementationType":"http","outputType":"respond_to_ai","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-perplexity-search instead**\\n\\nThis plugin allows the AI assistant to search for information from the internet using Perplexity.\\n\\nExample usage:\\n\\n> What\'s the gold price?\\n\\n> How\'s the weather at HCMC at the moment?\\n","code":"","githubURL":"https://github.com/TypingMind/server-perplexity-search","system":true,"org":null,"deprecated":true},{"id":"server_image_generation_via_stable_diffusion","uuid":"c8cb09de-d68c-4951-a535-77d9506e3f20","userSettings":[{"name":"stabilityAPIKey","required":true,"type":"password","label":"StabilityAI API Key","description":"Get your free API Key from StabilityAI: https://platform.stability.ai/account/keys"},{"name":"width","type":"number","label":"Width of the image (min: 320, max: 1536)","description":"Must be specified in increments of 64. (e.g. 512, 1024)","placeholder":"512","defaultValue":512},{"name":"height","type":"number","label":"Height of the image (min: 320, max: 1536)","description":"Must be specified in increments of 64. (e.g. 512, 1024)","placeholder":"512","defaultValue":512}],"emoji":"\uD83D\uDDBC️","title":"Stable Diffusion v2 Image","openaiSpec":{"name":"server_image_generation_via_stable_diffusion","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text description of the desired image."}}},"description":"Generate images using Stable Diffusion based on a text description. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\n\\nWhen creating prompt: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\n\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\n\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"httpAction":{"id":"86d0cd86-f4de-4ca4-b712-1bfb01dfbfe6","method":"POST","name":"","url":"https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image","requestBody":"{\\"text_prompts\\":[{\\"text\\":\\"{prompt}\\"}],\\"cfg_scale\\":7,\\"samples\\":1,\\"steps\\":30,\\"width\\":{width},\\"height\\":{height}}","requestHeaders":"{\\"Content-Type\\":\\"application/json\\",\\"Authorization\\":\\"Bearer {stabilityAPIKey}\\"}","resultTransform":{"engine":"handlebars","templateString":"![{{__VARIABLES.prompt}}](data:image/png;base64,{{artifacts.[0].base64}})"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"implementationType":"http","outputType":"render_markdown","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-stable-diffusion-v2-image instead**\\n\\n# Server Stable Diffusion v2 Image\\n\\nGenerate Unique Images with the Stable Diffusion Plugin\\n\\nTransform your imagination into stunning visuals using the power of Stable Diffusion. Easily create captivating images from just a few words.\\n\\n**API Key Required:** You\'ll need a valid Stable API key. Obtain one from their website (free): https://platform.stability.ai/account/keys\\n\\n## Examples\\n\\n- \\"Create an image of a majestic lion standing proudly on a cliff overlooking a vast savanna at sunset.\\"\\n- \\"Generate a vibrant cyberpunk cityscape illuminated by neon signs and bustling with activity.\\"\\n- \\"Draw a photorealistic portrait of a woman with fiery red hair and emerald green eyes.\\"\\n","code":"","githubURL":"https://github.com/TypingMind/server-stable-diffusion-v2-image","system":true,"org":null,"isServerPlugin":true,"deprecated":true},{"id":"server_image_generation_via_stable_diffusion_3","uuid":"24aeeac1-1f33-4bed-afae-91cd9ea8cea1","userSettings":[{"name":"stabilityAPIKey","required":true,"type":"password","label":"StabilityAI API Key","description":"Get your free API Key from StabilityAI: https://platform.stability.ai/account/keys"},{"name":"output_format","label":"Format of the generated image","description":"Optional, default: \\"png\\"","type":"enum","values":["png","jpeg"],"defaultValue":"png"},{"name":"aspect_ratio","label":"Aspect ratio of the generated image","description":"Optional, default: \\"1:1\\"","type":"enum","values":["16:9","1:1","21:9","2:3","3:2","4:5","5:4","9:16","9:21"],"defaultValue":"1:1"},{"name":"model","label":"Model to use for generation","description":"Optional, default: \\"sd3\\"","type":"enum","values":["sd3","sd3-turbo"],"defaultValue":"sd3"},{"name":"negative_prompt","label":"Negative prompt","description":"Optional, a blurb of text describing what you do not wish to see in the output image","type":"string","defaultValue":""}],"iconURL":"https://www.typingmind.com/stable-diffusion.png","title":"Stable Diffusion v3 Image","openaiSpec":{"name":"server_image_generation_via_stable_diffusion_3","parameters":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text description of the desired image."}}},"description":"Generate images using Stable Diffusion v3 based on a text description. Adhere to guidelines such as English translation, not depicting politicians or recent artists, and ensuring artist references are over 100 years old.\\n\\nWhen creating prompt: substitute artist names with style-describing adjectives, include artistic era, mention primary medium. Image type, descent, gender are to be explicitly stated. Avoid offense and bias, conceal identities except gender and physique, retain text references, replace profession titles with universal terms.\\n\\nPrompt changes aren\'t allowed unless they anonymise individuals. Replace creative professional/studio names with style descriptions. All prompts should detail every image part in objective terms within a detailed paragraph of over three sentences.\\n\\nImportant: after calling this function, the output images will be shown to the user automatically. You don\'t need to include the output image to the users again in your response to avoid duplicate images."},"httpAction":{"id":"4105dcae-c4c5-432f-91cd-af69188adda4","method":"POST","name":"","url":"https://api.stability.ai/v2beta/stable-image/generate/sd3","requestBody":"{\\"prompt\\":\\"{prompt}\\",\\"model\\":\\"{model}\\",\\"aspect_ratio\\":\\"{aspect_ratio}\\",\\"negative_prompt\\":\\"{negative_prompt}\\",\\"output_format\\":\\"{output_format}\\"}","requestBodyFormat":"form-data","requestHeaders":"{\\"Accept\\":\\"application/json; type=image/*\\",\\"Authorization\\":\\"Bearer {stabilityAPIKey}\\"}","resultTransform":{"engine":"handlebars","templateString":"![{{__VARIABLES.prompt}}](data:image/{{__VARIABLES.output_format}};base64,{{image}})"},"hasResultTransform":true,"hasBody":true,"hasHeaders":true},"system":true,"outputType":"render_markdown","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-stable-diffusion-v3-image instead**\\n\\n# Stable Diffusion v3 Image\\n\\nGenerate Unique Images with the Stable Diffusion Plugin\\n\\nTransform your imagination into stunning visuals using the power of Stable Diffusion. Easily create captivating images from just a few words.\\n\\n**API Key Required:** You\'ll need a valid Stable API key. Obtain one from their website (free): https://platform.stability.ai/account/keys\\n\\n## Examples\\n\\n- \\"Create an image of a majestic lion standing proudly on a cliff overlooking a vast savanna at sunset.\\"\\n- \\"Generate a vibrant cyberpunk cityscape illuminated by neon signs and bustling with activity.\\"\\n- \\"Draw a photorealistic portrait of a woman with fiery red hair and emerald green eyes.\\"\\n","code":"","githubURL":"https://github.com/TypingMind/server-stable-diffusion-v3-image","org":null,"isServerPlugin":true,"deprecated":true},{"id":"query_training_data","uuid":"119d947f-e466-46cb-8f6c-ece59ff81990","userSettings":[{"name":"searchServiceName","label":"Search Service Name","description":"Find this in the \\"Azure AI Services\\" section in the Azure portal.","required":true},{"name":"indexName","label":"Index Name","description":"Find this in \\"Search managements\\" → \\"Indexes\\" page in the Azure portal.","required":true},{"name":"queryKey","type":"password","label":"Query Key","description":"Find this in \\"Settings\\" → \\"Keys\\" page in the Azure portal.","required":true},{"name":"apiVersion","label":"API Version","required":true,"description":"Find the latest API version here: https://learn.microsoft.com/en-us/rest/api/searchservice/search-service-api-versions","defaultValue":"2023-11-01"}],"iconURL":"https://custom.typingmind.com/assets/models/azureopenai.png","title":"Query Training Data - Azure AI Search","openaiSpec":{"name":"query_training_data","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The keywords or topics to search for the internal training data. Multiple keywords or topics are accepted (separated with commas)."}}},"description":"Search the internal training data for relevant information. When the user ask you something you don\'t know, you can use this function to search for relevant information in the internal training data. Don\'t use questions as search query, use keywords instead. The search query should contains the keywords or topics related to the conversation."},"httpAction":{"id":"6a69b196-c5de-4550-9ad2-bf717f4808f2","url":"https://{searchServiceName}.search.windows.net/indexes/{indexName}/docs/search?api-version={apiVersion}","name":"","method":"POST","hasBody":true,"hasHeaders":true,"requestBody":"{\\n \\"search\\": \\"{query}\\"\\n}","requestHeaders":"{\\n \\"api-key\\": \\"{queryKey}\\"\\n}"},"implementationType":"http","system":true,"isServerPlugin":true,"outputType":"respond_to_ai","overviewMarkdown":"**Deprecated. Please use https://github.com/TypingMind/plugin-query-azure-training-data instead**\\n\\n# Query Training Data from Azure AI Search (Cognitive Search)\\n\\nThis plugin connects TypingMind to your training data in Azure AI Search (Cognitive Search).\\n\\n## How to use\\n\\nWhen the user ask the AI a question but the AI does not have the answer, the AI will query the training data in Azure AI Search to find the answer.\\n\\nSometimes, you need to ask the AI to specifically search from the training data if the AI does not do it automatically.\\n\\nExample:\\n\\n > \\"search from training data for the latest refund policy\\"\\n > \\"who is the founder of the company (search from training data)\\"\\n\\n## Configuration\\n\\nTo use this plugin, you need to have an Azure AI Search service and an index with training data.\\n\\n**[Step-by-step Guide](https://docs.typingmind.com/plugins/set-up-query-training-data-azure-ai-search)** \\n\\nTo get started with Azure AI Search, follow the [official documentation](https://docs.microsoft.com/en-us/azure/search/search-what-is-azure-search).\\n\\n**Note:** if you use this plugin in client side, the CORS setting must be set to \\"All\\" in the Azure AI Search service. Go to Azure Portal -> Azure AI Search -> Indexes -> CORS -> Select \\"All\\" in the \\"Allowed origin type\\" section.\\n","code":"","githubURL":"https://github.com/TypingMind/query-azure-training-data","org":null,"deprecated":true}]')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(91118),t(49420)}),_N_E=e.O()}]); \ No newline at end of file