@wxcc-desktop/sdk 2.0.11 → 2.0.12-temp1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/1.js +1 -0
- package/dist/index.js +3 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types/jsapi/actions-jsapi.d.ts +2 -2
- package/dist/types/jsapi/agent-contact-jsapi.d.ts +4 -0
- package/dist/types/jsapi/common/_service-events.d.ts +1 -1
- package/dist/types/jsapi/common/_test_mocks.d.ts +76 -0
- package/dist/types/jsapi/data-notifs-jsapi.d.ts +33 -0
- package/dist/types/jsapi/i18n-jsapi.d.ts +2 -2
- package/dist/types/jsapi/post-interaction-jsapi.d.ts +2 -2
- package/dist/types/jsapi/shortcut-key-jsapi.d.ts +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=50)}([function(e,t,n){var i;self,i=()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AssertUtils:()=>$,BrowserNotification:()=>h,Decorator:()=>E,Err:()=>f,Evt:()=>I,I18N:()=>N,Logger:()=>u,NotificationItemsContent:()=>P,Notifications:()=>V,Signal:()=>j,clearInterval:()=>W,clearTimeout:()=>Z,createBrowserNotifications:()=>v,createHttp:()=>O,createLogger:()=>l,createNotifications:()=>F,ensureError:()=>K,setInterval:()=>G,setTimeout:()=>Y});const i=n(8);var r=e.n(i);const o=n(37),s="*********";class a{constructor(e){this.maskKeys=e}tryJSONParse(e){try{return JSON.parse(e)}catch(e){return}}copiedObj(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}maskObjectProperty(e){const t=e;Object.keys(e).forEach(n=>{"object"==typeof e[n]&&null!==e[n]?this.maskObjectProperty(e[n]):t[n]=s})}maskLogData(e){Object.keys(e).forEach(t=>{"object"==typeof e[t]&&null!==e[t]?this.maskKeys[t]?this.maskObjectProperty(e[t]):this.maskLogData(e[t]):(this.maskKeys[t]&&"string"==typeof e[t]||"value"===t&&this.maskKeys[e.name])&&(e[t]=s)})}maskPIIInformation(e){const t=e[e.length-1],n="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);n&&"object"==typeof n&&(this.maskLogData(n),e.splice(e.length-1,1,n))}}const c=(...e)=>e.map(e=>"string"==typeof e?e:JSON.stringify(e));var u;function l(e,t){const n=new u.Service(e,t);return u.POOL.addLogger(n),n}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";const t="<uuip-eol>",n=/[\u0100-\uFFFF]/g,i="yyyy-LL-dd HH:mm:ss:SSS";let s;e.defaultSaveIntervalMilliSeconds=5e3,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(s=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=r()(),this.prefix=e,this.maskKeys=t}log(t,...n){this.maskKeys&&"object"==typeof this.maskKeys&&((e,t)=>{new a(t).maskPIIInformation(e)})(n,this.maskKeys);const r=c(this.prefix?[""+this.prefix,...n]:n),s=Date.now(),u=o.DateTime.fromMillis(s).toFormat(i);switch(t){case e.Level.Trace:console.info(u,...r);break;case e.Level.Debug:console.log(u,...r);break;case e.Level.Warn:console.warn(u,...r);break;case e.Level.Error:case e.Level.Fatal:console.error(u,...r);break;default:console.log(...r)}const l={pfx:this.prefix,msgs:[...n],ts:s,lvl:t};this.emit("add",l)}info(...e){this.log(s.Trace,...e)}debug(...e){this.log(s.Debug,...e)}warn(...e){this.log(s.Warn,...e)}error(...e){this.log(s.Error,...e)}emit(e,...t){this.loggerEmitter.emit(e,...t)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class u{constructor(){this.loggers=new Map,this.logsCollectionString="",this.prefixedLogsCollections={},this.lastSaveTime=Date.now(),this.config={saveIntervalMilliSeconds:e.defaultSaveIntervalMilliSeconds},this.logRecordsSerializedLength=0,this.flush=()=>{this.save(!1)},this.onLoggerAddRecord=e=>{this.addLogRecord(e),this.save(!0)},this.restore()}static getSerializedJsonLogRecordBytesSize(e=""){const t=e.length;if(t){const i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){const e=this.logsCollectionString.split(t).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(t=!0){const n=Date.now();t&&n-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=n,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{const t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{return""!==this.logsCollectionString?JSON.parse(`[${this.logsCollectionString.split(t).join(",")}]`):[]}catch(e){console.log("Error parsing local storage data")}}restorePreFixedLogs(){const e=this.getLogObjectFromString();e&&Array.isArray(e)&&e.length>0&&e.forEach(e=>{this.addPreFixedLogs(e),this.removeOversized()})}addPreFixedLogs(e){this.prefixedLogsCollections[e.pfx]=this.prefixedLogsCollections[e.pfx]||new Set,this.prefixedLogsCollections[e.pfx].add(e)}removeOversized(){for(;this.serializedJsonLogsBytesSize>e.MAX_LOGS_SIZE&&""!==this.logsCollectionString;)this.removeLogRecord()}removeTextFromString(e,t,n){return`${e.slice(0,t)}${e.slice(n+t)}`}addLogRecord(e){try{const n=JSON.stringify(e),i=this.logsCollectionString;this.logsCollectionString=null==i?void 0:i.concat(`${""!==i.trim()?t:""}${n}`)}catch(t){const n=JSON.stringify(e);this.logsCollectionString=n,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){const e=this.logsCollectionString.indexOf(t);if(-1!==e){const t=this.logsCollectionString.substring(0,e),n=e+10,i=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=i,this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(t);try{const e=JSON.parse(t);this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].forEach(t=>{t.ts===e.ts&&this.prefixedLogsCollections[e.pfx].delete(t)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){const n=this.getLogObjectFromString();e.forEach(e=>{const t=n.findIndex(t=>t.pfx===e.pfx);-1!==t&&(n.splice(t,1),this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=n.map(e=>JSON.stringify(e)).join(t)}static getLogRecordReadable(e){if(e.ts)return{prefix:e.pfx,messages:e.msgs,timestamp:o.DateTime.fromMillis(e.ts).toFormat(i),level:s[e.lvl]}}static getLogsReadableJson(e){const t=e=>e.map(e=>u.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n[i]=t(e[i]),n),{}),null,2)}static getLogsReadableText(e){const t=e=>e.reduce((e,t)=>{const n=u.getLogRecordReadable(t);return n&&(e+=`${n.timestamp} ${n.prefix} ${n.level} ${c(n.messages).join(" ")} \r\n`),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n+=`[SERVICE "${i}" LOGS]: `)+t(e[i]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,"+encodeURIComponent(e)}static browserDownload(e,t){try{if(document&&document.createElement){const n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else console.warn("Browser is not supported to download logs")}catch(e){}}addLogger(e){this.loggers.set(e.prefix,e),e.removeEventListener("add",this.onLoggerAddRecord),e.addEventListener("add",this.onLoggerAddRecord)}getAllLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return u.getLogsUrl(u.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return u.getLogsUrl(u.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return u.getLogsUrl(u.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){u.browserDownload(this.getAllLogsJsonUrl(),new Date+"_all_logs.json")}browserDownloadAllPrefixedLogsJson(){u.browserDownload(this.getAllPrefixedLogsJsonUrl(),new Date+"_all_prefixed_logs.json")}browserDownloadPrefixedLogsJson(e){u.browserDownload(this.getPrefixedLogsJsonUrl(e),`${new Date}_${e}_logs.json`)}browserDownloadAllLogsText(){u.browserDownload(this.getAllLogsTextUrl(),new Date+"_all_logs.log")}browserDownloadPrefixedLogsText(e){u.browserDownload(this.getPrefixedLogsTextUrl(e),`${new Date}_${e}_logs.log`)}cleanupAllLogs(){this.logRecordsSerializedLength=0,this.logsCollectionString="",Object.keys(this.prefixedLogsCollections).forEach(e=>this.prefixedLogsCollections[e]=new Set),this.save(!0)}cleanupPrefixedLogs(e){const t=this.getPrefixedLogsCollection(e);this.removePreFixedLogs(t),this.prefixedLogsCollections[e]=new Set,this.save(!0)}getAllPrefixedLogsCollections(){return Object.keys(this.prefixedLogsCollections).reduce((e,t)=>(e[t]=this.getPrefixedLogsCollection(t),e),{})}getPrefixedLogsCollection(e){return Array.from(this.prefixedLogsCollections[e]||new Set)}}e.ServicesPool=u,e.POOL=new e.ServicesPool}(u||(u={}));const d=l("unified-ui-platform-sdk",{title:!0,text:!0});var h,f;function v(e){return new h.Service(e)}function p(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;const n=e.descriptor.value,i=e.target.constructor.name;return e.descriptor.value=function(){const e=[];for(let t=0;t<arguments.length;t++)e[t]=arguments[t];return t.call(this,n,e,i)},e.descriptor}function g(e=250){return function(t,n,i){let r;return p({target:t,key:n,descriptor:i},(function(t,n){clearTimeout(r),r=window.setTimeout(()=>{clearTimeout(r),t.apply(this,n)},e)}))}}function m(){return(e,t)=>{const n={get(){return new I(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,n):{kind:"method",placement:"prototype",key:e.key,descriptor:n}}}function y(e,t=!0){return function(n,i,r){return p({target:n,key:i,descriptor:r},(function(n,r){return o=this,a=function*(){const o="_"+i+"_exec_flag";if(t&&this[o])return void console.log("PREVENTING DOUBLE EXECUTION");const s=t=>{if(this[o]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{const n=e;t?n.before&&n.before.call(this,this):n.after&&n.after.call(this,this)}};s(!0);const a=n.apply(this,r);return a instanceof Promise?a.then(()=>s(!1)).catch(()=>s(!1)):(console.warn("Must be async function to use [@Executing] decorator"),s(!1)),a},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function i(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,i)}r((a=a.apply(o,[])).next())}));var o,s,a}))}}!function(e){class t{static get isBrowserNotificationPromiseSupported(){try{window.Notification.requestPermission().then()}catch(e){return!1}return!0}constructor(e){this.defaultOptions=e||{}}get isBrowserNotificationSupported(){return!!("Notification"in window)}get isBrowserNotificationIconSupported(){return this.isBrowserNotificationSupported&&"icon"in window.Notification.prototype}get isBrowserNotificationImageSupported(){return this.isBrowserNotificationSupported&&"image"in window.Notification.prototype}get isBrowserNotificationBadgeSupported(){return this.isBrowserNotificationSupported&&"badge"in window.Notification.prototype}get isPermissionGranted(){return"granted"===window.Notification.permission}get isPermissionDenied(){return"denied"===window.Notification.permission}get isPermissionUnknown(){return!this.isPermissionGranted&&!this.isPermissionDenied}requestNotificationUserPermission(){return e=this,i=function*(){this.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):d.warn("Browser notification is not supported...")},new((n=void 0)||(n=Promise))((function(t,r){function o(e){try{a(i.next(e))}catch(e){r(e)}}function s(e){try{a(i.throw(e))}catch(e){r(e)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(o,s)}a((i=i.apply(e,[])).next())}));var e,n,i}fire(e,t){return new window.Notification(e,Object.assign(Object.assign({},this.defaultOptions),t||{}))}}e.Service=t}(h||(h={})),function(e){class t extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,"string"==typeof t?this.message=t:t instanceof Error?(this.message=t.message,this.name=t.name):this.message=""}}e.Message=t;class n extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=n}(f||(f={}));var E,b=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};function w(e){return function(t,n,i){return p({target:t,key:n,descriptor:i},(function(t,i,r){return b(this,void 0,void 0,(function*(){const o=this,s=t=>b(this,void 0,void 0,(function*(){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new f.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new f.Message("system","")));const i=t;i.ctx=o;const s=`Error] ${r}.${n} [${i.id}]: ${i.message}`;if("function"==typeof e){const t=e;console.log("[Handled"+s);const n=t.call(o,i);n instanceof Promise&&(yield n)}else{const t=e;if(t[i.id]){console.log("[Handled"+s);const e=t[i.id].call(o,i);e instanceof Promise&&(yield e)}else if(t.handle){console.log("[Handled"+s);const e=t.handle.call(o,i);e instanceof Promise&&(yield e)}else console.warn("[Unhandled "+s);if(t.fallback){const e=t.fallback.call(o,i);e instanceof Promise&&(yield e)}}}));try{const e=t.apply(o,i);return e instanceof Promise?new Promise(t=>{e.then(t).catch(e=>b(this,void 0,void 0,(function*(){yield s(e),t(void 0)})))}):e}catch(e){return void(yield s(e))}}))}))}}function S(){return function(e,t,n){return p({target:e,key:t,descriptor:n},(function(e,n){const i="_"+t+"_once_flag";if(!this[i])return this[i]=!0,e.call(this,n)}))}}function k(e=1e3/60){return function(t,n,i){let r,o=Date.now();return p({target:t,key:n,descriptor:i},(function(t,n){const i=(...n)=>{const s=Date.now();window.clearTimeout(r),!o||s-o>=e?(o=s,t.apply(this,n)):r=window.setTimeout(()=>i(...n),e-(s-o))};i(...n)}))}}!function(e){e.Debounce=g,e.Evt=m,e.Exec=y,e.Handle=w,e.Once=S,e.Throttle=k}(E||(E={}));class I{constructor(e,t){this.target=e,this.eventName=t}emit(e,t={bubbles:!0,composed:!0,cancelable:!1}){this.target.dispatchEvent(new CustomEvent(this.eventName,Object.assign({detail:e},t)))}}const A=n(49);var C=e.n(A);const T=n(51);function O(e){const t=C().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer "+t.accessToken),!e.headers.TrackingID){const t=(0,T.v1)();e.headers.TrackingID=`uuip_${t}_1.0:1.0`}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}const U=n(52);var R=e.n(U);const L=n(44);var x=e.n(L);const D=n(46);var N,P,_=e.n(D);!function(e){e.createService=e=>{const t=R().createInstance();{const n=e&&e.backend?e.backend:new(x());t.use(n)}{const n=e&&e.languageDetector?e.languageDetector:new(_());t.use(n)}return e&&e.logger&&t.use({log:"log"in e.logger?e.logger.log:e.logger.info,warn:e.logger.warn,error:e.logger.error,type:"logger"}),t},e.mergeServiceInitOptions=(...e)=>Object.assign.call(null,{},...e),e.createMixin=t=>{const n="i18n"in t?t.i18n:e.createService(),i="i18nInitOptions"in t?t.i18nInitOptions:null;i||d.info("i18n mixin instance waiting service initialization outside...");let r=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),n.on("initialized",this.onI18NInitialized),n.on("languageChanged",this.onI18NLanguageChanged),n.isInitialized||r||!i||(r=!0,n.init(i).finally(()=>r=!1))}disconnectedCallback(){n.off("initialized",this.onI18NInitialized),n.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}t(...e){return n.t(...e)}}}}(N||(N={})),function(e){e.DataController=class{constructor(e){this.localization={closeButtonText:"Close"},this.type=e.type,this.text=e.text,this.link=e.link,this.linkName=e.linkName,this.linkTooltip=e.linkTooltip,this.iconDetail=e.iconDetail,this.linkHandler=e.linkHandler,this.clickHandler=e.clickHandler,this.errorDetail=e.errorDetail,this.taskId=e.taskId,this.localization=e.localization||this.localization,this.dismissHandler=e.dismissHandler,this.actions=e.actions,this.lineClamp=e.lineClamp}}}(P||(P={}));const M=n(15);var V,j,q=e.n(M);function F(e={}){const t=new V.Service;return t.updateConfig(e),t}!function(e){let t,n;!function(e){let t,n,i,r,o,s,a,c;!function(e){e.Info="info",e.Warn="warn",e.Error="error",e.Success="success",e.Chat="chat",e.Default="default"}(t=e.Type||(e.Type={})),e.TYPES=Object.values(t),function(e){e.Silent="silent",e.AutoDismiss="autodismiss",e.Acknowledge="acknowledge"}(n=e.Mode||(e.Mode={})),e.MODES=Object.values(n),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(i=e.Status||(e.Status={})),e.StatusWeight={[i.Added]:0,[i.Pended]:1,[i.Activated]:2,[i.Deactivated]:3,[i.Removed]:4},e.STATUSES=Object.values(i),function(e){e.User="user_add"}(r=e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(o=e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(s=e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(a=e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(c=e.RemoveEventReason||(e.RemoveEventReason={}))}(t=e.ItemMeta||(e.ItemMeta={})),function(e){e.STATUS_EVENTS=["add","pending","activate","deactivate","remove"],e.STATUS_EVENT_MAP={add:t.Status.Added,pending:t.Status.Pended,activate:t.Status.Activated,deactivate:t.Status.Deactivated,remove:t.Status.Removed},e.DISABLED_ITEM_MODE={[t.Mode.Silent]:!1,[t.Mode.AutoDismiss]:!1,[t.Mode.Acknowledge]:!1},e.ACTIVATED_ITEM_MODE_LIMIT={[t.Mode.Silent]:0,[t.Mode.AutoDismiss]:10,[t.Mode.Acknowledge]:1},e.AUTO_DISMISS_TIMEOUT=5e3}(n=e.ServiceMeta||(e.ServiceMeta={}));class i{constructor(){this.hubEmitter=r()()}emit(e,...t){this.hubEmitter.emit(e,...t)}addEventListener(e,t){this.hubEmitter.on(e,t)}addOnceEventListener(e,t){this.hubEmitter.once(e,t)}removeEventListener(e,t){this.hubEmitter.off(e,t)}removeAllEventListeners(){q()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){let n={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(n=Object.assign(Object.assign({},n),{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),n}constructor(e,n){this._serviceHubSubscriptions=[],this._itemEmitter=r()();const{type:i,mode:s,title:a,data:c,timestamp:u}=e.data;this.type=i,this.title=a,this.data=c,this._mode=s,this.timestamp=u||(new Date).toISOString(),this.datetime=o.DateTime.fromISO(this.timestamp).toLocaleString(o.DateTime.DATETIME_SHORT_WITH_SECONDS),this.options=Object.freeze(this.validateAuxOptions(e.options||{})),n&&(this._serviceHubAdapter=n,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){{const e=(e,n,i)=>{this.timestamp in e&&(this._status=n,this._reason=i,n===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",n,i))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e);const n=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)};this._serviceHubSubscriptions.push(n)}{const e=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",e);const t=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("modeStatusUpdateResponse",e)};this._serviceHubSubscriptions.push(t)}}}unbindItemHubListeners(){this._serviceHubSubscriptions&&(this._serviceHubSubscriptions.forEach(e=>e()),this._serviceHubSubscriptions.length=0)}deactivate(e){this._status&&t.StatusWeight[this._status]<t.StatusWeight[t.Status.Deactivated]?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Deactivated,e):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Pended}" or "${t.Status.Activated}" status to be able change status to "${t.Status.Deactivated}".Current notification status is "${this._status}". Ignoring this change`)}pending(){this._status===t.Status.Activated||this.mode!==t.Mode.Silent?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Pended,t.PendingEventReason.UserSilent):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Activated}" status or not "${t.Mode.Silent}" mode, to be able change status to "${t.Status.Pended}" and mode to "${t.Mode.Silent}".Current notification status is "${this._status}" and mode is "${this.mode}". Ignoring this change`)}emit(e,...t){this._itemEmitter.emit(e,...t)}addEventListener(e,t){this._itemEmitter.on(e,t)}addOnceEventListener(e,t){this._itemEmitter.once(e,t)}removeEventListener(e,t){this._itemEmitter.off(e,t)}removeAllEventListeners(){q()(this._itemEmitter)}};const s=(e,t,n=(()=>0))=>[...e,...t].sort(n),a=(e,t)=>e.reduce((e,n)=>(-1===t.indexOf(n)&&e.push(n),e),[]);class c{constructor(){this.emitter=r()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:Object.assign({},n.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:Object.assign({},n.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:n.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new i,this.bindServiceHubEvents()}static mergeConfig(e,...t){if(!t.length)return e;const n=t.shift(),i=e=>e&&"object"==typeof e&&!Array.isArray(e);if(i(e)&&i(n))for(const t in n)i(n[t])?(e[t]||Object.assign(e,{[t]:{}}),this.mergeConfig(e[t],n[t])):Object.assign(e,{[t]:n[t]});return this.mergeConfig(e,...t)}static createStatus(){return{[t.Status.Added]:this.createStatusHolderCollection(),[t.Status.Pended]:this.createStatusHolderCollection(),[t.Status.Activated]:this.createStatusHolderCollection(),[t.Status.Deactivated]:this.createStatusHolderCollection(),[t.Status.Removed]:this.createStatusHolderCollection()}}static createStatusHolderCollection(){return Object.assign([],Object.assign(Object.assign({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return Object.assign({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){const e=c.createStatus();this.status.added.ids.forEach(n=>{const i=this.map[n];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(i.timestamp)&&(e[t].push(i),e[t].ids.push(n),e[t][i.mode].push(i),e[t][i.type].push(i))})}),this.status=e}setAutoDismiss(e,n=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{var i;if(e.mode===t.Mode.AutoDismiss){const t=()=>n(e);this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(t,null!==(i=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==i?i:this.serviceConfig.AUTO_DISMISS_TIMEOUT)}})}removeAutoDismiss(e,t=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{e.timestamp in this.activeAutoDismissTimeoutRefs&&(t(e),window.clearTimeout(this.activeAutoDismissTimeoutRefs[e.timestamp]),delete this.activeAutoDismissTimeoutRefs[e.timestamp])})}update(e,t,n){const i=Array.isArray(n)?n:[n];if(i.length){const n=i.map(e=>e.timestamp);switch(e){case"add":i.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=s(this.status.added.ids,n,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=s(this.status.pended.ids,n,c.sortTimestampsFn),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"activate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=s(this.status.activated.ids,n,c.sortTimestampsFn),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"deactivate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=s(this.status.deactivated.ids,n,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n),this.status.added.ids=a(this.status.added.ids,n),this.status.removed.ids=s(this.status.removed.ids,n,c.sortTimestampsFn),n.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,i,t),this.propagate(e,t,i)}}propagate(e,n,i){const r=Array.isArray(i)?i:[i];if(r.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,r);break;case"pending":case"deactivate":r.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":r.forEach(e=>{this.setAutoDismiss(e,e=>{e.mode===t.Mode.AutoDismiss&&this.serviceHubAdapter.emit("statusServiceUpdateRequest",e,t.Status.Pended,t.PendingEventReason.ServiceAutoDismiss)})});break;case"remove":this.update("deactivate",t.DeactivateEventReason.UserNegative,r)}}prepareAddNotifications(t){const n=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>`"${e}"`).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(d.error(`Trying to .add(...) notification mode "${e.data.mode}" that is disabled in this notifications service instance by configuration.Current configuration is: "${JSON.stringify(this.config)}"Only ${n} allowed. Ignoring .add(${JSON.stringify(e)}) notification...`),!1)).map(t=>new e.Item(t,this.serviceHubAdapter))}prepareUpdateNotifications(e){return(Array.isArray(e)?e:[e]).reduce((e,t)=>(t.timestamp in this.map?e.push(t):d.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){const n=(Array.isArray(e)?e:[e]).reduce((e,t)=>(this.status.activated[t.mode].length+e[t.mode].length<this.serviceConfig.ACTIVATED_ITEM_MODE_LIMIT[t.mode]&&e[t.mode].push(t),e),c.createStatusHolderSubCollections(t.MODES));return Object.values(n).reduce((e,t)=>e.concat(t),[])}static sortByTimestampsFn(e,t){return c.sortTimestampsFn(e.timestamp,t.timestamp)}get added(){return this.status.added}get pended(){return this.status.pended}get activated(){return this.status.activated}get deactivated(){return this.status.deactivated}getNotificationStatus(e){return Object.keys(this.status).filter(e=>e!==t.Status.Added).find(t=>-1!==this.status[t].ids.indexOf(e.timestamp))}get config(){return Object.freeze(this.serviceConfig)}static validateUpdateConfig(e){const i=e;if(i.ACTIVATED_ITEM_MODE_LIMIT&&i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error(`\n Max ${t.Mode.Acknowledge} limit is ${n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge}\n `);if(i.DISABLED_ITEM_MODE){if(!Object.keys(i.DISABLED_ITEM_MODE).reduce((e,t)=>(i.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(i.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in i.DISABLED_ITEM_MODE&&i.DISABLED_ITEM_MODE[e]&&d.warn(`Changing configuration limit count for mode "${e}" won't have any effect, because this mode is disabled in notifications service instance`)}),"AUTO_DISMISS_TIMEOUT"in i&&i.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&d.warn(`Changing "AUTO_DISMISS_TIMEOUT" configuration option won't have any effect,because "${t.Mode.AutoDismiss}" mode is disabled in notifications service instance`)}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),d.info("Updated notifications service configuration: ",this.config))}add(e){const n=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,n),n}pending(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Pended,t.PendingEventReason.UserSilent),n}deactivate(e,n){const i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Deactivated,n),i}remove(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Removed,t.RemoveEventReason.User),n}pendingAllActivated(){return this.pending(this.status.activated)}pendingAll(){return this.pending([...this.status.pended,...this.status.activated])}deactivateAllActivated(e){return this.deactivate(this.status.activated,e)}deactivateAll(e){return this.deactivate([...this.status.pended,...this.status.activated],e)}removeAllDeactivated(){return this.remove(this.status.deactivated)}removeAll(){return this.remove(this.status.added)}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}addOnceEventListener(e,t){this.emitter.once(e,t)}removeAllEventListeners(){q()(this.emitter)}emit(e,...t){this.emitter.emit(e,...t)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,n,i)=>{const r=Array.isArray(e)?e:[e],o=r.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{});{const e=r.filter(e=>(o[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&n===t.Status.Pended);{const n=e.filter(e=>e.mode!==t.Mode.Silent);n.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",n.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent)}e.length&&this.update("pending",i,e)}{const e=r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated)&&n===t.Status.Deactivated});e.length&&this.update("deactivate",i,e)}r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated||i===t.Status.Deactivated)&&n===t.Status.Removed}).length&&this.update("remove",i,e)}),n.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,i)=>{const r=n.STATUS_EVENT_MAP[e],o=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",o,r,i)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}(V||(V={})),function(e){class t{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=e=>{this.listeners.forEach(t=>t(e)),this.listenersOnce.forEach(t=>t(e)),this.listenersOnce=[]}}}class n{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=()=>{this.listeners.forEach(e=>e()),this.listenersOnce.forEach(e=>e()),this.listenersOnce=[]}}}e.create=new class{withData(){const e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){const e=new n;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(j||(j={}));let B=null;const H=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,z=1073741824,J=()=>{if(null!==B)return B;const e=new Blob(['(()=>{"use strict";\nconst e=new Map,t=new Map,r=(e,t)=>\n{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);\n return{expected:r+o,remainingDelay:o}},\n o=(e,t,r,i)=>{const s=performance.now();\n s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};\n addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;\n if("interval"===i)\n (t=>{const r=e.get(t);\n if(void 0===r)\n throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));\n clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});\n else{if("timeout"!==i)\n throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));\n (e=>{const r=t.get(e);if(void 0===r)\n throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));\n clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}\n else{if("set"!==s.method)\n throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));\n {const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;\n if("interval"===d)\n ((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);\n e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);\n else{if("timeout"!==d)\n throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));\n ((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);\n t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return d.info("Worker url established",t),B=(e=>{const t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),i=new Map,r=new Worker(e);d.info("worker created ",r);const o=new WeakMap;var s;const a=((e,t)=>n=>{const i=t.get(n);let r=void 0===i?n.size:i<z?i+1:0;if(!n.has(r))return e(n,r);if(n.size<536870912){for(;n.has(r);)r=Math.floor(Math.random()*z);return e(n,r)}if(n.size>H)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(r);)r=Math.floor(Math.random()*H);return e(n,r)})((s=o,(e,t)=>(s.set(e,t),t)),o);return r.addEventListener("message",({data:e})=>{if(void 0!==(r=e).method&&"call"===r.method){const{params:{timerId:r,timerType:o}}=e;if("interval"===o){const e=t.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e()}}else if("timeout"===o){const e=n.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e(),n.delete(r)}}}else if((e=>null===e.error&&"number"==typeof e.id)(e)){const{id:r}=e,o=i.get(r);if(void 0===o)throw new Error("The timer is in an undefined state.");const{timerId:s,timerType:a}=o;i.delete(r),"interval"===a?t.delete(s):n.delete(s)}else{const{error:{message:t}}=e}var r}),{clearInterval:e=>{const n=a(i);i.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),r.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{const t=a(i);i.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),r.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{const i=a(t);return t.set(i,()=>{e(),"function"==typeof t.get(i)&&r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}})}),r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}}),i},setTimeout:(e,t)=>{const i=a(n);return n.set(i,e),r.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:i,timerType:"timeout"}}),i}}})(t),B.setTimeout(()=>URL.revokeObjectURL(t),0),B},W=e=>J().clearInterval(e),Z=e=>J().clearTimeout(e),G=(e,t)=>J().setInterval(e,t),Y=(e,t)=>J().setTimeout(e,t);var $;function K(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch(e){}return new Error("This value was thrown as is, not through an Error: "+t)}return function(e){let t=null;e.setErrorHandler=function(e){t?d.error("Error handler already set"):(d.info("Setting custom error handler: "+e),t=e)},e.check=function(e,n,i){return e||(t?t(n,i):d.info(`Assert failed in ${n}: ${i}`)),e}}($||($={})),t})(),e.exports=i()},function(e,t,n){"use strict";(function(e,i,r){var o=n(11);const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:c,toStringTag:u}=Symbol,l=(d=Object.create(null),e=>{const t=s.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const h=e=>(e=e.toLowerCase(),t=>l(t)===e),f=e=>t=>typeof t===e,{isArray:v}=Array,p=f("undefined");function g(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=h("ArrayBuffer");const y=f("string"),E=f("function"),b=f("number"),w=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==l(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||u in e||c in e)},k=h("Date"),I=h("File"),A=h("Blob"),C=h("FileList"),T=h("URLSearchParams"),[O,U,R,L]=["ReadableStream","Request","Response","Headers"].map(h);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),v(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{if(g(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function D(e,t){if(g(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,P=e=>!p(e)&&e!==N;const _=(M="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>M&&e instanceof M);var M;const V=h("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q=h("RegExp"),F=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};x(n,(n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)}),Object.defineProperties(e,i)};const B=h("AsyncFunction"),H=(z="function"==typeof i,J=E(N.postMessage),z?i:J?(W="axios@"+Math.random(),Z=[],N.addEventListener("message",({source:e,data:t})=>{e===N&&t===W&&Z.length&&Z.shift()()},!1),e=>{Z.push(e),N.postMessage(W,"*")}):e=>setTimeout(e));var z,J,W,Z;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(N):void 0!==r&&r.nextTick||H;t.a={isArray:v,isArrayBuffer:m,isBuffer:g,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=l(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:S,isEmptyObject:e=>{if(!w(e)||g(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:O,isRequest:U,isResponse:R,isHeaders:L,isUndefined:p,isDate:k,isFile:I,isBlob:A,isRegExp:q,isFunction:E,isStream:e=>w(e)&&E(e.pipe),isURLSearchParams:T,isTypedArray:_,isFileList:C,forEach:x,merge:function e(){const{caseless:t,skipUndefined:n}=P(this)&&this||{},i={},r=(r,o)=>{const s=t&&D(i,o)||o;S(i[s])&&S(r)?i[s]=e(i[s],r):S(r)?i[s]=e({},r):v(r)?i[s]=r.slice():n&&p(r)||(i[s]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(x(t,(t,i)=>{n&&E(t)?e[i]=Object(o.a)(t,n):e[i]=t},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!b(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[c]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:V,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:F,freezeMethods:e=>{F(e,(t,n)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];E(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:D,global:N,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[u]&&e[c])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(g(e))return e;if(!("toJSON"in e)){t[i]=e;const r=v(e)?[]:{};return x(e,(e,t)=>{const o=n(e,i+1);!p(o)&&(r[t]=o)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:B,isThenable:e=>e&&(w(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:H,asap:G,isIterable:e=>null!=e&&E(e[c])}}).call(this,n(9),n(38).setImmediate,n(17))},function(e,t,n){"use strict";var i=n(1);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}i.a.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i.a.toJSONObject(this.config),code:this.code,status:this.status}}});const o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s[e]={value:e}}),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=(e,t,n,s,a,c)=>{const u=Object.create(o);i.a.toFlatObject(e,u,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e);const l=e&&e.message?e.message:"Error",d=null==t&&e?e.code:t;return r.call(u,l,d,n,s,a),e&&null==u.cause&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",c&&Object.assign(u,c),u},t.a=r},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(13);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Object(i.a)(r.key),r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},function(e,t,n){"use strict";(function(e){var i=n(1),r=n(2),o=n(12);function s(e){return i.a.isPlainObject(e)||i.a.isArray(e)}function a(e){return i.a.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,n){return e?e.concat(t).map((function(e,t){return e=a(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const u=i.a.toFlatObject(i.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,n,l){if(!i.a.isObject(t))throw new TypeError("target must be an object");n=n||new(o.a||FormData);const d=(l=i.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!i.a.isUndefined(t[e])}))).metaTokens,h=l.visitor||m,f=l.dots,v=l.indexes,p=(l.Blob||"undefined"!=typeof Blob&&Blob)&&i.a.isSpecCompliantForm(n);if(!i.a.isFunction(h))throw new TypeError("visitor must be a function");function g(t){if(null===t)return"";if(i.a.isDate(t))return t.toISOString();if(i.a.isBoolean(t))return t.toString();if(!p&&i.a.isBlob(t))throw new r.a("Blob is not supported. Use a Buffer instead.");return i.a.isArrayBuffer(t)||i.a.isTypedArray(t)?p&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function m(e,t,r){let o=e;if(e&&!r&&"object"==typeof e)if(i.a.endsWith(t,"{}"))t=d?t:t.slice(0,-2),e=JSON.stringify(e);else if(i.a.isArray(e)&&function(e){return i.a.isArray(e)&&!e.some(s)}(e)||(i.a.isFileList(e)||i.a.endsWith(t,"[]"))&&(o=i.a.toArray(e)))return t=a(t),o.forEach((function(e,r){!i.a.isUndefined(e)&&null!==e&&n.append(!0===v?c([t],r,f):null===v?t:t+"[]",g(e))})),!1;return!!s(e)||(n.append(c(r,t,f),g(e)),!1)}const y=[],E=Object.assign(u,{defaultVisitor:m,convertValue:g,isVisitable:s});if(!i.a.isObject(t))throw new TypeError("data must be an object");return function e(t,r){if(!i.a.isUndefined(t)){if(-1!==y.indexOf(t))throw Error("Circular reference detected in "+r.join("."));y.push(t),i.a.forEach(t,(function(t,o){!0===(!(i.a.isUndefined(t)||null===t)&&h.call(n,t,i.a.isString(o)?o.trim():o,r,E))&&e(t,r?r.concat(o):[o])})),y.pop()}}(t),n}}).call(this,n(40).Buffer)},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=[],o=r.forEach,s=r.slice;function a(e){return o.call(s.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function c(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":i(XMLHttpRequest))}function u(e){return function(e){return!!e&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l=n(19),d=n(36),h=Function.prototype.apply,f=Function.prototype.call,v=Object.create,p=Object.defineProperty,g=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n,r;return d(t),r=this,i.call(this,e,n=function(){o.call(r,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a={on:i=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=y.value=v(null),p(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,i,r,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(i=n[e]))for(o=0;r=i[o];++o)r!==t&&r.__eeOnceListener__!==t||(2===i.length?n[e]=i[o?0:1]:i.splice(o,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:s=function(e){var t,n,i,r,o;if(m.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(r=r.slice(),t=0;i=r[t];++t)h.call(i,this,o)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];h.call(r,this,o)}}},c={on:l(i),once:l(r),off:l(o),emit:l(s)},u=g({},c),e.exports=t=function(e){return null==e?v(u):g(Object(e),c)},t.methods=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=n(30)();e.exports=function(e){return e!==i&&null!==e}},function(e,t,n){"use strict";function i(e,t){return function(){return e.apply(t,arguments)}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";t.a=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(3);function r(e){var t=function(e,t){if("object"!=Object(i.a)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Object(i.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Object(i.a)(t)?t:t+""}},function(e,t,n){(function(i){var r;if("function"==typeof fetch&&(r=void 0!==i&&i.fetch?i.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=r||n(45);o.default&&(o=o.default),t.default=o,e.exports=t.default}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(47),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)r.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=r.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],l=!1,d=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new v(e,t)),1!==u.length||l||a(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){var i,r,o,s=n(7),a=n(14),c=n.n(a);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(i=void 0!==e&&e.fetch?e.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Object(s.b)()&&(void 0!==e&&e.XMLHttpRequest?r=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(r=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?o=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(o=window.ActiveXObject)),i||!a||r||o||(i=c.a||a),"function"!=typeof i&&(i=void 0);var l=function(e,t){if(t&&"object"===u(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},d=function(e,t,n){i(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},h=!1;t.a=function(e,t,n,a){return"function"==typeof n&&(a=n,n=void 0),a=a||function(){},i?function(e,t,n,i){e.queryStringParams&&(t=l(t,e.queryStringParams));var r=Object(s.a)({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Object(s.a)({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},h?{}:o);try{d(t,a,i)}catch(e){if(!o||0===Object.keys(o).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(o).forEach((function(e){delete a[e]})),d(t,a,i),h=!0}catch(e){i(e)}}}(e,t,n,a):Object(s.b)()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===u(n)&&(n=l("",n).slice(1)),e.queryStringParams&&(t=l(t,e.queryStringParams));try{var s;(s=r?new r:new o("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a="function"==typeof a?a():a)for(var c in a)s.setRequestHeader(c,a[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(e){console&&console.log(e)}}(e,t,n,a):void a(new Error("No fetch and no xhr implementation found!"))}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(16),r=n(20),o=n(24),s=n(32),a=n(33);(e.exports=function(e,t){var n,r,c,u,l;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],i(e)?(n=a.call(e,"c"),r=a.call(e,"e"),c=a.call(e,"w")):(n=c=!0,r=!1),l={value:t,configurable:n,enumerable:r,writable:c},u?o(s(u),l):l}).gs=function(e,t,n){var c,u,l,d;return"string"!=typeof e?(l=n,n=t,t=e,e=null):l=arguments[3],i(t)?r(t)?i(n)?r(n)||(l=n,n=void 0):n=void 0:(l=t,t=n=void 0):t=void 0,i(e)?(c=a.call(e,"c"),u=a.call(e,"e")):(c=!0,u=!1),d={get:t,set:n,configurable:c,enumerable:u},l?o(s(l),d):d}},function(e,t,n){"use strict";var i=n(21),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!i(e)&&!r.test(o.call(e))}},function(e,t,n){"use strict";var i=n(22);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!i(e)}},function(e,t,n){"use strict";var i=n(23);e.exports=function(e){if(!i(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(16),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(r,typeof e)}},function(e,t,n){"use strict";e.exports=n(25)()?Object.assign:n(26)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var i=n(27),r=n(31),o=Math.max;e.exports=function(e,t){var n,s,a,c=o(arguments.length,2);for(e=Object(r(e)),a=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},s=1;s<c;++s)i(t=arguments[s]).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(28)()?Object.keys:n(29)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(10),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(10);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var i=n(10),r=Array.prototype.forEach,o=Object.create,s=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return r.call(arguments,(function(e){i(e)&&s(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(34)()?String.prototype.contains:n(35)},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";var i=String.prototype.indexOf;e.exports=function(e){return i.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&a(r,n.prototype),r}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,s(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a(i,e)})(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function h(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(l(Error)),v=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return o(t,e),t}(f),p=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return o(t,e),t}(f),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return o(t,e),t}(f),m=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),y=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return o(t,e),t}(f),E=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),b=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(f),w="numeric",S="short",k="long",I={year:w,month:w,day:w},A={year:w,month:S,day:w},C={year:w,month:S,day:w,weekday:S},T={year:w,month:k,day:w},O={year:w,month:k,day:w,weekday:k},U={hour:w,minute:w},R={hour:w,minute:w,second:w},L={hour:w,minute:w,second:w,timeZoneName:S},x={hour:w,minute:w,second:w,timeZoneName:k},D={hour:w,minute:w,hour12:!1},N={hour:w,minute:w,second:w,hour12:!1},P={hour:w,minute:w,second:w,hour12:!1,timeZoneName:S},_={hour:w,minute:w,second:w,hour12:!1,timeZoneName:k},M={year:w,month:w,day:w,hour:w,minute:w},V={year:w,month:w,day:w,hour:w,minute:w,second:w},j={year:w,month:S,day:w,hour:w,minute:w},q={year:w,month:S,day:w,hour:w,minute:w,second:w},F={year:w,month:S,day:w,weekday:S,hour:w,minute:w},B={year:w,month:k,day:w,hour:w,minute:w,timeZoneName:S},H={year:w,month:k,day:w,hour:w,minute:w,second:w,timeZoneName:S},z={year:w,month:k,day:w,weekday:k,hour:w,minute:w,timeZoneName:k},J={year:w,month:k,day:w,weekday:k,hour:w,minute:w,second:w,timeZoneName:k};function W(e){return void 0===e}function Z(e){return"number"==typeof e}function G(e){return"number"==typeof e&&e%1==0}function Y(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function $(){return!W(Intl.DateTimeFormat.prototype.formatToParts)}function K(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function X(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function Q(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function te(e,t,n){return G(e)&&e>=t&&e<=n}function ne(e,t){void 0===t&&(t=2);var n=e<0?"-":"",i=n?-1*e:e;return""+n+(i.toString().length<t?("0".repeat(t)+i).slice(-t):i.toString())}function ie(e){return W(e)||null===e||""===e?void 0:parseInt(e,10)}function re(e){if(!W(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function oe(e,t,n){void 0===n&&(n=!1);var i=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*i)/i}function se(e){return e%4==0&&(e%100!=0||e%400==0)}function ae(e){return se(e)?366:365}function ce(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?se(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ue(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function le(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function de(e){return e>99?e:e>60?1900+e:2e3+e}function he(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=Object.assign({timeZoneName:t},o),a=Y();if(a&&$()){var c=new Intl.DateTimeFormat(n,s).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}if(a){var u=new Intl.DateTimeFormat(n,o).format(r);return new Intl.DateTimeFormat(n,s).format(r).substring(u.length).replace(/^[, \u200e]+/,"")}return null}function fe(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function ve(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new E("Invalid unit value "+e);return t}function pe(e,t,n){var i={};for(var r in e)if(ee(e,r)){if(n.indexOf(r)>=0)continue;var o=e[r];if(null==o)continue;i[t(r)]=ve(o)}return i}function ge(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+ne(n,2)+":"+ne(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+ne(n,2)+ne(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function me(e){return Q(e,["hour","minute","second","millisecond"])}var ye=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function Ee(e){return JSON.stringify(e,Object.keys(e).sort())}var be=["January","February","March","April","May","June","July","August","September","October","November","December"],we=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Se=["J","F","M","A","M","J","J","A","S","O","N","D"];function ke(e){switch(e){case"narrow":return[].concat(Se);case"short":return[].concat(we);case"long":return[].concat(be);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return[].concat(Ce);case"short":return[].concat(Ae);case"long":return[].concat(Ie);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Oe=["AM","PM"],Ue=["Before Christ","Anno Domini"],Re=["BC","AD"],Le=["B","A"];function xe(e){switch(e){case"narrow":return[].concat(Le);case"short":return[].concat(Re);case"long":return[].concat(Ue);default:return null}}function De(e,t){for(var n,i="",r=h(e);!(n=r()).done;){var o=n.value;o.literal?i+=o.val:i+=t(o.val)}return i}var Ne={D:I,DD:A,DDD:T,DDDD:O,t:U,tt:R,ttt:L,tttt:x,T:D,TT:N,TTT:P,TTTT:_,f:M,ff:j,fff:B,ffff:z,F:V,FF:q,FFF:H,FFFF:J},Pe=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],o=0;o<e.length;o++){var s=e.charAt(o);"'"===s?(n.length>0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:!1,val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i,val:n}),r},e.macroTokenToFormatOpts=function(e){return Ne[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ne(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&$(),s=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return r?function(e){return Oe[e.hour<12?0:1]}(t):s({hour:"numeric",hour12:!0},"dayperiod")},u=function(e,n){return r?function(e,t){return ke(t)[e.month-1]}(t,e):s(n?{month:e}:{month:e,day:"numeric"},"month")},l=function(e,n){return r?function(e,t){return Te(t)[e.weekday-1]}(t,e):s(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return r?function(e,t){return xe(t)[e.year<0?0:1]}(t,e):s({era:e},"era")};return De(e.parseFormat(n),(function(n){switch(n){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12==0?12:t.hour%12);case"hh":return i.num(t.hour%12==0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return o?s({day:"numeric"},"day"):i.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?s({month:"numeric"},"month"):i.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?s({year:"numeric"},"year"):i.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var i,r=this,o=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},s=e.parseFormat(n),a=s.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),c=t.shiftTo.apply(t,a.map(o).filter((function(e){return e})));return De(s,(i=c,function(e){var t=o(e);return t?r.num(i.get(t),e.length):e}))},e}(),_e=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Me=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new b},t.formatOffset=function(e,t){throw new b},t.offset=function(e){throw new b},t.equals=function(e){throw new b},r(e,[{key:"type",get:function(){throw new b}},{key:"name",get:function(){throw new b}},{key:"universal",get:function(){throw new b}},{key:"isValid",get:function(){throw new b}}]),e}(),Ve=null,je=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},r(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return Y()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ve&&(Ve=new t),Ve}}]),t}(Me),qe=RegExp("^"+ye.source+"$"),Fe={};var Be={year:0,month:1,day:2,hour:3,minute:4,second:5};var He={},ze=function(e){function t(n){var i;return(i=e.call(this)||this).zoneName=n,i.valid=t.isValidZone(n),i}o(t,e),t.create=function(e){return He[e]||(He[e]=new t(e)),He[e]},t.resetCache=function(){He={},Fe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(qe))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,i=(n=this.name,Fe[n]||(Fe[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Fe[n]),r=i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.type,a=o.value,c=Be[s];W(c)||(i[c]=parseInt(a,10))}return i}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),r=i[1],o=i[2];return[i[3],r,o,i[4],i[5],i[6]]}(i,t),o=r[0],s=r[1],a=r[2],c=r[3],u=+t,l=u%1e3;return(ue({year:o,month:s,day:a,hour:24===c?0:c,minute:r[4],second:r[5],millisecond:0})-(u-=l>=0?l:1e3+l))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Me),Je=null,We=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}o(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(fe(n[1],n[2]))}return null},r(t,null,[{key:"utcInstance",get:function(){return null===Je&&(Je=new t(0)),Je}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return ge(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ge(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Me),Ze=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}o(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Me);function Ge(e,t){var n;if(W(e)||null===e)return t;if(e instanceof Me)return e;if("string"==typeof e){var i=e.toLowerCase();return"local"===i?t:"utc"===i||"gmt"===i?We.utcInstance:null!=(n=ze.parseGMTOffset(e))?We.instance(n):ze.isValidSpecifier(i)?ze.create(e):We.parseSpecifier(i)||new Ze(e)}return Z(e)?We.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ze(e)}var Ye=function(){return Date.now()},$e=null,Ke=null,Xe=null,Qe=null,et=!1,tt=function(){function e(){}return e.resetCaches=function(){ht.resetCache(),ze.resetCache()},r(e,null,[{key:"now",get:function(){return Ye},set:function(e){Ye=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){$e=e?Ge(e):null}},{key:"defaultZone",get:function(){return $e||je.instance}},{key:"defaultLocale",get:function(){return Ke},set:function(e){Ke=e}},{key:"defaultNumberingSystem",get:function(){return Xe},set:function(e){Xe=e}},{key:"defaultOutputCalendar",get:function(){return Qe},set:function(e){Qe=e}},{key:"throwOnInvalid",get:function(){return et},set:function(e){et=e}}]),e}(),nt={};function it(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=nt[n];return i||(i=new Intl.DateTimeFormat(e,t),nt[n]=i),i}var rt={};var ot={};function st(e,t){void 0===t&&(t={});var n=t,i=(n.base,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(n,["base"])),r=JSON.stringify([e,i]),o=ot[r];return o||(o=new Intl.RelativeTimeFormat(e,t),ot[r]=o),o}var at=null;function ct(e,t,n,i,r){var o=e.listingMode(n);return"error"===o?null:"en"===o?i(t):r(t)}var ut=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&Y()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=rt[n];return i||(i=new Intl.NumberFormat(e,t),rt[n]=i),i}(e,i)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ne(this.floor?Math.floor(e):oe(e,3),this.padTo)},e}(),lt=function(){function e(e,t,n){var i;if(this.opts=n,this.hasIntl=Y(),e.zone.universal&&this.hasIntl){var r=e.offset/60*-1,o=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r,s=ze.isValidZone(o);0!==e.offset&&s?(i=o,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:li.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);if(this.hasIntl){var a=Object.assign({},this.opts);i&&(a.timeZone=i),this.dtf=it(t,a)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(Ee(Q(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case Ee(I):return"M/d/yyyy";case Ee(A):return"LLL d, yyyy";case Ee(C):return"EEE, LLL d, yyyy";case Ee(T):return"LLLL d, yyyy";case Ee(O):return"EEEE, LLLL d, yyyy";case Ee(U):return"h:mm a";case Ee(R):return"h:mm:ss a";case Ee(L):case Ee(x):return"h:mm a";case Ee(D):return"HH:mm";case Ee(N):return"HH:mm:ss";case Ee(P):case Ee(_):return"HH:mm";case Ee(M):return"M/d/yyyy, h:mm a";case Ee(j):return"LLL d, yyyy, h:mm a";case Ee(B):return"LLLL d, yyyy, h:mm a";case Ee(z):return"EEEE, LLLL d, yyyy, h:mm a";case Ee(V):return"M/d/yyyy, h:mm:ss a";case Ee(q):return"LLL d, yyyy, h:mm:ss a";case Ee(F):return"EEE, d LLL yyyy, h:mm a";case Ee(H):return"LLLL d, yyyy, h:mm:ss a";case Ee(J):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ht.create("en-US");return Pe.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&$()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),dt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&K()&&(this.rtf=st(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+r[e][0];case-1:return s?"yesterday":"last "+r[e][0];case 0:return s?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,c=Math.abs(t),u=1===c,l=r[e],d=i?u?l[1]:l[2]||l[1]:u?r[e][0]:e;return a?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ht=function(){function e(e,t,n,i){var r=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,i=e.substring(0,t);try{n=it(e).resolvedOptions()}catch(e){n=it(i).resolvedOptions()}var r=n;return[i,r.numberingSystem,r.calendar]}(e),o=r[0],s=r[1],a=r[2];this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.intl=function(e,t,n){return Y()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,i,r){void 0===r&&(r=!1);var o=t||tt.defaultLocale;return new e(o||(r?"en-US":function(){if(at)return at;if(Y()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||tt.defaultNumberingSystem,i||tt.defaultOutputCalendar,o)},e.resetCache=function(){at=null,nt={},rt={},ot={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,o=n.outputCalendar;return e.create(i,r,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=Y()&&$(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,ke,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return i.monthsCache[r][e]||(i.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var i=li.utc(2016,n,1);t.push(e(i))}return t}((function(e){return i.extract(e,n,"month")}))),i.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,Te,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return i.weekdaysCache[r][e]||(i.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var i=li.utc(2016,11,13+n);t.push(e(i))}return t}((function(e){return i.extract(e,n,"weekday")}))),i.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ct(this,void 0,e,(function(){return Oe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[li.utc(2016,11,13,9),li.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ct(this,e,t,xe,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[li.utc(-40,1,1),li.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return i?i.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new ut(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new lt(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new dt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Y()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||Y()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var i=t[0],r=t[1],o=t[2],s=n(e,o),a=s[0],c=s[1],u=s[2];return[Object.assign(i,a),r||c,u]}),[{},null,1]).slice(0,2)}}function pt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],c=s[1],u=a.exec(e);if(u)return c(u)}return[null,null]}function gt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var i,r={};for(i=0;i<t.length;i++)r[t[i]]=ie(e[n+i]);return[r,null,n+i]}}var mt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,yt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Et=RegExp(""+yt.source+mt.source+"?"),bt=RegExp("(?:T"+Et.source+")?"),wt=gt("weekYear","weekNumber","weekDay"),St=gt("year","ordinal"),kt=RegExp(yt.source+" ?(?:"+mt.source+"|("+ye.source+"))?"),It=RegExp("(?: "+kt.source+")?");function At(e,t,n){var i=e[t];return W(i)?n:ie(i)}function Ct(e,t){return[{year:At(e,t),month:At(e,t+1,1),day:At(e,t+2,1)},null,t+3]}function Tt(e,t){return[{hours:At(e,t,0),minutes:At(e,t+1,0),seconds:At(e,t+2,0),milliseconds:re(e[t+3])},null,t+4]}function Ot(e,t){var n=!e[t]&&!e[t+1],i=fe(e[t+1],e[t+2]);return[{},n?null:We.instance(i),t+3]}function Ut(e,t){return[{},e[t]?ze.create(e[t]):null,t+1]}var Rt=RegExp("^T?"+yt.source+"$"),Lt=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function xt(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&l)?-e:e};return[{years:h(ie(n)),months:h(ie(i)),weeks:h(ie(r)),days:h(ie(o)),hours:h(ie(s)),minutes:h(ie(a)),seconds:h(ie(c),"-0"===c),milliseconds:h(re(u),d)}]}var Dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(e,t,n,i,r,o,s){var a={year:2===t.length?de(ie(t)):ie(t),month:we.indexOf(n)+1,day:ie(i),hour:ie(r),minute:ie(o)};return s&&(a.second=ie(s)),e&&(a.weekday=e.length>3?Ie.indexOf(e)+1:Ae.indexOf(e)+1),a}var Pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _t(e){var t,n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=Nt(n,o,r,i,s,a,c);return t=u?Dt[u]:l?0:fe(d,h),[f,new We(t)]}var Mt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Vt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qt(e){var t=e[1],n=e[2],i=e[3];return[Nt(t,e[4],i,n,e[5],e[6],e[7]),We.utcInstance]}function Ft(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6];return[Nt(t,e[7],n,i,r,o,s),We.utcInstance]}var Bt=ft(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,bt),Ht=ft(/(\d{4})-?W(\d\d)(?:-?(\d))?/,bt),zt=ft(/(\d{4})-?(\d{3})/,bt),Jt=ft(Et),Wt=vt(Ct,Tt,Ot),Zt=vt(wt,Tt,Ot),Gt=vt(St,Tt,Ot),Yt=vt(Tt,Ot);var $t=vt(Tt);var Kt=ft(/(\d{4})-(\d\d)-(\d\d)/,It),Xt=ft(kt),Qt=vt(Ct,Tt,Ot,Ut),en=vt(Tt,Ot,Ut);var tn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},nn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},tn),rn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},tn),on=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],sn=on.slice(0).reverse();function an(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new un(i)}function cn(e,t,n,i,r){var o=e[r][n],s=t[n]/o,a=!(Math.sign(s)===Math.sign(i[r]))&&0!==i[r]&&Math.abs(s)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(s):Math.trunc(s);i[r]+=a,t[n]-=a*o}var un=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ht.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?rn:nn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new E("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:pe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ht.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var i=function(e){return pt(e,[Lt,xt])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var i=function(e){return pt(e,[Rt,$t])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Duration is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new g(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new y(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Pe.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=oe(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=ln(e),i={},r=h(on);!(t=r()).done;){var o=t.value;(ee(n.values,o)||ee(this.values,o))&&(i[o]=n.get(o)+this.get(o))}return an(this,{values:i},!0)},t.minus=function(e){if(!this.isValid)return this;var t=ln(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var r=i[n];t[r]=ve(e(this.values[r],r))}return an(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?an(this,{values:Object.assign(this.values,pe(t,e.normalizeUnit,[]))}):this},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:i})};return r&&(o.conversionAccuracy=r),an(this,o)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return function(e,t){sn.reduce((function(n,i){return W(t[i])?n:(n&&cn(e,t,n,t,i),i)}),null)}(this.matrix,e),an(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));for(var r,o,s={},a={},c=this.toObject(),u=h(on);!(o=u()).done;){var l=o.value;if(n.indexOf(l)>=0){r=l;var d=0;for(var f in a)d+=this.matrix[f][l]*a[f],a[f]=0;Z(c[l])&&(d+=c[l]);var v=Math.trunc(d);for(var p in s[l]=v,a[l]=d-v,c)on.indexOf(p)>on.indexOf(l)&&cn(this.matrix,c,p,s,l)}else Z(c[l])&&(a[l]=c[l])}for(var g in a)0!==a[g]&&(s[r]+=g===r?a[g]:a[g]/this.matrix[r][g]);return an(this,{values:s},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return an(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=h(on);!(t=n()).done;){var i=t.value;if(r=this.values[i],o=e.values[i],!(void 0===r||0===r?void 0===o||0===o:r===o))return!1}var r,o;return!0},r(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function ln(e){if(Z(e))return un.fromMillis(e);if(un.isDuration(e))return e;if("object"==typeof e)return un.fromObject(e);throw new E("Unknown duration argument "+e+" of type "+typeof e)}var dn="Invalid Interval";function hn(e,t){return e&&e.isValid?t&&t.isValid?t<e?fn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:fn.invalid("missing or invalid end"):fn.invalid("missing or invalid start")}var fn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Interval is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new p(i);return new e({invalid:i})},e.fromDateTimes=function(t,n){var i=di(t),r=di(n),o=hn(i,r);return null==o?new e({start:i,end:r}):o},e.after=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r,r.plus(i))},e.before=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r.minus(i),r)},e.fromISO=function(t,n){var i=(t||"").split("/",2),r=i[0],o=i[1];if(r&&o){var s,a,c,u;try{a=(s=li.fromISO(r,n)).isValid}catch(o){a=!1}try{u=(c=li.fromISO(o,n)).isValid}catch(o){u=!1}if(a&&u)return e.fromDateTimes(s,c);if(a){var l=un.fromISO(o,n);if(l.isValid)return e.after(s,l)}else if(u){var d=un.fromISO(r,n);if(d.isValid)return e.before(c,d)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,i=n.start,r=n.end;return this.isValid?e.fromDateTimes(i||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];for(var o=i.map(di).filter((function(e){return t.contains(e)})).sort(),s=[],a=this.s,c=0;a<this.e;){var u=o[c]||this.e,l=+u>+this.e?this.e:u;s.push(e.fromDateTimes(a,l)),a=l,c+=1}return s},t.splitBy=function(t){var n=ln(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r=this.s,o=1,s=[];r<this.e;){var a=this.start.plus(n.mapUnits((function(e){return e*o})));i=+a>+this.e?this.e:a,s.push(e.fromDateTimes(r,i)),r=i,o+=1}return s},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:e.fromDateTimes(n,i)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},e.xor=function(t){for(var n,i,r=null,o=0,s=[],a=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=h((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(i=c()).done;){var u=i.value;1===(o+="s"===u.type?1:-1)?r=u.time:(r&&+r!=+u.time&&s.push(e.fromDateTimes(r,u.time)),r=null)}return e.merge(s)},t.difference=function(){for(var t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.xor([this].concat(i)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":dn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):dn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():dn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):dn},t.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,i=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+i+this.e.toFormat(e):dn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):un.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},r(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),vn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=tt.defaultZone);var t=li.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return ze.isValidSpecifier(e)&&ze.isValidZone(e)},e.normalizeZone=function(e){return Ge(e,tt.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return ht.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,i=void 0===n?null:n;return ht.create(i,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(Y()){e=!0,t=$(),i=K();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function pn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=n(t)-n(e);return Math.floor(un.fromMillis(i).as("days"))}function gn(e,t,n,i){var r=function(e,t,n){for(var i,r,o={},s=0,a=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=pn(e,t);return(n-n%7)/7}],["days",pn]];s<a.length;s++){var c=a[s],u=c[0],l=c[1];if(n.indexOf(u)>=0){var d;i=u;var h,f=l(e,t);if((r=e.plus(((d={})[u]=f,d)))>t)e=e.plus(((h={})[u]=f-1,h)),f-=1;else e=r;o[u]=f}}return[e,o,r,i]}(e,t,n),o=r[0],s=r[1],a=r[2],c=r[3],u=t-o,l=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===l.length){var d;if(a<t)a=o.plus(((d={})[c]=1,d));a!==o&&(s[c]=(s[c]||0)+u/(a-o))}var h,f=un.fromObject(Object.assign(s,i));return l.length>0?(h=un.fromMillis(u,i)).shiftTo.apply(h,l).plus(f):f}var mn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},En=mn.hanidec.replace(/[\[|\]]/g,"").split("");function bn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+mn[n||"latn"]+t)}function wn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(mn.hanidec))t+=En.indexOf(e[n]);else for(var r in yn){var o=yn[r],s=o[0],a=o[1];i>=s&&i<=a&&(t+=i-s)}}return parseInt(t,10)}return t}(n))}}}var Sn="( |"+String.fromCharCode(160)+")",kn=new RegExp(Sn,"g");function In(e){return e.replace(/\./g,"\\.?").replace(kn,Sn)}function An(e){return e.replace(/\./g,"").replace(kn," ").toLowerCase()}function Cn(e,t){return null===e?null:{regex:RegExp(e.map(In).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return An(i)===An(e)}))+t}}}function Tn(e,t){return{regex:e,deser:function(e){return fe(e[1],e[2])},groups:t}}function On(e){return{regex:e,deser:function(e){return e[0]}}}var Un={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Rn=null;function Ln(e,t){if(e.literal)return e;var n=Pe.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Pe.create(t,n).formatDateTimeParts((Rn||(Rn=li.fromMillis(1555555555555)),Rn)).map((function(e){return function(e,t,n){var i=e.type,r=e.value;if("literal"===i)return{literal:!0,val:r};var o=n[i],s=Un[i];return"object"==typeof s&&(s=s[o]),s?{literal:!1,val:s}:void 0}(e,0,n)}));return i.includes(void 0)?e:i}function xn(e,t,n){var i=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Ln(e,t)})))}(Pe.parseFormat(n),e),r=i.map((function(t){return n=t,r=bn(i=e),o=bn(i,"{2}"),s=bn(i,"{3}"),a=bn(i,"{4}"),c=bn(i,"{6}"),u=bn(i,"{1,2}"),l=bn(i,"{1,3}"),d=bn(i,"{1,6}"),h=bn(i,"{1,9}"),f=bn(i,"{2,4}"),v=bn(i,"{4,6}"),p=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(g=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Cn(i.eras("short",!1),0);case"GG":return Cn(i.eras("long",!1),0);case"y":return wn(d);case"yy":return wn(f,de);case"yyyy":return wn(a);case"yyyyy":return wn(v);case"yyyyyy":return wn(c);case"M":return wn(u);case"MM":return wn(o);case"MMM":return Cn(i.months("short",!0,!1),1);case"MMMM":return Cn(i.months("long",!0,!1),1);case"L":return wn(u);case"LL":return wn(o);case"LLL":return Cn(i.months("short",!1,!1),1);case"LLLL":return Cn(i.months("long",!1,!1),1);case"d":return wn(u);case"dd":return wn(o);case"o":return wn(l);case"ooo":return wn(s);case"HH":return wn(o);case"H":return wn(u);case"hh":return wn(o);case"h":return wn(u);case"mm":return wn(o);case"m":case"q":return wn(u);case"qq":return wn(o);case"s":return wn(u);case"ss":return wn(o);case"S":return wn(l);case"SSS":return wn(s);case"u":return On(h);case"a":return Cn(i.meridiems(),0);case"kkkk":return wn(a);case"kk":return wn(f,de);case"W":return wn(u);case"WW":return wn(o);case"E":case"c":return wn(r);case"EEE":return Cn(i.weekdays("short",!1,!1),1);case"EEEE":return Cn(i.weekdays("long",!1,!1),1);case"ccc":return Cn(i.weekdays("short",!0,!1),1);case"cccc":return Cn(i.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Tn(new RegExp("([+-]"+u.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Tn(new RegExp("([+-]"+u.source+")("+o.source+")?"),2);case"z":return On(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,i,r,o,s,a,c,u,l,d,h,f,v,p,g})),o=r.find((function(e){return e.invalidReason}));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};var s=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),a=s[0],c=s[1],u=RegExp(a,"i"),l=function(e,t,n){var i=e.match(t);if(i){var r={},o=1;for(var s in n)if(ee(n,s)){var a=n[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,r]}return[i,{}]}(t,u,c),d=l[0],h=l[1],f=h?function(e){var t;return t=W(e.Z)?W(e.z)?null:ze.create(e.z):new We(e.Z),W(e.q)||(e.M=3*(e.q-1)+1),W(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),W(e.u)||(e.S=re(e.u)),[Object.keys(e).reduce((function(t,n){var i=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(t[i]=e[n]),t}),{}),t]}(h):[null,null],v=f[0],p=f[1];if(ee(h,"a")&&ee(h,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:u,rawMatches:d,matches:h,result:v,zone:p}}var Dn=[0,31,59,90,120,151,181,212,243,273,304,334],Nn=[0,31,60,91,121,152,182,213,244,274,305,335];function Pn(e,t){return new _e("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function _n(e,t,n){var i=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===i?7:i}function Mn(e,t,n){return n+(se(e)?Nn:Dn)[t-1]}function Vn(e,t){var n=se(e)?Nn:Dn,i=n.findIndex((function(e){return e<t}));return{month:i+1,day:t-n[i]}}function jn(e){var t,n=e.year,i=e.month,r=e.day,o=Mn(n,i,r),s=_n(n,i,r),a=Math.floor((o-s+10)/7);return a<1?a=le(t=n-1):a>le(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:s},me(e))}function qn(e){var t,n=e.weekYear,i=e.weekNumber,r=e.weekday,o=_n(n,1,4),s=ae(n),a=7*i+r-o-3;a<1?a+=ae(t=n-1):a>s?(t=n+1,a-=ae(n)):t=n;var c=Vn(t,a),u=c.month,l=c.day;return Object.assign({year:t,month:u,day:l},me(e))}function Fn(e){var t=e.year,n=Mn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},me(e))}function Bn(e){var t=e.year,n=Vn(t,e.ordinal),i=n.month,r=n.day;return Object.assign({year:t,month:i,day:r},me(e))}function Hn(e){var t=G(e.year),n=te(e.month,1,12),i=te(e.day,1,ce(e.year,e.month));return t?n?!i&&Pn("day",e.day):Pn("month",e.month):Pn("year",e.year)}function zn(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,o=te(t,0,23)||24===t&&0===n&&0===i&&0===r,s=te(n,0,59),a=te(i,0,59),c=te(r,0,999);return o?s?a?!c&&Pn("millisecond",r):Pn("second",i):Pn("minute",n):Pn("hour",t)}function Jn(e){return new _e("unsupported zone",'the zone "'+e.name+'" is not supported')}function Wn(e){return null===e.weekData&&(e.weekData=jn(e.c)),e.weekData}function Zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new li(Object.assign({},n,t,{old:n}))}function Gn(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function Yn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function $n(e,t,n){return Gn(ue(e),t,n)}function Kn(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=Object.assign({},e.c,{year:i,month:r,day:Math.min(e.c.day,ce(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=un.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Gn(ue(o),n,e.zone),c=a[0],u=a[1];return 0!==s&&(c+=s,u=e.zone.offset(c)),{ts:c,o:u}}function Xn(e,t,n,i,r){var o=n.setZone,s=n.zone;if(e&&0!==Object.keys(e).length){var a=t||s,c=li.fromObject(Object.assign(e,n,{zone:a,setZone:void 0}));return o?c:c.setZone(s)}return li.invalid(new _e("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function Qn(e,t,n){return void 0===n&&(n=!0),e.isValid?Pe.create(ht.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ei(e,t){var n=t.suppressSeconds,i=void 0!==n&&n,r=t.suppressMilliseconds,o=void 0!==r&&r,s=t.includeOffset,a=t.includePrefix,c=void 0!==a&&a,u=t.includeZone,l=void 0!==u&&u,d=t.spaceZone,h=void 0!==d&&d,f=t.format,v=void 0===f?"extended":f,p="basic"===v?"HHmm":"HH:mm";i&&0===e.second&&0===e.millisecond||(p+="basic"===v?"ss":":ss",o&&0===e.millisecond||(p+=".SSS")),(l||s)&&h&&(p+=" "),l?p+="z":s&&(p+="basic"===v?"ZZZ":"ZZ");var g=Qn(e,p);return c&&(g="T"+g),g}var ti={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ni={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ii={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ri=["year","month","day","hour","minute","second","millisecond"],oi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],si=["year","ordinal","hour","minute","second","millisecond"];function ai(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new y(e);return t}function ci(e,t){for(var n,i=h(ri);!(n=i()).done;){var r=n.value;W(e[r])&&(e[r]=ti[r])}var o=Hn(e)||zn(e);if(o)return li.invalid(o);var s=tt.now(),a=$n(e,t.offset(s),t),c=a[0],u=a[1];return new li({ts:c,zone:t,o:u})}function ui(e,t,n){var i=!!W(n.round)||n.round,r=function(e,r){return e=oe(e,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},o=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var s,a=h(n.units);!(s=a()).done;){var c=s.value,u=o(c);if(Math.abs(u)>=1)return r(u,c)}return r(e>t?-0:0,n.units[n.units.length-1])}var li=function(){function e(e){var t=e.zone||tt.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Jn(t));this.ts=W(e.ts)?tt.now():e.ts;var i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];i=o[0],r=o[1]}else{var s=t.offset(this.ts);i=Yn(this.ts,s),i=(n=Number.isNaN(i.year)?new _e("invalid input"):null)?null:i,r=n?null:s}this._zone=t,this.loc=e.loc||ht.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,i,r,o,s,a){return W(t)?e.now():ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},tt.defaultZone)},e.utc=function(t,n,i,r,o,s,a){return W(t)?new e({ts:tt.now(),zone:We.utcInstance}):ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},We.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var i,r=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);if(Number.isNaN(r))return e.invalid("invalid input");var o=Ge(n.zone,tt.defaultZone);return o.isValid?new e({ts:r,zone:o,loc:ht.fromObject(n)}):e.invalid(Jn(o))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),Z(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),Z(t))return new e({ts:1e3*t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ge(t.zone,tt.defaultZone);if(!n.isValid)return e.invalid(Jn(n));var i=tt.now(),r=n.offset(i),o=pe(t,ai,["zone","locale","outputCalendar","numberingSystem"]),s=!W(o.ordinal),a=!W(o.year),c=!W(o.month)||!W(o.day),u=a||c,l=o.weekYear||o.weekNumber,d=ht.fromObject(t);if((u||s)&&l)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new m("Can't mix ordinal dates with month/day");var f,v,p=l||o.weekday&&!u,g=Yn(i,r);p?(f=oi,v=ni,g=jn(g)):s?(f=si,v=ii,g=Fn(g)):(f=ri,v=ti);for(var y,E=!1,b=h(f);!(y=b()).done;){var w=y.value;W(o[w])?o[w]=E?v[w]:g[w]:E=!0}var S=(p?function(e){var t=G(e.weekYear),n=te(e.weekNumber,1,le(e.weekYear)),i=te(e.weekday,1,7);return t?n?!i&&Pn("weekday",e.weekday):Pn("week",e.week):Pn("weekYear",e.weekYear)}(o):s?function(e){var t=G(e.year),n=te(e.ordinal,1,ae(e.year));return t?!n&&Pn("ordinal",e.ordinal):Pn("year",e.year)}(o):Hn(o))||zn(o);if(S)return e.invalid(S);var k=$n(p?qn(o):s?Bn(o):o,r,n),I=new e({ts:k[0],zone:n,o:k[1],loc:d});return o.weekday&&u&&t.weekday!==I.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+I.toISO()):I},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Bt,Wt],[Ht,Zt],[zt,Gt],[Jt,Yt])}(e);return Xn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return pt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Pt,_t])}(e);return Xn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Mt,qt],[Vt,qt],[jt,Ft])}(e);return Xn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,i){if(void 0===i&&(i={}),W(t)||W(n))throw new E("fromFormat requires an input string and a format");var r=i,o=r.locale,s=void 0===o?null:o,a=r.numberingSystem,c=void 0===a?null:a,u=function(e,t,n){var i=xn(e,t,n);return[i.result,i.zone,i.invalidReason]}(ht.fromOpts({locale:s,numberingSystem:c,defaultToEN:!0}),t,n),l=u[0],d=u[1],h=u[2];return h?e.invalid(h):Xn(l,d,i,"format "+n,t)},e.fromString=function(t,n,i){return void 0===i&&(i={}),e.fromFormat(t,n,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Kt,Qt],[Xt,en])}(e);return Xn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the DateTime is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new v(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Pe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(We.instance(e),t)},t.toLocal=function(){return this.setZone(tt.defaultZone)},t.setZone=function(t,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,s=i.keepCalendarTime,a=void 0!==s&&s;if((t=Ge(t,tt.defaultZone)).equals(this.zone))return this;if(t.isValid){var c=this.ts;if(o||a){var u=t.offset(this.ts);c=$n(this.toObject(),u,t)[0]}return Zn(this,{ts:c,zone:t})}return e.invalid(Jn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar;return Zn(this,{loc:this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=pe(e,ai,[]),i=!W(n.weekYear)||!W(n.weekNumber)||!W(n.weekday),r=!W(n.ordinal),o=!W(n.year),s=!W(n.month)||!W(n.day),a=o||s,c=n.weekYear||n.weekNumber;if((a||r)&&c)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&r)throw new m("Can't mix ordinal dates with month/day");i?t=qn(Object.assign(jn(this.c),n)):W(n.ordinal)?(t=Object.assign(this.toObject(),n),W(n.day)&&(t.day=Math.min(ce(t.year,t.month),t.day))):t=Bn(Object.assign(Fn(this.c),n));var u=$n(t,this.o,this.zone);return Zn(this,{ts:u[0],o:u[1]})},t.plus=function(e){return this.isValid?Zn(this,Kn(this,ln(e))):this},t.minus=function(e){return this.isValid?Zn(this,Kn(this,ln(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=un.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Pe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=I),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Qn(this,n)},t.toISOWeekDate=function(){return Qn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.includeOffset,a=void 0===s||s,c=t.includePrefix,u=void 0!==c&&c,l=t.format;return ei(this,{suppressSeconds:o,suppressMilliseconds:i,includeOffset:a,includePrefix:u,format:void 0===l?"extended":l})},t.toRFC2822=function(){return Qn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Qn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Qn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone;return ei(this,{includeOffset:i,includeZone:void 0!==r&&r,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return un.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var i,r=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(i=t,Array.isArray(i)?i:[i]).map(un.normalizeUnit),s=e.valueOf()>this.valueOf(),a=gn(s?this:e,s?e:this,o,r);return s?a.negate():a},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?fn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0,r=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(r=t.unit,o=void 0),ui(n,this.plus(i),Object.assign(t,{numeric:"always",units:r,unit:o}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?ui(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("min requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("max requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var i=n,r=i.locale,o=void 0===r?null:r,s=i.numberingSystem,a=void 0===s?null:s;return xn(ht.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0}),e,t)},e.fromStringExplain=function(t,n,i){return void 0===i&&(i={}),e.fromFormatExplain(t,n,i)},r(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Wn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Wn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Wn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Fn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?vn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?vn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?vn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?vn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return se(this.year)}},{key:"daysInMonth",get:function(){return ce(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ae(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?le(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return I}},{key:"DATE_MED",get:function(){return A}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return C}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return O}},{key:"TIME_SIMPLE",get:function(){return U}},{key:"TIME_WITH_SECONDS",get:function(){return R}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return x}},{key:"TIME_24_SIMPLE",get:function(){return D}},{key:"TIME_24_WITH_SECONDS",get:function(){return N}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return P}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return _}},{key:"DATETIME_SHORT",get:function(){return M}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return F}},{key:"DATETIME_FULL",get:function(){return B}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return z}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return J}}]),e}();function di(e){if(li.isDateTime(e))return e;if(e&&e.valueOf&&Z(e.valueOf()))return li.fromJSDate(e);if(e&&"object"==typeof e)return li.fromObject(e);throw new E("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=li,t.Duration=un,t.FixedOffsetZone=We,t.IANAZone=ze,t.Info=vn,t.Interval=fn,t.InvalidZone=Ze,t.LocalZone=je,t.Settings=tt,t.VERSION="1.28.1",t.Zone=Me},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(39),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){v(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(v,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&v(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,i(c),c++},h.clearImmediate=f}function f(e){delete u[e]}function v(e){if(l)setTimeout(v,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(17))},function(e,t,n){"use strict";(function(e){
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,(function(){return function(e){function t(t){for(var n,r,o=t[0],s=t[1],a=0,l=[];a<o.length;a++)r=o[a],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&l.push(i[r][0]),i[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(c&&c(t);l.length;)l.shift()()}var n={},i={0:0};function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.e=function(e){var t=[],n=i[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,r){n=i[e]=[t,r]}));t.push(n[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.src=function(e){return r.p+""+({}[e]||e)+".js"}(e);var c=new Error;s=function(t){a.onerror=a.onload=null,clearTimeout(l);var n=i[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}i[e]=void 0}};var l=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var a=0;a<o.length;a++)t(o[a]);var c=s;return r(r.s=45)}([function(e,t,n){function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t,n,i,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){s(o,i,r,a,c,"next",e)}function c(e){s(o,i,r,a,c,"throw",e)}a(void 0)}))}}var c;self,c=()=>(()=>{"use strict";var e={"./src/NotificationItemsContent/NotificationItemsContent.ts"(e,t,n){var i;n.r(t),n.d(t,{NotificationItemsContent:()=>i}),(i||(i={})).DataController=class{constructor(e){this.localization={closeButtonText:"Close"},this.type=e.type,this.text=e.text,this.link=e.link,this.linkName=e.linkName,this.linkTooltip=e.linkTooltip,this.iconDetail=e.iconDetail,this.linkHandler=e.linkHandler,this.clickHandler=e.clickHandler,this.errorDetail=e.errorDetail,this.taskId=e.taskId,this.localization=e.localization||this.localization,this.dismissHandler=e.dismissHandler,this.actions=e.actions,this.lineClamp=e.lineClamp}}},"./src/browser-notifications/BrowserNotifications.ts"(e,t,n){n.r(t),n.d(t,{BrowserNotification:()=>i,createBrowserNotifications:()=>s});var i,o=n(/*! ../sdk */"./src/sdk.ts");function s(e){return new i.Service(e)}!function(e){class t{static get isBrowserNotificationPromiseSupported(){try{window.Notification.requestPermission().then()}catch(e){return!1}return!0}constructor(e){this.defaultOptions=e||{}}get isBrowserNotificationSupported(){return!!("Notification"in window)}get isBrowserNotificationIconSupported(){return this.isBrowserNotificationSupported&&"icon"in window.Notification.prototype}get isBrowserNotificationImageSupported(){return this.isBrowserNotificationSupported&&"image"in window.Notification.prototype}get isBrowserNotificationBadgeSupported(){return this.isBrowserNotificationSupported&&"badge"in window.Notification.prototype}get isPermissionGranted(){return"granted"===window.Notification.permission}get isPermissionDenied(){return"denied"===window.Notification.permission}get isPermissionUnknown(){return!this.isPermissionGranted&&!this.isPermissionDenied}requestNotificationUserPermission(){var e=this;return a((function*(){e.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):o.logger.warn("Browser notification is not supported...")}))()}fire(e,t){return new window.Notification(e,r(r({},this.defaultOptions),t||{}))}}e.Service=t}(i||(i={}))},"./src/decorators/decorator-debounce.ts"(e,t,n){n.r(t),n.d(t,{Debounce:()=>r});var i=n(/*! ./helper */"./src/decorators/helper.ts");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;return function(t,n,r){var o;return(0,i.decorateFunction)({target:t,key:n,descriptor:r},(function(t,n){clearTimeout(o),o=window.setTimeout(()=>{clearTimeout(o),t.apply(this,n)},e)}))}}},"./src/decorators/decorator-evt.ts"(e,t,n){n.r(t),n.d(t,{evt:()=>r});var i=n(/*! ../index */"./src/index.ts");function r(){return(e,t)=>{var n={get(){return new i.Evt(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,n):{kind:"method",placement:"prototype",key:e.key,descriptor:n}}}},"./src/decorators/decorator-exec.ts"(e,t,n){n.r(t),n.d(t,{Exec:()=>r});var i=n(/*! ./helper */"./src/decorators/helper.ts");function r(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n,r,o){return(0,i.decorateFunction)({target:n,key:r,descriptor:o},function(){var n=a((function*(n,i){var o="_".concat(r,"_exec_flag");if(!t||!this[o]){var s=t=>{if(this[o]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{var n=e;t?n.before&&n.before.call(this,this):n.after&&n.after.call(this,this)}};s(!0);var a=n.apply(this,i);a instanceof Promise?a.then(()=>s(!1)).catch(()=>s(!1)):(console.warn("Must be async function to use [@Executing] decorator"),s(!1))}}));return function(e,t){return n.apply(this,arguments)}}())}}},"./src/decorators/decorator-handle.ts"(e,t,n){n.r(t),n.d(t,{Handle:()=>o});var i=n(/*! ../err/err */"./src/err/err.ts"),r=n(/*! ./helper */"./src/decorators/helper.ts");function o(e){return function(t,n,o){return(0,r.decorateFunction)({target:t,key:n,descriptor:o},function(){var t=a((function*(t,r,o){var s=this,c=function(){var t=a((function*(t){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new i.Err.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new i.Err.Message("system","")));var r=t;r.ctx=s;var a="Error] ".concat(o,".").concat(n," [").concat(r.id,"]: ").concat(r.message);if("function"==typeof e){var c=e;console.log("[Handled".concat(a));var l=c.call(s,r);l instanceof Promise&&(yield l)}else{var u=e;if(u[r.id]){console.log("[Handled".concat(a));var d=u[r.id].call(s,r);d instanceof Promise&&(yield d)}else if(u.handle){console.log("[Handled".concat(a));var h=u.handle.call(s,r);h instanceof Promise&&(yield h)}else console.warn("[Unhandled ".concat(a));if(u.fallback){var f=u.fallback.call(s,r);f instanceof Promise&&(yield f)}}}));return function(e){return t.apply(this,arguments)}}();try{var l=t.apply(s,r);return l instanceof Promise?new Promise(e=>{l.then(e).catch(function(){var t=a((function*(t){yield c(t),e(void 0)}));return function(e){return t.apply(this,arguments)}}())}):l}catch(e){return void(yield c(e))}}));return function(e,n,i){return t.apply(this,arguments)}}())}}},"./src/decorators/decorator-once.ts"(e,t,n){n.r(t),n.d(t,{Once:()=>r});var i=n(/*! ./helper */"./src/decorators/helper.ts");function r(){return function(e,t,n){return(0,i.decorateFunction)({target:e,key:t,descriptor:n},(function(e,n){var i="_".concat(t,"_once_flag");this[i]||(this[i]=!0,e.call(this,n))}))}}},"./src/decorators/decorator-throttle.ts"(e,t,n){n.r(t),n.d(t,{Throttle:()=>r});var i=n(/*! ./helper */"./src/decorators/helper.ts");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/60;return function(t,n,r){var o=void 0,s=Date.now();return(0,i.decorateFunction)({target:t,key:n,descriptor:r},(function(t,n){var i=this,r=function(){for(var n=arguments.length,a=new Array(n),c=0;c<n;c++)a[c]=arguments[c];var l=Date.now();window.clearTimeout(o),!s||l-s>=e?(s=l,t.apply(i,a)):o=window.setTimeout(()=>r(...a),e-(l-s))};r(...n)}))}}},"./src/decorators/decorator.ts"(e,t,n){n.r(t),n.d(t,{Decorator:()=>i});var i,r,o=n(/*! ./decorator-debounce */"./src/decorators/decorator-debounce.ts"),s=n(/*! ./decorator-evt */"./src/decorators/decorator-evt.ts"),a=n(/*! ./decorator-exec */"./src/decorators/decorator-exec.ts"),c=n(/*! ./decorator-handle */"./src/decorators/decorator-handle.ts"),l=n(/*! ./decorator-once */"./src/decorators/decorator-once.ts"),u=n(/*! ./decorator-throttle */"./src/decorators/decorator-throttle.ts");(r=i||(i={})).Debounce=o.Debounce,r.Evt=s.evt,r.Exec=a.Exec,r.Handle=c.Handle,r.Once=l.Once,r.Throttle=u.Throttle},"./src/decorators/helper.ts"(e,t,n){function i(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;var n=e.descriptor.value,i=e.target.constructor.name;return e.descriptor.value=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.call(this,n,e,i)},e.descriptor}n.r(t),n.d(t,{decorateFunction:()=>i})},"./src/err/err.ts"(e,t,n){var i;n.r(t),n.d(t,{Err:()=>i}),function(e){class t extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,"string"==typeof t?this.message=t:t instanceof Error?(this.message=t.message,this.name=t.name):this.message=""}}e.Message=t;class n extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=n}(i||(i={}))},"./src/evt/evt.ts"(e,t,n){n.r(t),n.d(t,{Evt:()=>i});class i{constructor(e,t){this.target=e,this.eventName=t}emit(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bubbles:!0,composed:!0,cancelable:!1};this.target.dispatchEvent(new CustomEvent(this.eventName,r({detail:e},t)))}}},"./src/http/Http.ts"(e,t,n){n.r(t),n.d(t,{createHttp:()=>s});var i=n(/*! axios */"axios"),r=n.n(i),o=n(/*! uuid */"uuid");function s(e){var t=r().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer ".concat(t.accessToken)),!e.headers.TrackingID){var n=(0,o.v1)();e.headers.TrackingID="".concat("uuip","_").concat(n,"_").concat("1.0",":").concat("1.0")}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}},"./src/i18n/i18n.ts"(e,t,n){n.r(t),n.d(t,{I18N:()=>i});var i,r,o=n(/*! i18next */"i18next"),s=n.n(o),a=n(/*! i18next-browser-languagedetector */"i18next-browser-languagedetector"),c=n.n(a),l=n(/*! i18next-http-backend */"i18next-http-backend"),u=n.n(l),d=n(/*! ../sdk */"./src/sdk.ts");(r=i||(i={})).createService=e=>{var t=s().createInstance(),n=e&&e.backend?e.backend:new(u());t.use(n);var i=e&&e.languageDetector?e.languageDetector:new(c());return t.use(i),e&&e.logger&&t.use({log:"log"in e.logger?e.logger.log:e.logger.info,warn:e.logger.warn,error:e.logger.error,type:"logger"}),t},r.mergeServiceInitOptions=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object.assign.call(null,{},...t)},r.createMixin=e=>{var t="i18n"in e?e.i18n:r.createService(),n="i18nInitOptions"in e?e.i18nInitOptions:null;n||d.logger.info("i18n mixin instance waiting service initialization outside...");var i=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate(),this.t=s().t.bind(t)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),t.on("initialized",this.onI18NInitialized),t.on("languageChanged",this.onI18NLanguageChanged),t.isInitialized||i||!n||(i=!0,t.init(n).finally(()=>i=!1))}disconnectedCallback(){t.off("initialized",this.onI18NInitialized),t.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}}}},"./src/index.ts"(e,t,n){n.r(t),n.d(t,{AssertUtils:()=>v.AssertUtils,BrowserNotification:()=>i.BrowserNotification,Decorator:()=>r.Decorator,Err:()=>o.Err,Evt:()=>s.Evt,I18N:()=>c.I18N,Logger:()=>l.Logger,NotificationItemsContent:()=>u.NotificationItemsContent,Notifications:()=>d.Notifications,Signal:()=>h.Signal,clearInterval:()=>f.clearInterval,clearTimeout:()=>f.clearTimeout,createBrowserNotifications:()=>i.createBrowserNotifications,createHttp:()=>a.createHttp,createLogger:()=>l.createLogger,createNotifications:()=>d.createNotifications,ensureError:()=>g.ensureError,setInterval:()=>f.setInterval,setTimeout:()=>f.setTimeout});var i=n(/*! ./browser-notifications/BrowserNotifications */"./src/browser-notifications/BrowserNotifications.ts"),r=n(/*! ./decorators/decorator */"./src/decorators/decorator.ts"),o=n(/*! ./err/err */"./src/err/err.ts"),s=n(/*! ./evt/evt */"./src/evt/evt.ts"),a=n(/*! ./http/Http */"./src/http/Http.ts"),c=n(/*! ./i18n/i18n */"./src/i18n/i18n.ts"),l=n(/*! ./logger/Logger */"./src/logger/Logger.ts"),u=n(/*! ./NotificationItemsContent/NotificationItemsContent */"./src/NotificationItemsContent/NotificationItemsContent.ts"),d=n(/*! ./notifications/Notifications */"./src/notifications/Notifications.ts"),h=n(/*! ./signal/signal */"./src/signal/signal.ts"),f=n(/*! ./timerWorker */"./src/timerWorker/index.ts"),v=n(/*! ./utils/assertUtils */"./src/utils/assertUtils.ts"),g=n(/*! ./utils/errorHandling */"./src/utils/errorHandling.ts")},"./src/logger/Logger.ts"(e,t,n){n.r(t),n.d(t,{Logger:()=>i,createLogger:()=>l,flushLogger:()=>u});var i,r=n(/*! event-emitter */"event-emitter"),o=n.n(r),s=n(/*! luxon */"luxon"),a=n(/*! ./helpers/Utils */"./src/logger/helpers/Utils.ts"),c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map(e=>"string"==typeof e?e:JSON.stringify(e))};function l(e,t){var n=new i.Service(e,t);return i.POOL.addLogger(n),n}function u(){i.POOL.flush()}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";var t,n=/[\u0100-\uFFFF]/g;e.defaultSaveIntervalMilliSeconds=5e3,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(t=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=o()(),this.prefix=e,this.maskKeys=t}log(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.maskKeys&&"object"==typeof this.maskKeys&&(0,a.mask)(i,this.maskKeys);var o=c(this.prefix?["".concat(this.prefix),...i]:i),l=Date.now(),u=s.DateTime.fromMillis(l).toFormat("yyyy-LL-dd HH:mm:ss:SSS");switch(t){case e.Level.Trace:console.info(u,...o);break;case e.Level.Debug:console.log(u,...o);break;case e.Level.Warn:console.warn(u,...o);break;case e.Level.Error:case e.Level.Fatal:console.error(u,...o);break;default:console.log(...o)}var d={pfx:this.prefix,msgs:[...i],ts:l,lvl:t};this.emit("add",d)}info(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this.log(t.Trace,...n)}debug(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this.log(t.Debug,...n)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this.log(t.Warn,...n)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this.log(t.Error,...n)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.loggerEmitter.emit(e,...n)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class i{constructor(){this.loggers=new Map,this.logsCollectionString="",this.prefixedLogsCollections={},this.lastSaveTime=Date.now(),this.config={saveIntervalMilliSeconds:e.defaultSaveIntervalMilliSeconds},this.logRecordsSerializedLength=0,this.flush=()=>{this.save(!1)},this.onLoggerAddRecord=e=>{this.addLogRecord(e),this.save(!0)},this.restore()}static getSerializedJsonLogRecordBytesSize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.length;if(t){var i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){var e=this.logsCollectionString.split("<uuip-eol>").length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Date.now();t&&n-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=n,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{var t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=i.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{if(""!==this.logsCollectionString)return JSON.parse("[".concat(this.logsCollectionString.split("<uuip-eol>").join(","),"]"))}catch(e){console.log("Error parsing local storage data")}return{}}restorePreFixedLogs(){var e=this.getLogObjectFromString();e&&Array.isArray(e)&&e.length>0&&e.forEach(e=>{this.addPreFixedLogs(e),this.removeOversized()})}addPreFixedLogs(e){this.prefixedLogsCollections[e.pfx]=this.prefixedLogsCollections[e.pfx]||new Set,this.prefixedLogsCollections[e.pfx].add(e)}removeOversized(){for(;this.serializedJsonLogsBytesSize>e.MAX_LOGS_SIZE&&""!==this.logsCollectionString;)this.removeLogRecord()}removeTextFromString(e,t,n){return"".concat(e.slice(0,t)).concat(e.slice(n+t))}addLogRecord(e){try{var t=JSON.stringify(e),n=this.logsCollectionString;this.logsCollectionString=null==n?void 0:n.concat("".concat(""!==n.trim()?"<uuip-eol>":"").concat(t))}catch(t){var r=JSON.stringify(e);this.logsCollectionString=r,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=i.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){var e=this.logsCollectionString.indexOf("<uuip-eol>");if(-1!==e){var t=this.logsCollectionString.substring(0,e),n=e+"<uuip-eol>".length,r=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=r,this.logRecordsSerializedLength-=i.getSerializedJsonLogRecordBytesSize(t);try{var o=JSON.parse(t);this.prefixedLogsCollections[o.pfx]&&this.prefixedLogsCollections[o.pfx].forEach(e=>{e.ts===o.ts&&this.prefixedLogsCollections[o.pfx].delete(e)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){var t=this.getLogObjectFromString();e.forEach(e=>{var n=t.findIndex(t=>t.pfx===e.pfx);-1!==n&&(t.splice(n,1),this.logRecordsSerializedLength-=i.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=t.map(e=>JSON.stringify(e)).join("<uuip-eol>")}static getLogRecordReadable(e){return e.ts?{prefix:e.pfx,messages:e.msgs,timestamp:s.DateTime.fromMillis(e.ts).toFormat("yyyy-LL-dd HH:mm:ss:SSS"),level:t[e.lvl]}:{}}static getLogsReadableJson(e){var t=e=>e.map(e=>i.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n[i]=t(e[i]),n),{}),null,2)}static getLogsReadableText(e){var t=e=>e.reduce((e,t)=>{var n=i.getLogRecordReadable(t);return n&&(e+="".concat(n.timestamp," ")+"".concat(n.prefix," ")+"".concat(n.level," ")+"".concat(c(n.messages).join(" ")," ")+"\r\n"),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n+='[SERVICE "'.concat(i,'" LOGS]: '),n+=t(e[i])),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,".concat(encodeURIComponent(e))}static browserDownload(e,t){try{if(document&&document.createElement){var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else console.warn("Browser is not supported to download logs")}catch(e){}}addLogger(e){this.loggers.set(e.prefix,e),e.removeEventListener("add",this.onLoggerAddRecord),e.addEventListener("add",this.onLoggerAddRecord)}getAllLogsJsonUrl(){return i.getLogsUrl(i.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return i.getLogsUrl(i.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return i.getLogsUrl(i.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return i.getLogsUrl(i.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return i.getLogsUrl(i.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){i.browserDownload(this.getAllLogsJsonUrl(),"".concat(new Date,"_all_logs.json"))}browserDownloadAllPrefixedLogsJson(){i.browserDownload(this.getAllPrefixedLogsJsonUrl(),"".concat(new Date,"_all_prefixed_logs.json"))}browserDownloadPrefixedLogsJson(e){i.browserDownload(this.getPrefixedLogsJsonUrl(e),"".concat(new Date,"_").concat(e,"_logs.json"))}browserDownloadAllLogsText(){i.browserDownload(this.getAllLogsTextUrl(),"".concat(new Date,"_all_logs.log"))}browserDownloadPrefixedLogsText(e){i.browserDownload(this.getPrefixedLogsTextUrl(e),"".concat(new Date,"_").concat(e,"_logs.log"))}cleanupAllLogs(){this.logRecordsSerializedLength=0,this.logsCollectionString="",Object.keys(this.prefixedLogsCollections).forEach(e=>this.prefixedLogsCollections[e]=new Set),this.save(!0)}cleanupPrefixedLogs(e){var t=this.getPrefixedLogsCollection(e);this.removePreFixedLogs(t),this.prefixedLogsCollections[e]=new Set,this.save(!0)}getAllPrefixedLogsCollections(){return Object.keys(this.prefixedLogsCollections).reduce((e,t)=>(e[t]=this.getPrefixedLogsCollection(t),e),{})}getPrefixedLogsCollection(e){return Array.from(this.prefixedLogsCollections[e]||new Set)}}e.ServicesPool=i,e.POOL=new e.ServicesPool}(i||(i={}))},"./src/logger/helpers/Utils.ts"(e,t,n){n.r(t),n.d(t,{MASK_VALUE:()=>i,mask:()=>s});var i="*********",r=["authorization"];class o{constructor(e){this.maskKeys=e}tryJSONParse(e){try{return JSON.parse(e)}catch(e){return}}copiedObj(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}maskObjectProperty(e){var t=e;Object.keys(e).forEach(n=>{"object"==typeof e[n]&&null!==e[n]?this.maskObjectProperty(e[n]):t[n]=i})}maskLogData(e){Object.keys(e).forEach(t=>{"object"==typeof e[t]&&null!==e[t]?this.maskKeys[t]?this.maskObjectProperty(e[t]):this.maskLogData(e[t]):(this.maskKeys[t]&&"string"==typeof e[t]||"value"===t&&this.maskKeys[e.name])&&(e[t]=i)})}maskAuthorizationValues(e){if(e&&"object"==typeof e)if(Array.isArray(e))e.forEach(e=>this.maskAuthorizationValues(e));else{var t=e,n=/\b[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\b/g,o=new RegExp("\\b(".concat(r.join("|"),")\\s*:\\s*[A-Za-z0-9-_.]+"),"gi");for(var[s,a]of Object.entries(t))if("object"!=typeof a||a instanceof Date){if(r.includes(s.toLowerCase()))t[s]=i;else if("string"==typeof a){var c=a.replace(o,"$1: ".concat(i));c.includes("eyJ")&&(c=c.replace(n,i)),t[s]=c}}else this.maskAuthorizationValues(a)}}maskPIIInformation(e){var t=e[e.length-1],n="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);n&&"object"==typeof n&&(this.maskAuthorizationValues(n),this.maskLogData(n),e.splice(e.length-1,1,n))}}var s=(e,t)=>{new o(t).maskPIIInformation(e)}},"./src/notifications/Notifications.ts"(e,t,n){n.r(t),n.d(t,{Notifications:()=>i,createNotifications:()=>d});var i,o=n(/*! event-emitter */"event-emitter"),s=n.n(o),a=n(/*! event-emitter/all-off */"event-emitter/all-off"),c=n.n(a),l=n(/*! luxon */"luxon"),u=n(/*! ../sdk */"./src/sdk.ts");function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new i.Service;return t.updateConfig(e),t}!function(e){var t,n;!function(e){var t,n,i;!function(e){e.Info="info",e.Warn="warn",e.Error="error",e.Success="success",e.Chat="chat",e.Default="default"}(t=e.Type||(e.Type={})),e.TYPES=Object.values(t),function(e){e.Silent="silent",e.AutoDismiss="autodismiss",e.Acknowledge="acknowledge"}(n=e.Mode||(e.Mode={})),e.MODES=Object.values(n),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(i=e.Status||(e.Status={})),e.StatusWeight={[i.Added]:0,[i.Pended]:1,[i.Activated]:2,[i.Deactivated]:3,[i.Removed]:4},e.STATUSES=Object.values(i),function(e){e.User="user_add"}(e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(e.RemoveEventReason||(e.RemoveEventReason={}))}(t=e.ItemMeta||(e.ItemMeta={})),function(e){e.STATUS_EVENTS=["add","pending","activate","deactivate","remove"],e.STATUS_EVENT_MAP={add:t.Status.Added,pending:t.Status.Pended,activate:t.Status.Activated,deactivate:t.Status.Deactivated,remove:t.Status.Removed},e.DISABLED_ITEM_MODE={[t.Mode.Silent]:!1,[t.Mode.AutoDismiss]:!1,[t.Mode.Acknowledge]:!1},e.ACTIVATED_ITEM_MODE_LIMIT={[t.Mode.Silent]:0,[t.Mode.AutoDismiss]:10,[t.Mode.Acknowledge]:1},e.AUTO_DISMISS_TIMEOUT=5e3}(n=e.ServiceMeta||(e.ServiceMeta={}));class i{constructor(){this.hubEmitter=s()()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.hubEmitter.emit(e,...n)}addEventListener(e,t){this.hubEmitter.on(e,t)}addOnceEventListener(e,t){this.hubEmitter.once(e,t)}removeEventListener(e,t){this.hubEmitter.off(e,t)}removeAllEventListeners(){c()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){var n={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(n=r(r({},n),{},{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),n}constructor(e,n){this._serviceHubSubscriptions=[],this._itemEmitter=s()();var{type:i,mode:r,title:o,data:a,timestamp:c}=e.data;this.type=i,this.title=o,this.data=a,this._mode=r,this.timestamp=c||(new Date).toISOString(),this.datetime=l.DateTime.fromISO(this.timestamp).toLocaleString(l.DateTime.DATETIME_SHORT_WITH_SECONDS),this.options=Object.freeze(this.validateAuxOptions(e.options||{})),n&&(this._serviceHubAdapter=n,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){var e=(e,n,i)=>{this.timestamp in e&&(this._status=n,this._reason=i,n===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",n,i))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e),this._serviceHubSubscriptions.push(()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)});var n=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",n),this._serviceHubSubscriptions.push(()=>{var e;null===(e=this._serviceHubAdapter)||void 0===e||e.removeEventListener("modeStatusUpdateResponse",n)})}}unbindItemHubListeners(){this._serviceHubSubscriptions&&(this._serviceHubSubscriptions.forEach(e=>e()),this._serviceHubSubscriptions.length=0)}deactivate(e){this._status&&t.StatusWeight[this._status]<t.StatusWeight[t.Status.Deactivated]?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Deactivated,e):u.logger.warn("Service hub adapter is not initialized for this notification item instance: ",this):u.logger.warn('Notification should have "'.concat(t.Status.Pended,'" or "').concat(t.Status.Activated,'" status ')+'to be able change status to "'.concat(t.Status.Deactivated,'".')+'Current notification status is "'.concat(this._status,'". Ignoring this change'))}pending(){this._status===t.Status.Activated||this.mode!==t.Mode.Silent?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Pended,t.PendingEventReason.UserSilent):u.logger.warn("Service hub adapter is not initialized for this notification item instance: ",this):u.logger.warn('Notification should have "'.concat(t.Status.Activated,'" status or not "').concat(t.Mode.Silent,'" mode, ')+'to be able change status to "'.concat(t.Status.Pended,'" and mode to "').concat(t.Mode.Silent,'".')+'Current notification status is "'.concat(this._status,'" and mode is "').concat(this.mode,'". Ignoring this change'))}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this._itemEmitter.emit(e,...n)}addEventListener(e,t){this._itemEmitter.on(e,t)}addOnceEventListener(e,t){this._itemEmitter.once(e,t)}removeEventListener(e,t){this._itemEmitter.off(e,t)}removeAllEventListeners(){c()(this._itemEmitter)}};var o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>0;return[...e,...t].sort(n)},a=(e,t)=>e.reduce((e,n)=>(-1===t.indexOf(n)&&e.push(n),e),[]);class d{constructor(){this.emitter=s()(),this.map={},this.status=d.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:r({},n.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:r({},n.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:n.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new i,this.bindServiceHubEvents()}static mergeConfig(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(!n.length)return e;var r=n.shift(),o=e=>e&&"object"==typeof e&&!Array.isArray(e);if(o(e)&&o(r))for(var s in r)o(r[s])?(e[s]||Object.assign(e,{[s]:{}}),this.mergeConfig(e[s],r[s])):Object.assign(e,{[s]:r[s]});return this.mergeConfig(e,...n)}static createStatus(){return{[t.Status.Added]:this.createStatusHolderCollection(),[t.Status.Pended]:this.createStatusHolderCollection(),[t.Status.Activated]:this.createStatusHolderCollection(),[t.Status.Deactivated]:this.createStatusHolderCollection(),[t.Status.Removed]:this.createStatusHolderCollection()}}static createStatusHolderCollection(){return Object.assign([],r(r({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return r({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){var e=d.createStatus();this.status.added.ids.forEach(n=>{var i=this.map[n];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(i.timestamp)&&(e[t].push(i),e[t].ids.push(n),e[t][i.mode].push(i),e[t][i.type].push(i))})}),this.status=e}setAutoDismiss(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{var i;e.mode===t.Mode.AutoDismiss&&(this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(()=>n(e),null!==(i=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==i?i:this.serviceConfig.AUTO_DISMISS_TIMEOUT))})}removeAutoDismiss(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{e.timestamp in this.activeAutoDismissTimeoutRefs&&(t(e),window.clearTimeout(this.activeAutoDismissTimeoutRefs[e.timestamp]),delete this.activeAutoDismissTimeoutRefs[e.timestamp])})}update(e,t,n){var i=Array.isArray(n)?n:[n];if(i.length){var r=i.map(e=>e.timestamp);switch(e){case"add":i.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=o(this.status.added.ids,r,d.sortTimestampsFn);break;case"pending":this.status.pended.ids=o(this.status.pended.ids,r,d.sortTimestampsFn),this.status.activated.ids=a(this.status.activated.ids,r),this.status.deactivated.ids=a(this.status.deactivated.ids,r);break;case"activate":this.status.pended.ids=a(this.status.pended.ids,r),this.status.activated.ids=o(this.status.activated.ids,r,d.sortTimestampsFn),this.status.deactivated.ids=a(this.status.deactivated.ids,r);break;case"deactivate":this.status.pended.ids=a(this.status.pended.ids,r),this.status.activated.ids=a(this.status.activated.ids,r),this.status.deactivated.ids=o(this.status.deactivated.ids,r,d.sortTimestampsFn);break;case"remove":this.status.pended.ids=a(this.status.pended.ids,r),this.status.activated.ids=a(this.status.activated.ids,r),this.status.deactivated.ids=a(this.status.deactivated.ids,r),this.status.added.ids=a(this.status.added.ids,r),this.status.removed.ids=o(this.status.removed.ids,r,d.sortTimestampsFn),r.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,i,t),this.propagate(e,t,i)}}propagate(e,n,i){var r=Array.isArray(i)?i:[i];if(r.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,r);break;case"pending":case"deactivate":r.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":r.forEach(e=>{this.setAutoDismiss(e,e=>{e.mode===t.Mode.AutoDismiss&&this.serviceHubAdapter.emit("statusServiceUpdateRequest",e,t.Status.Pended,t.PendingEventReason.ServiceAutoDismiss)})});break;case"remove":this.update("deactivate",t.DeactivateEventReason.UserNegative,r)}}prepareAddNotifications(t){var n=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>'"'.concat(e,'"')).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(u.logger.error('Trying to .add(...) notification mode "'.concat(e.data.mode,'" ')+"that is disabled in this notifications service instance by configuration."+'Current configuration is: "'.concat(JSON.stringify(this.config),'"')+"Only ".concat(n," allowed. Ignoring .add(").concat(JSON.stringify(e),") notification...")),!1)).map(t=>new e.Item(t,this.serviceHubAdapter))}prepareUpdateNotifications(e){return(Array.isArray(e)?e:[e]).reduce((e,t)=>(t.timestamp in this.map?e.push(t):u.logger.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){var n=(Array.isArray(e)?e:[e]).reduce((e,t)=>(this.status.activated[t.mode].length+e[t.mode].length<this.serviceConfig.ACTIVATED_ITEM_MODE_LIMIT[t.mode]&&e[t.mode].push(t),e),d.createStatusHolderSubCollections(t.MODES));return Object.values(n).reduce((e,t)=>e.concat(t),[])}static sortByTimestampsFn(e,t){return d.sortTimestampsFn(e.timestamp,t.timestamp)}get added(){return this.status.added}get pended(){return this.status.pended}get activated(){return this.status.activated}get deactivated(){return this.status.deactivated}getNotificationStatus(e){return Object.keys(this.status).filter(e=>e!==t.Status.Added).find(t=>-1!==this.status[t].ids.indexOf(e.timestamp))}get config(){return Object.freeze(this.serviceConfig)}static validateUpdateConfig(e){var i=e;if(i.ACTIVATED_ITEM_MODE_LIMIT&&i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error("\n Max ".concat(t.Mode.Acknowledge," limit is ").concat(n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge,"\n "));if(i.DISABLED_ITEM_MODE){if(!Object.keys(i.DISABLED_ITEM_MODE).reduce((e,t)=>(i.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(i.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in i.DISABLED_ITEM_MODE&&i.DISABLED_ITEM_MODE[e]&&u.logger.warn('Changing configuration limit count for mode "'.concat(e,"\" won't have any effect, ")+"because this mode is disabled in notifications service instance")}),"AUTO_DISMISS_TIMEOUT"in i&&i.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&u.logger.warn('Changing "AUTO_DISMISS_TIMEOUT" configuration option won\'t have any effect,'+'because "'.concat(t.Mode.AutoDismiss,'" mode is disabled in notifications service instance'))}return!0}updateConfig(e){d.validateUpdateConfig(e)&&(this.serviceConfig=d.mergeConfig({},this.serviceConfig,e),u.logger.info("Updated notifications service configuration: ",this.config))}add(e){var n=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,n),n}pending(e){var n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Pended,t.PendingEventReason.UserSilent),n}deactivate(e,n){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Deactivated,n),i}remove(e){var n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Removed,t.RemoveEventReason.User),n}pendingAllActivated(){return this.pending(this.status.activated)}pendingAll(){return this.pending([...this.status.pended,...this.status.activated])}deactivateAllActivated(e){return this.deactivate(this.status.activated,e)}deactivateAll(e){return this.deactivate([...this.status.pended,...this.status.activated],e)}removeAllDeactivated(){return this.remove(this.status.deactivated)}removeAll(){return this.remove(this.status.added)}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}addOnceEventListener(e,t){this.emitter.once(e,t)}removeAllEventListeners(){c()(this.emitter)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emitter.emit(e,...n)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,n,i)=>{var r=Array.isArray(e)?e:[e],o=r.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{}),s=r.filter(e=>(o[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&n===t.Status.Pended),a=s.filter(e=>e.mode!==t.Mode.Silent);a.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",a.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent),s.length&&this.update("pending",i,s);var c=r.filter(e=>{var i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated)&&n===t.Status.Deactivated});c.length&&this.update("deactivate",i,c),r.filter(e=>{var i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated||i===t.Status.Deactivated)&&n===t.Status.Removed}).length&&this.update("remove",i,e)}),n.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,i)=>{var r=n.STATUS_EVENT_MAP[e],o=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",o,r,i)})})}}d.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=d}(i||(i={}))},"./src/sdk.ts"(e,t,n){n.r(t),n.d(t,{logger:()=>i});var i=(0,n(/*! ./logger/Logger */"./src/logger/Logger.ts").createLogger)("unified-ui-platform-sdk",{title:!0,text:!0})},"./src/signal/signal.ts"(e,t,n){var i;n.r(t),n.d(t,{Signal:()=>i}),function(e){class t{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=e=>{this.listeners.forEach(t=>t(e)),this.listenersOnce.forEach(t=>t(e)),this.listenersOnce=[]}}}class n{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=()=>{this.listeners.forEach(e=>e()),this.listenersOnce.forEach(e=>e()),this.listenersOnce=[]}}}e.create=new class{withData(){var e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){var e=new n;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(i||(i={}))},"./src/timerWorker/helpers/Utils.ts"(e,t,n){n.r(t),n.d(t,{createCache:()=>o,createGenerateUniqueNumber:()=>a,isCallNotification:()=>r,isClearResponse:()=>i});var i=e=>null===e.error&&"number"==typeof e.id,r=e=>void 0!==e.method&&"call"===e.method,o=e=>(t,n)=>(e.set(t,n),n),s=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,a=(e,t)=>n=>{var i=t.get(n),r=void 0===i?n.size:i<1073741824?i+1:0;if(!n.has(r))return e(n,r);if(n.size<536870912){for(;n.has(r);)r=Math.floor(1073741824*Math.random());return e(n,r)}if(n.size>s)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(r);)r=Math.floor(Math.random()*s);return e(n,r)}},"./src/timerWorker/index.ts"(e,t,n){n.r(t),n.d(t,{clearInterval:()=>a,clearTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>c),setInterval:()=>l,setTimeout:()=>u});var i=n(/*! ./load-worker-timers */"./src/timerWorker/load-worker-timers.ts"),r=n(/*! ./loadCheck */"./src/timerWorker/loadCheck.ts"),o=n(/*! ./worker-min */"./src/timerWorker/worker-min.ts"),s=(0,i.createLoadWorkerTimers)(r.load,o.worker),a=e=>s().clearInterval(e),c=e=>s().clearTimeout(e),l=(e,t)=>s().setInterval(e,t),u=(e,t)=>s().setTimeout(e,t)},"./src/timerWorker/load-worker-timers.ts"(e,t,n){n.r(t),n.d(t,{createLoadWorkerTimers:()=>o});var i=n(/*! ../sdk */"./src/sdk.ts"),r=null,o=(e,t)=>()=>{if(null!==r)return r;var n=new Blob([t],{type:"application/javascript; charset=utf-8"}),o=URL.createObjectURL(n);return i.logger.info("Worker url established",o),(r=e(o)).setTimeout(()=>URL.revokeObjectURL(o),0),r}},"./src/timerWorker/loadCheck.ts"(e,t,n){n.r(t),n.d(t,{load:()=>s});var i=n(/*! ../sdk */"./src/sdk.ts"),r=n(/*! ./helpers/Utils */"./src/timerWorker/helpers/Utils.ts");class o extends Error{constructor(){super("The timer is in an undefined state.")}}var s=e=>{var t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),s=new Map,a=new Worker(e);i.logger.info("worker created ",a);var c=new WeakMap,l=(0,r.createCache)(c),u=(0,r.createGenerateUniqueNumber)(l,c);return a.addEventListener("message",e=>{var{data:a}=e;if((0,r.isCallNotification)(a)){var{params:{timerId:c,timerType:l}}=a;if("interval"===l){var u=t.get(c);if("number"==typeof u){var d=s.get(u);if(void 0===d||d.timerId!==c||d.timerType!==l)throw new o}else{if(void 0===u)throw new o;u()}}else if("timeout"===l){var h=n.get(c);if("number"==typeof h){var f=s.get(h);if(void 0===f||f.timerId!==c||f.timerType!==l)throw new o}else{if(void 0===h)throw new o;h(),n.delete(c)}}}else if((0,r.isClearResponse)(a)){var{id:v}=a,g=s.get(v);if(void 0===g)throw new o;var{timerId:p,timerType:m}=g;s.delete(v),"interval"===m?t.delete(p):n.delete(p)}else{var{error:{message:y}}=a;i.logger.error(y)}}),{clearInterval:e=>{var n=u(s);s.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),a.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{var t=u(s);s.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),a.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{var i=u(t);return t.set(i,()=>{e(),"function"==typeof t.get(i)&&a.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}})}),a.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}}),i},setTimeout:(e,t)=>{var i=u(n);return n.set(i,e),a.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:i,timerType:"timeout"}}),i}}}},"./src/timerWorker/worker-min.ts"(e,t,n){n.r(t),n.d(t,{worker:()=>i});var i='(()=>{"use strict";\nconst e=new Map,t=new Map,r=(e,t)=>\n{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);\n return{expected:r+o,remainingDelay:o}},\n o=(e,t,r,i)=>{const s=performance.now();\n s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};\n addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;\n if("interval"===i)\n (t=>{const r=e.get(t);\n if(void 0===r)\n throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));\n clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});\n else{if("timeout"!==i)\n throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));\n (e=>{const r=t.get(e);if(void 0===r)\n throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));\n clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}\n else{if("set"!==s.method)\n throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));\n {const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;\n if("interval"===d)\n ((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);\n e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);\n else{if("timeout"!==d)\n throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));\n ((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);\n t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'},"./src/utils/assertUtils.ts"(e,t,n){n.r(t),n.d(t,{AssertUtils:()=>i});var i,r,o,s=n(/*! ../sdk */"./src/sdk.ts");r=i||(i={}),o=null,r.setErrorHandler=function(e){o?s.logger.error("Error handler already set"):(s.logger.info("Setting custom error handler: ".concat(e)),o=e)},r.check=function(e,t,n){return e||(o?o(t,n):s.logger.info("Assert failed in ".concat(t,": ").concat(n))),e}},"./src/utils/errorHandling.ts"(e,t,n){function i(e){if(e instanceof Error)return e;var t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch(e){}return new Error("This value was thrown as is, not through an Error: ".concat(t))}n.r(t),n.d(t,{ensureError:()=>i})},axios(e){e.exports=n(44)},"event-emitter"(e){e.exports=n(4)},"event-emitter/all-off"(e){e.exports=n(10)},i18next(e){e.exports=n(40)},"i18next-browser-languagedetector"(e){e.exports=n(41)},"i18next-http-backend"(e){e.exports=n(42)},luxon(e){e.exports=n(43)},uuid(e){e.exports=n(46)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;if(void 0===e[i]){var o=new Error("Cannot find module '"+i+"'");throw o.code="MODULE_NOT_FOUND",o}var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n("./src/index.ts")})(),e.exports=c()},function(e,t,n){"use strict";(function(e,i,r){var o=n(8);const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:c,toStringTag:l}=Symbol,u=(d=Object.create(null),e=>{const t=s.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const h=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:v}=Array,g=f("undefined");function p(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=h("ArrayBuffer");const y=f("string"),E=f("function"),S=f("number"),w=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==u(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||c in e)},k=h("Date"),I=h("File"),A=h("Blob"),C=h("FileList"),O=h("URLSearchParams"),[T,U,R,L]=["ReadableStream","Request","Response","Headers"].map(h);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),v(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{if(p(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function N(e,t){if(p(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,P=e=>!g(e)&&e!==D;const M=(V="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>V&&e instanceof V);var V;const _=h("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q=h("RegExp"),F=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};x(n,(n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)}),Object.defineProperties(e,i)};const B=h("AsyncFunction"),z=(H="function"==typeof i,W=E(D.postMessage),H?i:W?(J="axios@"+Math.random(),$=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===J&&$.length&&$.shift()()},!1),e=>{$.push(e),D.postMessage(J,"*")}):e=>setTimeout(e));var H,W,J,$;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):void 0!==r&&r.nextTick||z;t.a={isArray:v,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=u(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:b,isEmptyObject:e=>{if(!w(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:T,isRequest:U,isResponse:R,isHeaders:L,isUndefined:g,isDate:k,isFile:I,isBlob:A,isRegExp:q,isFunction:E,isStream:e=>w(e)&&E(e.pipe),isURLSearchParams:O,isTypedArray:M,isFileList:C,forEach:x,merge:function e(){const{caseless:t,skipUndefined:n}=P(this)&&this||{},i={},r=(r,o)=>{const s=t&&N(i,o)||o;b(i[s])&&b(r)?i[s]=e(i[s],r):b(r)?i[s]=e({},r):v(r)?i[s]=r.slice():n&&g(r)||(i[s]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(x(t,(t,i)=>{n&&E(t)?e[i]=Object(o.a)(t,n):e[i]=t},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!S(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[c]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:_,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:F,freezeMethods:e=>{F(e,(t,n)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];E(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:D,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[l]&&e[c])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[i]=e;const r=v(e)?[]:{};return x(e,(e,t)=>{const o=n(e,i+1);!g(o)&&(r[t]=o)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:B,isThenable:e=>e&&(w(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:z,asap:Z,isIterable:e=>null!=e&&E(e[c])}}).call(this,n(5),n(14).setImmediate,n(11))},function(e,t,n){"use strict";var i=n(1);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}i.a.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i.a.toJSONObject(this.config),code:this.code,status:this.status}}});const o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s[e]={value:e}}),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=(e,t,n,s,a,c)=>{const l=Object.create(o);i.a.toFlatObject(e,l,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e);const u=e&&e.message?e.message:"Error",d=null==t&&e?e.code:t;return r.call(l,u,d,n,s,a),e&&null==l.cause&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",c&&Object.assign(l,c),l},t.a=r},function(e,t,n){"use strict";(function(e){var i=n(1),r=n(2),o=n(9);function s(e){return i.a.isPlainObject(e)||i.a.isArray(e)}function a(e){return i.a.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,n){return e?e.concat(t).map((function(e,t){return e=a(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const l=i.a.toFlatObject(i.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,n,u){if(!i.a.isObject(t))throw new TypeError("target must be an object");n=n||new(o.a||FormData);const d=(u=i.a.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!i.a.isUndefined(t[e])}))).metaTokens,h=u.visitor||m,f=u.dots,v=u.indexes,g=(u.Blob||"undefined"!=typeof Blob&&Blob)&&i.a.isSpecCompliantForm(n);if(!i.a.isFunction(h))throw new TypeError("visitor must be a function");function p(t){if(null===t)return"";if(i.a.isDate(t))return t.toISOString();if(i.a.isBoolean(t))return t.toString();if(!g&&i.a.isBlob(t))throw new r.a("Blob is not supported. Use a Buffer instead.");return i.a.isArrayBuffer(t)||i.a.isTypedArray(t)?g&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function m(e,t,r){let o=e;if(e&&!r&&"object"==typeof e)if(i.a.endsWith(t,"{}"))t=d?t:t.slice(0,-2),e=JSON.stringify(e);else if(i.a.isArray(e)&&function(e){return i.a.isArray(e)&&!e.some(s)}(e)||(i.a.isFileList(e)||i.a.endsWith(t,"[]"))&&(o=i.a.toArray(e)))return t=a(t),o.forEach((function(e,r){!i.a.isUndefined(e)&&null!==e&&n.append(!0===v?c([t],r,f):null===v?t:t+"[]",p(e))})),!1;return!!s(e)||(n.append(c(r,t,f),p(e)),!1)}const y=[],E=Object.assign(l,{defaultVisitor:m,convertValue:p,isVisitable:s});if(!i.a.isObject(t))throw new TypeError("data must be an object");return function e(t,r){if(!i.a.isUndefined(t)){if(-1!==y.indexOf(t))throw Error("Circular reference detected in "+r.join("."));y.push(t),i.a.forEach(t,(function(t,o){!0===(!(i.a.isUndefined(t)||null===t)&&h.call(n,t,i.a.isString(o)?o.trim():o,r,E))&&e(t,r?r.concat(o):[o])})),y.pop()}}(t),n}}).call(this,n(16).Buffer)},function(e,t,n){"use strict";var i,r,o,s,a,c,l,u=n(20),d=n(37),h=Function.prototype.apply,f=Function.prototype.call,v=Object.create,g=Object.defineProperty,p=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n,r;return d(t),r=this,i.call(this,e,n=function(){o.call(r,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a={on:i=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=y.value=v(null),g(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,i,r,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(i=n[e]))for(o=0;r=i[o];++o)r!==t&&r.__eeOnceListener__!==t||(2===i.length?n[e]=i[o?0:1]:i.splice(o,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:s=function(e){var t,n,i,r,o;if(m.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(r=r.slice(),t=0;i=r[t];++t)h.call(i,this,o)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];h.call(r,this,o)}}},c={on:u(i),once:u(r),off:u(o),emit:u(s)},l=p({},c),e.exports=t=function(e){return null==e?v(l):p(Object(e),c)},t.methods=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));function r(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":i(XMLHttpRequest))}function o(e){return function(e){return!!e&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}},function(e,t,n){"use strict";var i=n(31)();e.exports=function(e){return e!==i&&null!==e}},function(e,t,n){"use strict";function i(e,t){return function(){return e.apply(t,arguments)}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";t.a=null},function(e,t,n){"use strict";var i=n(38),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)r.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=r.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],u=!1,d=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||u||a(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";(function(e){var i=n(6);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c,l,u="function"==typeof fetch?fetch:void 0;if(void 0!==e&&e.fetch?u=e.fetch:"undefined"!=typeof window&&window.fetch&&(u=window.fetch),Object(i.a)()&&(void 0!==e&&e.XMLHttpRequest?c=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(c=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?l=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(l=window.ActiveXObject)),"function"!=typeof u&&(u=void 0),!u&&!c&&!l)try{n.e(1).then(n.t.bind(null,47,7)).then((function(e){u=e.default})).catch((function(){}))}catch(e){}var d=function(e,t){if(t&&"object"===a(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},h=function(e,t,n,i){var r=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};if(i){var o=i(e,t);if(o instanceof Promise)return void o.then(r).catch(n)}"function"==typeof fetch?fetch(e,t).then(r).catch(n):u(e,t).then(r).catch(n)},f=!1;t.a=function(t,n,r,s){return"function"==typeof r&&(s=r,r=void 0),s=s||function(){},u&&0!==n.indexOf("file:")?function(t,n,i,r){t.queryStringParams&&(n=d(n,t.queryStringParams));var s=o({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);"undefined"==typeof window&&void 0!==e&&void 0!==e.process&&e.process.versions&&e.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(e.process.version,"; ").concat(e.process.platform," ").concat(e.process.arch,")")),i&&(s["Content-Type"]="application/json");var a="function"==typeof t.requestOptions?t.requestOptions(i):t.requestOptions,c=o({method:i?"POST":"GET",body:i?t.stringify(i):void 0,headers:s},f?{}:a),l="function"==typeof t.alternateFetch&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{h(n,c,r,l)}catch(e){if(!a||0===Object.keys(a).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(a).forEach((function(e){delete c[e]})),h(n,c,r,l),f=!0}catch(e){r(e)}}}(t,n,r,s):Object(i.a)()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===a(n)&&(n=d("",n).slice(1)),e.queryStringParams&&(t=d(t,e.queryStringParams));try{var r=c?new c:new l("MSXML2.XMLHTTP.3.0");r.open(n?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,n&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var o=e.customHeaders;if(o="function"==typeof o?o():o)for(var s in o)r.setRequestHeader(s,o[s]);r.onreadystatechange=function(){r.readyState>3&&i(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(n)}catch(e){console&&console.log(e)}}(t,n,r,s):void s(new Error("No fetch and no xhr implementation found!"))}}).call(this,n(5))},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(15),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(5))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,l={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){v(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(v,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&v(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return l[c]=r,i(c),c++},h.clearImmediate=f}function f(e){delete l[e]}function v(e){if(u)setTimeout(v,0,e);else{var t=l[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(5),n(11))},function(e,t,n){"use strict";(function(e){
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
var i=n(41),r=n(42),o=n(43);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n),r=(e=a(e,i)).write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=a(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|f(t.length);e=a(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function f(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(i)return q(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var l=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var d=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){d=!1;break}if(d)return o}return-1}function E(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,i){return B(q(t,e.length-n),e,n,i)}function w(e,t,n,i){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return w(e,t,n,i)}function k(e,t,n,i){return B(F(t),e,n,i)}function I(e,t,n,i){return B(function(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function A(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,c,u=e[r],l=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),r+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=4096));return n}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,i){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof i?a(e,t).fill(n,i):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):p.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(i,r),l=e.slice(t,n),d=0;d<a;++d)if(u[d]!==l[d]){o=u[d],s=l[d];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function O(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function U(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=j(e[o]);return r}function R(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function N(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function P(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function _(e,t,n,i,o){return o||P(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function M(e,t,n,i,o){return o||P(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(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 t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:q(new c(e,i).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(9))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=u(e),s=i[0],a=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(l(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var r,o,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
|
|
8
|
+
var i=n(17),r=n(18),o=n(19);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n),r=(e=a(e,i)).write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=a(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|f(t.length);e=a(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function f(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(i)return q(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function p(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===c)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var d=!0,h=0;h<c;h++)if(l(e,o+h)!==l(t,h)){d=!1;break}if(d)return o}return-1}function E(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function S(e,t,n,i){return B(q(t,e.length-n),e,n,i)}function w(e,t,n,i){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function b(e,t,n,i){return w(e,t,n,i)}function k(e,t,n,i){return B(F(t),e,n,i)}function I(e,t,n,i){return B(function(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function A(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,c,l=e[r],u=null,d=l>239?4:l>223?3:l>191?2:1;if(r+d<=n)switch(d){case 1:l<128&&(u=l);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&l)<<6|63&o)>127&&(u=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&l)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=4096));return n}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,i){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof i?a(e,t).fill(n,i):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(i,r),u=e.slice(t,n),d=0;d<a;++d)if(l[d]!==u[d]){o=l[d],s=u[d];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function T(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function U(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=j(e[o]);return r}function R(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function N(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function D(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function P(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,i,o){return o||P(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function V(e,t,n,i,o){return o||P(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(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 t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:q(new c(e,i).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var _=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(5))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=l(e),s=i[0],a=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),u=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
|
|
9
9
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
-
t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=u}return(f?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,u=8*o-r-1,l=(1<<u)-1,d=l>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,v=i?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=v,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;e[n+f]=255&s,f+=v,s/=256,u-=8);e[n+f-v]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";n.r(t);var i=n(7),r=n(18);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:r.a,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)}var t,n,r;return t=e,(n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Object(i.a)(n,this.options||{},a()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=Object(i.c)(a)).then((function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,i){var r=this;this.options.request(this.options,e,void 0,(function(o,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);var a,c;try{a="string"==typeof s.data?r.options.parse(s.data,n,i):s.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,a)}))}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,i),a=0,c=[],u=[];e.forEach((function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var l=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,l,s,(function(t,n){a+=1,c.push(t),u.push(n),a===e.length&&r&&r(c,u)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){i.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};a(o),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),s.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)}))}))}))}}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();c.type="backend",t.default=c},function(e,t){var n="undefined"!=typeof self?self:this,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,i="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,i=f(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=v(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(e,t){var n,i,r=(t=t||{}).body;if(e instanceof E){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),y.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},m.call(E.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(i,o){var s=new E(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();t.append(i,r)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;i(new w(r,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=h,e.Request=E,e.Response=w),t.Headers=h,t.Request=E,t.Response=w,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,n){"use strict";n.r(t);var i=n(4),r=n(5),o=[],s=o.forEach,a=o.slice;function c(e){return s.call(a.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var u=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l=function(e,t,n){var i=n||{};i.path=i.path||"/";var r=e+"="+encodeURIComponent(t);if(i.maxAge>0){var o=i.maxAge-0;if(isNaN(o))throw new Error("maxAge should be a Number");r+="; Max-Age="+Math.floor(o)}if(i.domain){if(!u.test(i.domain))throw new TypeError("option domain is invalid");r+="; Domain="+i.domain}if(i.path){if(!u.test(i.path))throw new TypeError("option path is invalid");r+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");r+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(r+="; HttpOnly"),i.secure&&(r+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r},d=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=l(e,encodeURIComponent(t),r)},h=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},f={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=h(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&d(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},v={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window)for(var n=window.location.search.substring(1).split("&"),i=0;i<n.length;i++){var r=n[i].indexOf("=");if(r>0)n[i].substring(0,r)===e.lookupQuerystring&&(t=n[i].substring(r+1))}return t}},p=null,g=function(){if(null!==p)return p;try{p="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){p=!1}return p},m={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&g()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&g()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},y=null,E=function(){if(null!==y)return y;try{y="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){y=!1}return y},b={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&E()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&E()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},w={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},S={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},k={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},I={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var A=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Object(r.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=c(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(f),this.addDetector(v),this.addDetector(m),this.addDetector(b),this.addDetector(w),this.addDetector(S),this.addDetector(k),this.addDetector(I)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var i=t.detectors[e].lookup(t.options);i&&"string"==typeof i&&(i=[i]),i&&(n=n.concat(i))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();A.type="languageDetector",t.default=A},function(e,t,n){"use strict";var i=n(48);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(10),r={function:!0,object:!0};e.exports=function(e){return i(e)&&r[typeof e]||!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Oe})),n.d(t,"Axios",(function(){return Ue})),n.d(t,"AxiosError",(function(){return Re})),n.d(t,"CanceledError",(function(){return Le})),n.d(t,"isCancel",(function(){return xe})),n.d(t,"CancelToken",(function(){return De})),n.d(t,"VERSION",(function(){return Ne})),n.d(t,"all",(function(){return Pe})),n.d(t,"Cancel",(function(){return _e})),n.d(t,"isAxiosError",(function(){return Me})),n.d(t,"spread",(function(){return Ve})),n.d(t,"toFormData",(function(){return je})),n.d(t,"AxiosHeaders",(function(){return qe})),n.d(t,"HttpStatusCode",(function(){return Fe})),n.d(t,"formToJSON",(function(){return Be})),n.d(t,"getAdapter",(function(){return He})),n.d(t,"mergeConfig",(function(){return ze}));var i={};n.r(i),n.d(i,"hasBrowserEnv",(function(){return m})),n.d(i,"hasStandardBrowserWebWorkerEnv",(function(){return b})),n.d(i,"hasStandardBrowserEnv",(function(){return E})),n.d(i,"navigator",(function(){return y})),n.d(i,"origin",(function(){return w}));var r=n(1),o=n(11),s=n(6);function a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function c(e,t){this._pairs=[],e&&Object(s.a)(e,this,t)}const u=c.prototype;u.append=function(e,t){this._pairs.push([e,t])},u.toString=function(e){const t=e?function(t){return e.call(this,t,a)}:a;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var l=c;function d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function h(e,t,n){if(!t)return e;const i=n&&n.encode||d;r.a.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):r.a.isURLSearchParams(t)?t.toString():new l(t,n).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}var f=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){r.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},v=n(2),p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},g={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:l,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const m="undefined"!=typeof window&&"undefined"!=typeof document,y="object"==typeof navigator&&navigator||void 0,E=m&&(!y||["ReactNative","NativeScript","NS"].indexOf(y.product)<0),b="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,w=m&&window.location.href||"http://localhost";var S={...i,...g};var k=function(e){function t(e,n,i,o){let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),c=o>=e.length;if(s=!s&&r.a.isArray(i)?i.length:s,c)return r.a.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a;i[s]&&r.a.isObject(i[s])||(i[s]=[]);return t(e,n,i[s],o)&&r.a.isArray(i[s])&&(i[s]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[s])),!a}if(r.a.isFormData(e)&&r.a.isFunction(e.entries)){const n={};return r.a.forEachEntry(e,(e,i)=>{t(function(e){return r.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null};const I={transitional:p,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=r.a.isObject(e);o&&r.a.isHTMLForm(e)&&(e=new FormData(e));if(r.a.isFormData(e))return i?JSON.stringify(k(e)):e;if(r.a.isArrayBuffer(e)||r.a.isBuffer(e)||r.a.isStream(e)||r.a.isFile(e)||r.a.isBlob(e)||r.a.isReadableStream(e))return e;if(r.a.isArrayBufferView(e))return e.buffer;if(r.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Object(s.a)(e,new S.classes.URLSearchParams,{visitor:function(e,t,n,i){return S.isNode&&r.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=r.a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Object(s.a)(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(r.a.isString(e))try{return(t||JSON.parse)(e),r.a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||I.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(r.a.isResponse(e)||r.a.isReadableStream(e))return e;if(e&&r.a.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw v.a.from(e,v.a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};r.a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});var A=I;const C=r.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const T=Symbol("internals");function O(e){return e&&String(e).trim().toLowerCase()}function U(e){return!1===e||null==e?e:r.a.isArray(e)?e.map(U):String(e)}function R(e,t,n,i,o){return r.a.isFunction(i)?i.call(this,t,n):(o&&(t=n),r.a.isString(t)?r.a.isString(i)?-1!==t.indexOf(i):r.a.isRegExp(i)?i.test(t):void 0:void 0)}class L{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=O(t);if(!o)throw new Error("header name must be a non-empty string");const s=r.a.findKey(i,o);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||t]=U(e))}const s=(e,t)=>r.a.forEach(e,(e,n)=>o(e,n,t));if(r.a.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(r.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&C[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(r.a.isObject(e)&&r.a.isIterable(e)){let n,i,o={};for(const t of e){if(!r.a.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?r.a.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=O(e)){const n=r.a.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(r.a.isFunction(t))return t.call(this,e,n);if(r.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=O(e)){const n=r.a.findKey(this,e);return!(!n||void 0===this[n]||t&&!R(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=O(e)){const o=r.a.findKey(n,e);!o||t&&!R(0,n[o],o,t)||(delete n[o],i=!0)}}return r.a.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!R(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return r.a.forEach(this,(i,o)=>{const s=r.a.findKey(n,o);if(s)return t[s]=U(i),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=U(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.a.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&r.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[T]=this[T]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=O(e);t[i]||(!function(e,t){const n=r.a.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[i]=!0)}return r.a.isArray(e)?e.forEach(i):i(e),this}}L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.a.reduceDescriptors(L.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),r.a.freezeMethods(L);var x=L;function D(e,t){const n=this||A,i=t||n,o=x.from(i.headers);let s=i.data;return r.a.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function N(e){return!(!e||!e.__CANCEL__)}function P(e,t,n){v.a.call(this,null==e?"canceled":e,v.a.ERR_CANCELED,t,n),this.name="CanceledError"}r.a.inherits(P,v.a,{__CANCEL__:!0});var _=P,M=n(12);function V(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new v.a("Request failed with status code "+n.status,[v.a.ERR_BAD_REQUEST,v.a.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var j=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=i[s];r||(r=c),n[o]=a,i[o]=c;let l=s,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const h=u&&c-u;return h?Math.round(1e3*d/h):void 0}};var q=function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,i||(i=setTimeout(()=>{i=null,s(n)},o-a)))},()=>n&&s(n)]};const F=(e,t,n=3)=>{let i=0;const r=j(50,250);return q(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,c=r(a);i=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},B=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},H=e=>(...t)=>r.a.asap(()=>e(...t));var z,J,W=S.hasStandardBrowserEnv?(z=new URL(S.origin),J=S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent),e=>(e=new URL(e,S.origin),z.protocol===e.protocol&&z.host===e.host&&(J||z.port===e.port))):()=>!0,Z=S.hasStandardBrowserEnv?{write(e,t,n,i,o,s){const a=[e+"="+encodeURIComponent(t)];r.a.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.a.isString(i)&&a.push("path="+i),r.a.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function G(e,t,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Y=e=>e instanceof x?{...e}:e;function $(e,t){t=t||{};const n={};function i(e,t,n,i){return r.a.isPlainObject(e)&&r.a.isPlainObject(t)?r.a.merge.call({caseless:i},e,t):r.a.isPlainObject(t)?r.a.merge({},t):r.a.isArray(t)?t.slice():t}function o(e,t,n,o){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e,0,o):i(e,t,0,o)}function s(e,t){if(!r.a.isUndefined(t))return i(void 0,t)}function a(e,t){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function c(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t,n)=>o(Y(e),Y(t),0,!0)};return r.a.forEach(Object.keys({...e,...t}),(function(i){const s=u[i]||o,a=s(e[i],t[i],i);r.a.isUndefined(a)&&s!==c||(n[i]=a)})),n}var K=e=>{const t=$({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=x.from(a),t.url=h(G(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),r.a.isFormData(n))if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(r.a.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(S.hasStandardBrowserEnv&&(i&&r.a.isFunction(i)&&(i=i(t)),i||!1!==i&&W(t.url))){const e=o&&s&&Z.read(s);e&&a.set(o,e)}return t};var X="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=K(e);let o=i.data;const s=x.from(i.headers).normalize();let a,c,u,l,d,{responseType:h,onUploadProgress:f,onDownloadProgress:g}=i;function m(){l&&l(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function E(){if(!y)return;const i=x.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());V((function(e){t(e),m()}),(function(e){n(e),m()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(new v.a("Request aborted",v.a.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const i=t&&t.message?t.message:"Network Error",r=new v.a(i,v.a.ERR_NETWORK,e,y);r.event=t||null,n(r),y=null},y.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||p;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new v.a(t,r.clarifyTimeoutError?v.a.ETIMEDOUT:v.a.ECONNABORTED,e,y)),y=null},void 0===o&&s.setContentType(null),"setRequestHeader"in y&&r.a.forEach(s.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),r.a.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),h&&"json"!==h&&(y.responseType=i.responseType),g&&([u,d]=F(g,!0),y.addEventListener("progress",u)),f&&y.upload&&([c,l]=F(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",l)),(i.cancelToken||i.signal)&&(a=t=>{y&&(n(!t||t.type?new _(null,e,y):t),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);b&&-1===S.protocols.indexOf(b)?n(new v.a("Unsupported protocol "+b+":",v.a.ERR_BAD_REQUEST,e)):y.send(o||null)}))};var Q=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;i.abort(t instanceof v.a?t:new _(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new v.a(`timeout ${t} of ms exceeded`,v.a.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:c}=i;return c.unsubscribe=()=>r.a.asap(a),c}};const ee=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},te=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ne=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of te(e))yield*ee(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:ie}=r.a,re=(({Request:e,Response:t})=>({Request:e,Response:t}))(r.a.global),{ReadableStream:oe,TextEncoder:se}=r.a.global,ae=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ce=e=>{e=r.a.merge.call({skipUndefined:!0},re,e);const{fetch:t,Request:n,Response:i}=e,o=t?ie(t):"function"==typeof fetch,s=ie(n),a=ie(i);if(!o)return!1;const c=o&&ie(oe),u=o&&("function"==typeof se?(l=new se,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const d=s&&c&&ae(()=>{let e=!1;const t=new n(S.origin,{body:new oe,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),h=a&&c&&ae(()=>r.a.isReadableStream(new i("").body)),f={stream:h&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new v.a(`Response type '${e}' is not supported`,v.a.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const i=r.a.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(r.a.isBlob(e))return e.size;if(r.a.isSpecCompliantForm(e)){const t=new n(S.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return r.a.isArrayBufferView(e)||r.a.isArrayBuffer(e)?e.byteLength:(r.a.isURLSearchParams(e)&&(e+=""),r.a.isString(e)?(await u(e)).byteLength:void 0)})(t):i};return async e=>{let{url:o,method:a,data:c,signal:u,cancelToken:l,timeout:g,onDownloadProgress:m,onUploadProgress:y,responseType:E,headers:b,withCredentials:w="same-origin",fetchOptions:S}=K(e),k=t||fetch;E=E?(E+"").toLowerCase():"text";let I=Q([u,l&&l.toAbortSignal()],g),A=null;const C=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let T;try{if(y&&d&&"get"!==a&&"head"!==a&&0!==(T=await p(b,c))){let e,t=new n(o,{method:"POST",body:c,duplex:"half"});if(r.a.isFormData(c)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,n]=B(T,F(H(y)));c=ne(t.body,65536,e,n)}}r.a.isString(w)||(w=w?"include":"omit");const t=s&&"credentials"in n.prototype,u={...S,signal:I,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:c,duplex:"half",credentials:t?w:void 0};A=s&&new n(o,u);let l=await(s?k(A,S):k(o,u));const v=h&&("stream"===E||"response"===E);if(h&&(m||v&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=l[t]});const t=r.a.toFiniteNumber(l.headers.get("content-length")),[n,o]=m&&B(t,F(H(m),!0))||[];l=new i(ne(l.body,65536,n,()=>{o&&o(),C&&C()}),e)}E=E||"text";let g=await f[r.a.findKey(f,E)||"text"](l,e);return!v&&C&&C(),await new Promise((t,n)=>{V(t,n,{data:g,headers:x.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:A})})}catch(t){if(C&&C(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new v.a("Network Error",v.a.ERR_NETWORK,e,A),{cause:t.cause||t});throw v.a.from(t,t&&t.code,e,A)}}},ue=new Map,le=e=>{let t=e?e.env:{};const{fetch:n,Request:i,Response:r}=t,o=[i,r,n];let s,a,c=o.length,u=ue;for(;c--;)s=o[c],a=u.get(s),void 0===a&&u.set(s,a=c?new Map:ce(t)),u=a;return a};le();const de={http:M.a,xhr:X,fetch:{get:le}};r.a.forEach(de,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const he=e=>"- "+e,fe=e=>r.a.isFunction(e)||null===e||!1===e;var ve=(e,t)=>{e=r.a.isArray(e)?e:[e];const{length:n}=e;let i,o;const s={};for(let a=0;a<n;a++){let n;if(i=e[a],o=i,!fe(i)&&(o=de[(n=String(i)).toLowerCase()],void 0===o))throw new v.a(`Unknown adapter '${n}'`);if(o&&(r.a.isFunction(o)||(o=o.get(t))))break;s[n||"#"+a]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(he).join("\n"):" "+he(e[0]):"as no adapter specified";throw new v.a("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function pe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _(null,e)}function ge(e){pe(e),e.headers=x.from(e.headers),e.data=D.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ve(e.adapter||A.adapter,e)(e).then((function(t){return pe(e),t.data=D.call(e,e.transformResponse,t),t.headers=x.from(t.headers),t}),(function(t){return N(t)||(pe(e),t&&t.response&&(t.response.data=D.call(e,e.transformResponse,t.response),t.response.headers=x.from(t.response.headers))),Promise.reject(t)}))}const me={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{me[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ye={};me.transitional=function(e,t,n){function i(e,t){return"[Axios v1.12.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new v.a(i(r," has been removed"+(t?" in "+t:"")),v.a.ERR_DEPRECATED);return t&&!ye[r]&&(ye[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},me.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Ee={assertOptions:function(e,t,n){if("object"!=typeof e)throw new v.a("options must be an object",v.a.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new v.a("option "+o+" must be "+n,v.a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new v.a("Unknown option "+o,v.a.ERR_BAD_OPTION)}},validators:me};const be=Ee.validators;class we{constructor(e){this.defaults=e||{},this.interceptors={request:new f,response:new f}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=$(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Ee.assertOptions(n,{silentJSONParsing:be.transitional(be.boolean),forcedJSONParsing:be.transitional(be.boolean),clarifyTimeoutError:be.transitional(be.boolean)},!1),null!=i&&(r.a.isFunction(i)?t.paramsSerializer={serialize:i}:Ee.assertOptions(i,{encode:be.function,serialize:be.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ee.assertOptions(t,{baseUrl:be.spelling("baseURL"),withXsrfToken:be.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&r.a.merge(o.common,o[t.method]);o&&r.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=x.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let d,h=0;if(!c){const e=[ge.bind(this),void 0];for(e.unshift(...a),e.push(...u),d=e.length,l=Promise.resolve(t);h<d;)l=l.then(e[h++],e[h++]);return l}d=a.length;let f=t;for(;h<d;){const e=a[h++],t=a[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=ge.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,d=u.length;h<d;)l=l.then(u[h++],u[h++]);return l}getUri(e){return h(G((e=$(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}r.a.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,n){return this.request($(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.a.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request($(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}we.prototype[e]=t(),we.prototype[e+"Form"]=t(!0)}));var Se=we;class ke{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new _(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ke((function(t){e=t})),cancel:e}}}var Ie=ke;const Ae={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ae).forEach(([e,t])=>{Ae[t]=e});var Ce=Ae;const Te=function e(t){const n=new Se(t),i=Object(o.a)(Se.prototype.request,n);return r.a.extend(i,Se.prototype,n,{allOwnKeys:!0}),r.a.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e($(t,n))},i}(A);Te.Axios=Se,Te.CanceledError=_,Te.CancelToken=Ie,Te.isCancel=N,Te.VERSION="1.12.2",Te.toFormData=s.a,Te.AxiosError=v.a,Te.Cancel=Te.CanceledError,Te.all=function(e){return Promise.all(e)},Te.spread=function(e){return function(t){return e.apply(null,t)}},Te.isAxiosError=function(e){return r.a.isObject(e)&&!0===e.isAxiosError},Te.mergeConfig=$,Te.AxiosHeaders=x,Te.formToJSON=e=>k(r.a.isHTMLForm(e)?new FormData(e):e),Te.getAdapter=ve,Te.HttpStatusCode=Ce,Te.default=Te;var Oe=Te;const{Axios:Ue,AxiosError:Re,CanceledError:Le,isCancel:xe,CancelToken:De,VERSION:Ne,all:Pe,Cancel:_e,isAxiosError:Me,spread:Ve,toFormData:je,AxiosHeaders:qe,HttpStatusCode:Fe,formToJSON:Be,getAdapter:He,mergeConfig:ze}=Oe},function(e,t,n){"use strict";n.r(t),n.d(t,"Desktop",(function(){return Me}));var i=n(0);const r=Object(i.createLogger)("agentx-js-api"),o=(e,t)=>({info:(...n)=>e.info(t,...n),warn:(...n)=>e.warn(t,...n),error:(...n)=>e.error(t,...n)});class s{constructor(e){this.logger=e.logger}check(e){return e?!!e.isInited||(this.logger.error("SERVICE still not initialized... Await it's init(...) first."),!1):(this.logger.error("SERVICE is not defined..."),!1)}}const a=e=>new s(e);var c=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const u={rps:120,tag:"jsapi"},l={rps:0,tag:"jsapi"},d={tag:"jsapi"},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",u),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",l),v=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",l),p=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",l),g=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",l),m=e=>e.actionsChannels.createSource("addCustomTask",u),y=e=>e.actionsChannels.createSource("getToken/Req",l),E=e=>e.actionsChannels.createDestination("getToken/Res",d),b=e=>e.actionsChannels.createSource("getTaskMap/Req",l),w=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),S=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",l),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",l),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),C=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",l),T=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class O{checkService(){return this.serviceChecker.check(this.SERVICE)}getNextReqId(){const e=Date.now();return this.lastReqTs!==e?(this.lastReqTs=e,this.lastReqN=0):this.lastReqN++,`${this.lastReqTs}_${this.lastReqN}`}constructor(e){this.lastReqTs=Date.now(),this.lastReqN=0,this.toggleMiximizeRestore=e=>{var t;if(e&&e.target){const n=null===(t=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===t?void 0:t.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),r.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),r.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-answer event")},this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.sourceActionsChannels={fireGeneralSilentNotification:h(this.SERVICE),fireGeneralAutoDismissNotification:f(this.SERVICE),fireGeneralAcknowledgeNotification:p(this.SERVICE),addCustomTask:m(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:S(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:v(this.SERVICE),fireGeneralAcknowledgeNotification:g(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:w(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:T(this.SERVICE)},this.logger.info("Inited"))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fireGeneralSilentNotification(...e){this.checkService()&&this.sourceActionsChannels.fireGeneralSilentNotification.send(...e)}fireGeneralAutoDismissNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.AutoDismiss&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(r),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...e)})}))}fireGeneralAcknowledgeNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.Acknowledge&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(r),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...e)})}))}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getTaskMap.removeListener(n))};this.destinationActionsChannels.getTaskMap.addListener(n),this.sourceActionsChannels.getTaskMap.send(t)})}))}getMediaTypeQueue(e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),i=({args:[e,r]})=>{r===n&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(i))};this.destinationActionsChannels.getMediaTypeQueue.addListener(i),this.sourceActionsChannels.getMediaTypeQueue.send(e,n)})}))}getToken(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getToken.removeListener(n))};this.destinationActionsChannels.getToken.addListener(n),this.sourceActionsChannels.getToken.send(t)})}))}getIdleCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getIdleCodes.removeListener(n))};this.destinationActionsChannels.getIdleCodes.addListener(n),this.sourceActionsChannels.getIdleCodes.send(t)})}))}getWrapUpCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getWrapUpCodes.removeListener(n))};this.destinationActionsChannels.getWrapUpCodes.addListener(n),this.sourceActionsChannels.getWrapUpCodes.send(t)})}))}getClosestElement(e,t){return e&&e!==document&&e!==window?e instanceof ShadowRoot?this.getClosestElement(e.host,t):e instanceof HTMLElement&&e.matches(t)?e:this.getClosestElement(e.parentNode,t):null}}const U=o(r,"[Actions JSAPI] =>");class R{constructor(e){this.isInited=!1,this.listeners=new Map,this.listenersOnce=new Map,this.logger=e.logger}init(e){this.aqmServiceEntity=e.aqmServiceEntity,this.aqmServiceEntityString=e.aqmServiceEntityString,this.isInited=!0}cleanup(){this.removeAllEventListeners(),this.aqmServiceEntity=void 0,this.aqmServiceEntityString=void 0,this.isInited=!1}_addEventListener(e,t,n){var i,r,o;const s=n?"listenersOnce":"listeners";this[s].has(e)||this[s].set(e,new Map);const a=this[s].get(e),c=n?"listenOnce":"listen",u=i=>{let r=null;return n&&(r=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(i){n?(i.stopListenOnce(),r&&r.stopListenOnce()):i.stopListen();const o=[];o.push(`UnBound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(o.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&c in this.aqmServiceEntity[e]){const r=this.aqmServiceEntity[e][c](t);a.set(t,u(r));const o=[];o.push(`Bound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`to "${this.aqmServiceEntityString}"`),null===(i=this.logger)||void 0===i||i.info(o.join(" "))}else null===(r=this.logger)||void 0===r||r.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(o=this.logger)||void 0===o||o.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,n){const i=n?"listenersOnce":"listeners";if(this[i].has(e)){const n=this[i].get(e);if(n){if(n.has(t)){n.get(t)(),n.delete(t)}n.size<1&&this[i].delete(e)}}}addEventListener(e,t){this._addEventListener(e,t,!1)}addOnceEventListener(e,t){this._addEventListener(e,t,!0)}removeEventListener(e,t){this._removeEventListener(e,t,!1)}removeOnceEventListener(e,t){this._removeEventListener(e,t,!0)}removeAllEventListeners(){["listeners","listenersOnce"].forEach(e=>{this[e].forEach((e,t)=>{e.forEach((e,t)=>e()),e.clear()}),this[e].clear()})}}const L=e=>new R(e);var x,D,N,P,_,M,V,j,q;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(x||(x={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(D||(D={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(N||(N={})),function(e){e.All="All",e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social"}(P||(P={})),function(e){e.SMS="SMS",e.TELEPHONY="Call",e.CHAT="Chat",e.EMAIL="Email",e.MESSENGER="Messenger",e.WHATSAPP="WhatsApp",e.APPLE_BUSINESS_CHAT="Apple Business Chat",e.GOOGLE_BUSINESS_MESSAGES="Google's Business Messages"}(_||(_={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(M||(M={})),function(e){e.EMAIL="email",e.CHAT="chat",e.TELEPHONY="telephony",e.SOCIAL="social",e.SMS="sms",e.FACEBOOK="facebook",e.WHATSAPP="whatsapp",e.APPLEMESSAGES="appleMessages",e.GOOGLEMESSAGES="googleMessages"}(V||(V={})),(q=j||(j={})).validateAgentState=e=>Object.values(N).includes(e),q.validateURL=e=>/^[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/.test(e),q.validateChannelName=e=>Object.values(_).includes(e),q.validateStateChannelType=e=>Array.isArray(e)&&e.length>0&&e.every(e=>["telephony","chat","email","social"].includes(e)),q.validateDestinationType=e=>Object.values(D).includes(e),q.validateMediaType=e=>Object.values(x).includes(e),q.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,q.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,q.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&q.validatePropValueNotNullAndEmpty(e),q.validateStringToBoolean=e=>{const t=null==e?void 0:e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},q.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,q.validateChannelType=e=>Object.values(_).includes(e),q.validateMonitorType=e=>Object.values(M).includes(e),q.validateUUID=e=>/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e),q.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),q.validateBuddyAgents=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateChannelName(null==e?void 0:e.channelName),t,"channelName is not a valid channel name"),void 0!==(null==e?void 0:e.state)&&i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state"),void 0!==(null==e?void 0:e.trackingId)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.trackingId),t,"trackingId is not a valid string")},q.validateAuxCodeType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e),t,"value is null or empty"),i.AssertUtils.check("IDLE_CODE"===e||"WRAP_UP_CODE"===e,t,"value is not IDLE_CODE or WRAP_UP_CODE")},q.validateAuxCodePayload=(e,t)=>{q.validateAuxCodeType(e.workType,t),void 0!==e.page&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.page),t,"page is is null or empty"),void 0!==e.pageSize&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.pageSize),t,"pageSize is is null or empty"),void 0!==e.search&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.search),t,"search is is null or empty"),void 0!==e.customFilter&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.customFilter),t,"customFilter is is null or empty")},q.validateCancelCtq=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.queueId),t,"queueId is not a valid UUID")},q.validateWrapupPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.auxCodeId),t,"auxCodeId is not a valid string"),i.AssertUtils.check(q.validateStringToBoolean(null==e?void 0:e.isAutoWrapup),t,"isAutoWrapup is not a valid boolean value")},q.validateVTeamTransferPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.vteamId),t,"vteamId is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.vteamType),t,"vteamType is not a valid string")},q.validateBlindTransferPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destAgentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destAgentTeamId),t,"destAgentTeamId is not a valid string"),i.AssertUtils.check(q.validateStringNumberOnly(null==e?void 0:e.destAgentDN),t,"destAgentDN is not a numbers only string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destSiteId),t,"destSiteId is not a valid string")},q.validateConsultPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),void 0!==(null==e?void 0:e.destAgentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destAgentId is not a valid UUID"),void 0!==(null==e?void 0:e.mediaType)&&i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),void 0!==(null==e?void 0:e.holdParticipants)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultTransferPayLoad=(e,t)=>{void 0!==(null==e?void 0:e.agentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destagentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.mediaResourceId),t,"mediaResourceId is not a valid UUID"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateWrapUpV2Payload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.auxCodeId),t,"auxCodeId is not a valid string")},q.validateChangeAgentStateType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.state),t,"state is null or empty"),i.AssertUtils.check("available"===e.state.toLowerCase()||"idle"===e.state.toLowerCase(),t,"state is not Available or Idle"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is null or empty"),i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID")},q.validateConsultDataV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultConferenceDataV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.agentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateTransferV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateBuddyAgentsV2Payload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateAgentState(null==e?void 0:e.state),t,"state is not a valid state")},q.validateVTeam=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentSessionId),t,"agentSessionId is not a valid UUID"),i.AssertUtils.check(q.validateChannelType(null==e?void 0:e.channelType),t,"channelType is not a valid channel type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.type),t,"type is not a valid string"),void 0!==(null==e?void 0:e.trackingId)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.trackingId),t,"trackingId is not a valid string")},q.validateDialerTasks=(e,t)=>{(null==e?void 0:e.id)&&i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.entryPointId),t,"entryPointId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destination),t,"destination is null or empty"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.direction),t,"direction is not a valid UUID"),(null==e?void 0:e.origin)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.origin),t,"origin is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.attributes.key),t,"attributes.key is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.attributes.value),t,"attributes.value is null or empty"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.outboundType),t,"outboundType is null or empty")},q.validatePreviewCampaignPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.interactionId),t,"interactionId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.campaignId),t,"campaignId is null or empty")},q.validateMonitoringRequest=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateMonitorType(null==e?void 0:e.monitorType),t,"monitorType is not a valid monitor type"),void 0!==(null==e?void 0:e.queueIds)&&e.queueIds.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"queueIds is not a valid UUID")}),void 0!==(null==e?void 0:e.teams)&&e.teams.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"team is not a valid UUID")}),void 0!==(null==e?void 0:e.sites)&&e.sites.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"site is not a valid UUID")}),void 0!==(null==e?void 0:e.agents)&&e.agents.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"agent is not a valid UUID")}),void 0!==(null==e?void 0:e.startUTCTimestamp)&&i.AssertUtils.check(q.validateUTCTimeStampNumberFormat(e.startUTCTimestamp),t,"startUTCTimestamp is not a valid timestamp"),void 0!==(null==e?void 0:e.continuousDuration)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.continuousDuration),t,"continuousDuration is not a valid string or not undefined"),void 0!==(null==e?void 0:e.taskId)&&i.AssertUtils.check(q.validateUUID(e.taskId),t,"taskId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.trackingId),t,"trackingId is not a valid UUID"),(null==e?void 0:e.invisibleMode)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.invisibleMode),t,"invisibleMode is not a valid string or not undefined")},q.validateMultiConsultPayload=(e,t)=>{e&&Object.entries(e).forEach(([e,n])=>{switch(e){case"agentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"agentId is not a valid UUID");break;case"destAgentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"destAgentId is not a valid UUID");break;case"mediaType":i.AssertUtils.check(q.validateMediaType(n),t,"mediaType is not a valid media type");break;case"holdParticipants":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(n),t,"holdParticipants is not valid");break;case"destAgentDN":i.AssertUtils.check(q.validateStringNumberOnly(String(n)),t,"destAgentDN is not a numbers only string");break;case"destinationType":i.AssertUtils.check(q.validateDestinationType(n),t,"destinationType is not a valid destination type");break;case"destAgentTeamId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destAgentTeamId is not a valid string");break;case"destSiteId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destSiteId is not a valid string");break;case"queueId":i.AssertUtils.check(q.validateUUID(String(n)),t,"queueId is not a valid UUID");break;case"trackingId":i.AssertUtils.check(q.validateUUID(String(n)),t,"trackingId is not a valid string")}})};var F=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class B{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.contact,aqmServiceEntityString:"SERVICE.aqm.contact"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}sendDtmf(e){this.checkService()&&this.SERVICE.webCalling.sendDTMF(e)}accept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"accept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.accept(e)}))}consultAccept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultAccept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultAccept(e)}))}buddyAgents(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgents(e.data,"buddyAgents"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgents(e)}))}end(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"end","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.end(e)}))}consultEnd(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEnd","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEnd(e)}))}cancelCtq(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateCancelCtq(e.data,"cancelCtq"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelCtq(e)}))}wrapup(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateWrapupPayload(e.data,"wrapup"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapup(e)}))}vteamTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateVTeamTransferPayload(e.data,"vteamTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransfer(e)}))}blindTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransfer","interactionId is not a valid UUID"),j.validateBlindTransferPayload(e.data,"blindTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransfer(e)}))}hold(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"hold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.hold(e)}))}unHold(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"unHold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.unHold(e)}))}consult(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consult","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateURL(e.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(e.data,"consult"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consult(e)}))}consultConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConference","interactionId is not a valid UUID"),j.validateConsultPayload(e.data,"consultConference"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConference(e)}))}decline(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"decline","isConsult is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.decline(e)}))}consultTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),j.validateConsultTransferPayLoad(e.data,"consultTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransfer(e)}))}vteamList(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateVTeam(e.data,"vteamList"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamList(e)}))}pauseRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecording","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecording(e)}))}resumeRecording(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecording","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(null===(t=e.data)||void 0===t?void 0:t.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecording(e)}))}acceptV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"acceptV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.acceptV2(e)}))}endV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endV2","interactionId is not a valid UUID"),e.isEndingFromNonPrimary&&i.AssertUtils.check(j.validateBoolean(e.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(e):void 0}))}cancelTaskV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelTaskV2","interactionId is not a valid UUID"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(e):void 0}))}pauseRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecordingV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecordingV2(e)}))}resumeRecordingV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecordingV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(null===(t=e.data)||void 0===t?void 0:t.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecordingV2(e)}))}wrapupV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"wrapupV2","interactionId is not a valid UUID"),j.validateWrapUpV2Payload(e.data,"wrapupV2"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(e):void 0}))}consultV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultV2","interactionId is not a valid UUID"),j.validateConsultDataV2Payload(e.data,"consultV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultV2(e)}))}consultEndV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEndV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEndV2","isConsult is not a valid boolean value"),e.isSecondaryEpDnAgent&&i.AssertUtils.check(j.validateBoolean(e.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),e.queueId&&i.AssertUtils.check(j.validateUUID(e.queueId),"consultEndV2","queueId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEndV2(e)}))}consultConferenceV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConferenceV2","interactionId is not a valid UUID"),j.validateConsultConferenceDataV2Payload(e.data,"consultConferenceV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConferenceV2(e)}))}exitConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"exitConference","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.exitConference(e)}))}consultTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"consultTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransferV2(e)}))}blindTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"blindTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransferV2(e)}))}vteamTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"vteamTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"vteamTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransferV2(e)}))}buddyAgentsV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgentsV2Payload(e.data,"buddyAgentsV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgentsV2(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const H=o(r,"[AgentContact JSAPI] =>"),z=o(H,"[AqmServiceEvents: Contact] => ");var J=n(8),W=n.n(J),Z=n(15),G=n.n(Z),Y=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const $={agentName:void 0,agentProfileID:void 0,agentSessionId:void 0,idleCode:void 0,teamId:void 0,teamName:void 0,dn:void 0,status:void 0,subStatus:void 0,idleCodes:void 0,wrapupCodes:void 0,outDialRegex:void 0,isOutboundEnabledForTenant:void 0,isOutboundEnabledForAgent:void 0,isEndCallEnabled:void 0,isEndConsultEnabled:void 0,allowConsultToQueue:void 0,isAdhocDialingEnabled:void 0,isAgentAvailableAfterOutdial:void 0,isCampaignManagementEnabled:void 0,agentPersonalStatsEnabled:void 0};class K{stateChangeByChannelType(e){throw new Error("Method not implemented.")}checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,n)=>{const i=e[n],r=this.latestData[n];return JSON.stringify(i)!==JSON.stringify(r)&&t.push({name:n,value:i,oldValue:r}),t},[]);t.length&&(t.forEach(e=>this.latestData[e.name]=e.value),this.emit("updated",t))}static getOutdialRegex(e){if(e&&e.dialPlanEntity){const t=e.dialPlanEntity.find(e=>"Any Format"===e.name);if(t)return t.regex}return""}constructor(e){this.emitter=W()(),this.listeners=new Set,this.teams=[],this.idleCodes={},this.latestData=Object.assign({},$),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const n=e.find(e=>e.teamId===t);return(null==n?void 0:n.teamName)||""}init(e){return Y(this,void 0,void 0,(function*(){e&&(this.SERVICE=e),this.checkService()&&(yield this.fetchLatestData(),this.subscribeSelfDataEvents(),this.logger.info("Inited"))}))}cleanup(){this.unsubscribeSelfDataEvents(),this.removeAllEventListeners(),this.SERVICE=void 0,this.update(Object.assign({},$)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,n,i,r,o,s;return Y(this,void 0,void 0,(function*(){const a=(null===(e=this.SERVICE)||void 0===e?void 0:e.conf.profile)?null===(t=this.SERVICE)||void 0===t?void 0:t.conf.profile:yield null===(n=this.SERVICE)||void 0===n?void 0:n.conf.fetchProfile();if(a){const{teams:e,agentName:t,agentProfileID:n,defaultDn:c,agentSubStatus:u,agentStatus:l,idleCodes:d,wrapupCodes:h,dialPlan:f,isOutboundEnabledForTenant:v,isOutboundEnabledForAgent:p,isAdhocDialingEnabled:g,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:b,isCampaignManagementEnabled:w,agentPersonalStatsEnabled:S}=a;let{idleCode:k}=a;const I=c;let A=l,C=u;if(this.teams=e,null==d||d.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}}),!k||!(null===(i=this.SERVICE)||void 0===i?void 0:i.conf.isReloginSuccess)){const e=yield null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.reload();(null==e?void 0:e.data)&&(k="0"!=e.data.auxCodeId&&e.data.auxCodeId?this.idleCodes[e.data.auxCodeId]:void 0,A=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.status,C=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.subStatus)}const T=K.getOutdialRegex(f);this.update({agentName:t,agentProfileID:n,dn:I,status:A,subStatus:C,idleCode:k,idleCodes:d,wrapupCodes:h,outDialRegex:T,isOutboundEnabledForTenant:v,isOutboundEnabledForAgent:p,isAdhocDialingEnabled:g,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:b,isCampaignManagementEnabled:w,agentPersonalStatsEnabled:S})}}))}subscribeSelfDataEvents(){var e,t,n,i,r,o;if(this.checkService()){{const t=null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.eAgentReloginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",dn:n="",status:i="",subStatus:r="",auxCodeId:o=""}})=>{const s=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:s,dn:n,status:i,subStatus:r,idleCode:this.idleCodes[o]})});this.listeners.add(()=>null==t?void 0:t.stopListen())}{const e=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.eAgentStationLoginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",status:n="",subStatus:i="",auxCodeId:r=""}})=>{const o=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,status:n,subStatus:i,idleCode:this.idleCodes[r]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:n="",auxCodeId:i=""}})=>{var r;const o=this.idleCodes?null===(r=this.idleCodes[i])||void 0===r?void 0:r.name:"";this.update({agentSessionId:e,status:t,subStatus:n,idleCode:{id:i,name:o}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.eAgentChannelReloginSuccess.listen(e=>{this.emit("eAgentChannelReloginSuccess",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(o=this.SERVICE)||void 0===o?void 0:o.aqm.agent.eAgentChannelStateChanged.listen(e=>{this.emit("eAgentChannelStateChanged",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(e){var t,n,r;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check("available"===(null===(t=e.state)||void 0===t?void 0:t.toLowerCase())||"idle"===(null===(n=e.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.stateChange({data:e})}))}stateChangeV2(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeId),"stateChange","auxCodeId is null or empty"),i.AssertUtils.check(j.validateStateChannelType(e.channelType),"stateChange","channelType is null or empty or invalid"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.stateChangeV2({data:e});r.info("stateChangeV2 - Service is not available")}))}mockOutdialAniList(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.mockOutdialAniList)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.mockOutdialAniList())}))}fetchAddressBooks(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.fetchAddressBooks)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.fetchAddressBooks())}))}changeAgentState(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(t,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:e,data:t})}))}fetchAgentIdleCodes(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchAgentIdleCodes","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:e,agentId:t})}))}fetchOrganizationIdleCodes(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(t=this.SERVICE)||void 0===t?void 0:t.abs.fetchIdleCodes({orgId:e,accessType:"ALL"})}))}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){G()(this.emitter)}}const X=o(r,"[AgentInfo JSAPI] =>");var Q=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ee{waitUntil(e){return Q(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}constructor(e){this.initEventType={},this.emitter=W()(),this.logger=e.logger,this.agentxSERVICE=e.SERVICE}checkService(e){return Q(this,void 0,void 0,(function*(){e?(e.isInited||(this.logger.warn("SERVICE is not inited. Awaiting it's initAgentxServices(...)..."),yield this.waitUntil(()=>e.isInited)),this.logger.info("SERVICE is inited. Continuing..."),this.emit("inited")):this.logger.error("SERVICE is not defiend...")}))}emit(e,...t){this.emitter.emit(e,...t)}init(e){return Q(this,void 0,void 0,(function*(){this.agentxSERVICE?yield this.checkService(this.agentxSERVICE):this.logger.error("SERVICE is not defined..."),this.initEventType.widgetName=e.widgetName,this.initEventType.widgetProvider=e.widgetProvider,this.publishEvent("agentx-js-sdk-init")}))}registerCrmConnector(e){if(window.self!==window.top){this.initEventType.crmPlatform=e.crmPlatform,this.initEventType.crmConnectorProvider=e.crmConnectorProvider||"Cisco",r.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const t=document.referrer;r.info("This Desktop is loaded inside an iframe.",t),this.publishEvent("agentx-js-sdk-register-crm-connector")}else r.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:t,crmConnectorProvider:n,widgetName:i,widgetProvider:o}=this.initEventType,s=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",s),r.info(`Publishing js sdk init ${e} event : [widgetName: ${i}, widgetProvider: ${o}, crmPlatform: ${t}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(r.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},s)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return null!=window.navigator.languages?window.navigator.languages[0]:window.navigator.language}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}}const te=o(r,"[Config JSAPI] =>");var ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ie{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.dialer,aqmServiceEntityString:"SERVICE.aqm.dialer"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startOutdial(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateDialerTasks(e.data,"startOutdial"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.startOutdial(e)}))}previewCampaignAccept(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignAccept"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.acceptPreviewContact(e)}))}previewCampaignSkip(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignSkip"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.skipPreviewContact(e)}))}removePreviewContact(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"removePreviewContact"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.removePreviewContact(e)}))}updateCadVariables(e){var t,n,r,o,s;return ne(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"updateCadVariables","interactionId is not valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(n=null===(t=e.data)||void 0===t?void 0:t.attributes)||void 0===n?void 0:n.key),"updateCadVariables","attributes.key is not valid"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(o=null===(r=e.data)||void 0===r?void 0:r.attributes)||void 0===o?void 0:o.value),"updateCadVariables","attributes.value is not valid"),e.secureCad&&e.secureCad.forEach(e=>{i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e),"updateCadVariables","secureCad is not valid")}),e.keyId&&i.AssertUtils.check(j.validateUUID(e.keyId),"updateCadVariables","keyId is not valid UUID"),e.keyVersion&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.dialer.updateCadVariables(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const re=o(r,"[Dialer JSAPI] =>"),oe=o(re,"[AqmServiceEvents: Dialer] =>");class se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}createInstance(e){return i.I18N.createService(e)}createMixin(e){return i.I18N.createMixin(e)}get DEFAULT_INIT_OPTIONS(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.i18n.DEFAULT_INIT_OPTIONS}getMergedInitOptions(...e){return i.I18N.mergeServiceInitOptions(...e)}}const ae=o(r,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(e){const t=Object(i.createLogger)(e);return this.clientLoggers.set(e,t),this.logger.info(`Client logger created: "${e}"`),t}cleanupLogs(e){this.clientLoggers.has(e)&&i.Logger.POOL.cleanupPrefixedLogs(e)}browserDownloadLogsJson(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsJson(e)}browserDownloadLogsText(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsText(e)}getLogsCollection(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsCollection(e)}getLogsJsonUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsJsonUrl(e)}getLogsTextUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsTextUrl(e)}}const ue=o(r,"[Logger JSAPI] =>");class le{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.screenpop,aqmServiceEntityString:"SERVICE.aqm.screenpop"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const de=o(r,"[ScreenPop JSAPI] =>"),he=o(de,"[AqmServiceEvents: ScreenPop] =>");class fe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}listenKeyPress(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyPress(...e))}listenKeyConflict(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyConflict(...e))}listenConflictResolved(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenConflictResolved(...e))}register(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.register(...e))}unregisterKeys(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.unregisterKeys(...e))}getRegisteredKeys(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.getRegisteredKeys()}get DEFAULT_SHORTCUT_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.DEFAULT_SHORTCUT_KEYS}get MODIFIERS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.MODIFIERS}get REGISTERED_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.REGISTERED_KEYS}}const ve=o(r,"[ShortcutKey JSAPI] =>");var pe=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ge{waitUntil(e){return pe(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}checkService(){var e,t,n,i,r;return pe(this,void 0,void 0,(function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(n=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===n?void 0:n.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.error),yield this.waitUntil(()=>{var e,t;return!(null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.error)})),this.logger.info("Websocket connection established successfully. Continue to subscribe...")):this.logger.error("issue in loading rtdwc")}))}constructor(e){this.emitter=W()(),this.logger=e.logger}init(){return pe(this,void 0,void 0,(function*(){yield this.checkService(),this.logger.info("rtdwc initialized")}))}subscribe({datasetName:e,update:t,error:n}){var i,r;return pe(this,void 0,void 0,(function*(){return yield this.checkService(),yield null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.subscribe({datasetName:e,update:t,error:n})}))}}const me=o(r,"[RTDWC JSAPI] =>");var ye=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ee{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.supervisor,aqmServiceEntityString:"SERVICE.aqm.supervisor"}),this.logger.info("[JSAPI] Monitoring Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.startMonitoring(e)}))}endMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(e)}))}holdMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(e)}))}unHoldMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(e)}))}bargeIn(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.bargeIn(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const be=o(r,"[Call Monitoring JSAPI] =>"),we=o(be,"[AqmServiceEvents: Call Monitoring] =>");class Se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}trackBehavioralEvent(...e){var t;if(this.checkService())try{r.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(t=this.SERVICE)||void 0===t||t.webexMetrics.trackBehavioralEvent(...e)}catch(e){r.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const ke=o(r,"[webexMetrics Internal JSAPI] =>");var Ie=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ae{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(!this.checkService())return;const r=yield Me.actions.getTaskMap();if(0!==(null==r?void 0:r.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==e.data.logoutReason&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==e.data.logoutReason&&i.AssertUtils.check("user requested logout"===e.data.logoutReason.toLowerCase()||"inactivity Logout"===e.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent)||void 0===n?void 0:n.logout(e)}))}signoutAgent(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(this.checkService())try{return r.info("[App:TPW] event=signoutAgentBySupervisor for agent ",e.data.agentId),i.AssertUtils.check(j.validateUUID(e.orgId),"signoutAgent","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.agentId),"signoutAgent","agentId is not a valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.signoutAgent(e)}catch(t){r.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",e.data.agentId,t)}}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ce=o(r,"[Station Logout JSAPI] =>"),Te=o(Ce,"[AqmServiceEvents: Call Monitoring] =>");class Oe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,n;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(n=(t=this.logger).warn)||void 0===n||n.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ue=o(r,"[AI Assistant JSAPI] =>"),Re=o(Ue,"[AqmServiceEvents: AiAssistant] =>");var Le=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class xe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(e){var t,n;return Le(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.startTime),"fetchTasks","startTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.endTime),"fetchTasks","endTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.pageNumber),"fetchTasks","pageNumber is null or empty"),i.AssertUtils.check(j.validateNumber(e.startTime),"fetchTasks","startTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.endTime),"fetchTasks","endTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchTasks(e)}))}fetchCapture(e){var t,n;return Le(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchCapture(e)}))}}const De=o(r,"[PI JSAPI] =>");var Ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Pe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] AgentConfigJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchPaginatedAuxCodes(e){var t,n;return Ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===n?void 0:n.fetchPaginatedAuxCodes(e)}))}}const _e=o(r,"[AGENT CONFIG JSAPI] =>"),Me=(()=>{AGENTX_SERVICE?r.info('Found global "AGENTX_SERVICE"!'):r.error('Missed global "AGENTX_SERVICE"...');const e=(t=AGENTX_SERVICE,new ee({logger:te,SERVICE:t}));var t;const n=new ce({logger:ue}),i=new fe({logger:ve,serviceChecker:a({logger:ve})}),o=new O({logger:U,serviceChecker:a({logger:U})}),s=new K({logger:X,serviceChecker:a({logger:X})}),c=new B({logger:H,serviceChecker:a({logger:H}),aqmEvents:L({logger:z})}),u=new ie({logger:re,aqmEvents:L({logger:oe}),serviceChecker:a({logger:re})}),l=new Ee({logger:be,aqmEvents:L({logger:we}),serviceChecker:a({logger:be})}),d=new le({logger:de,aqmEvents:L({logger:he}),serviceChecker:a({logger:de})}),h=new Ae({logger:Ce,aqmEvents:L({logger:Te}),serviceChecker:a({logger:Ce})}),f=new Oe({logger:Ue,aqmEvents:L({logger:Re}),serviceChecker:a({logger:Ue})}),v=new se({logger:ae,serviceChecker:a({logger:ae})}),p=new ge({logger:me});p.init();const g=new xe({logger:De,serviceChecker:a({logger:De})}),m=new Pe({logger:_e,serviceChecker:a({logger:_e})}),y=new Se({logger:ke,serviceChecker:a({logger:ke})});return e.addEventListener("inited",()=>{c.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),l.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),i.init(AGENTX_SERVICE),o.init(AGENTX_SERVICE),v.init(AGENTX_SERVICE),m.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{c.cleanup(),s.cleanup(),u.cleanup(),l.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),g.cleanup(),i.cleanup(),v.cleanup(),o.cleanup(),m.cleanup(),y.cleanup()}),{config:e,logger:n,monitoring:l,shortcutKey:i,actions:o,agentContact:c,agentStateInfo:s,dialer:u,screenpop:d,aiAssistant:f,i18n:v,rtdwc:p,postInteractions:g,logout:h,agentConfigJsApi:m,webexMetricsInternal:y}})()},function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return f})),n.d(t,"v3",(function(){return w})),n.d(t,"v4",(function(){return S})),n.d(t,"v5",(function(){return A}));var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function o(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}for(var s=[],a=0;a<256;++a)s[a]=(a+256).toString(16).substr(1);var c,u,l=function(e,t){var n=t||0,i=s;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},d=0,h=0;var f=function(e,t,n){var i=t&&n||0,r=t||[],s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==s||null==a){var f=e.random||(e.rng||o)();null==s&&(s=c=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==a&&(a=u=16383&(f[6]<<8|f[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),p=void 0!==e.nsecs?e.nsecs:h+1,g=v-d+(p-h)/1e4;if(g<0&&void 0===e.clockseq&&(a=a+1&16383),(g<0||v>d)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=v,h=p,u=a;var m=(1e4*(268435455&(v+=122192928e5))+p)%4294967296;r[i++]=m>>>24&255,r[i++]=m>>>16&255,r[i++]=m>>>8&255,r[i++]=255&m;var y=v/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var E=0;E<6;++E)r[i+E]=s[E];return t||l(r)};var v=function(e,t,n){var i=function(e,i,r,o){var s=r&&o||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof i&&(i=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(i)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(i)||16!==i.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=n(i.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var c=0;c<16;++c)r[s+c]=a[c];return r||l(a)};try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i};function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t,n,i,r,o){return p((s=p(p(t,e),p(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function m(e,t,n,i,r,o,s){return g(t&n|~t&i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return g(t&i|n&~i,e,t,r,o,s)}function E(e,t,n,i,r,o,s){return g(t^n^i,e,t,r,o,s)}function b(e,t,n,i,r,o,s){return g(n^(t|~i),e,t,r,o,s)}var w=v("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,i,r=[],o=32*e.length;for(t=0;t<o;t+=8)n=e[t>>5]>>>t%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),r.push(i);return r}(function(e,t){var n,i,r,o,s;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)i=a,r=c,o=u,s=l,a=m(a,c,u,l,e[n],7,-680876936),l=m(l,a,c,u,e[n+1],12,-389564586),u=m(u,l,a,c,e[n+2],17,606105819),c=m(c,u,l,a,e[n+3],22,-1044525330),a=m(a,c,u,l,e[n+4],7,-176418897),l=m(l,a,c,u,e[n+5],12,1200080426),u=m(u,l,a,c,e[n+6],17,-1473231341),c=m(c,u,l,a,e[n+7],22,-45705983),a=m(a,c,u,l,e[n+8],7,1770035416),l=m(l,a,c,u,e[n+9],12,-1958414417),u=m(u,l,a,c,e[n+10],17,-42063),c=m(c,u,l,a,e[n+11],22,-1990404162),a=m(a,c,u,l,e[n+12],7,1804603682),l=m(l,a,c,u,e[n+13],12,-40341101),u=m(u,l,a,c,e[n+14],17,-1502002290),c=m(c,u,l,a,e[n+15],22,1236535329),a=y(a,c,u,l,e[n+1],5,-165796510),l=y(l,a,c,u,e[n+6],9,-1069501632),u=y(u,l,a,c,e[n+11],14,643717713),c=y(c,u,l,a,e[n],20,-373897302),a=y(a,c,u,l,e[n+5],5,-701558691),l=y(l,a,c,u,e[n+10],9,38016083),u=y(u,l,a,c,e[n+15],14,-660478335),c=y(c,u,l,a,e[n+4],20,-405537848),a=y(a,c,u,l,e[n+9],5,568446438),l=y(l,a,c,u,e[n+14],9,-1019803690),u=y(u,l,a,c,e[n+3],14,-187363961),c=y(c,u,l,a,e[n+8],20,1163531501),a=y(a,c,u,l,e[n+13],5,-1444681467),l=y(l,a,c,u,e[n+2],9,-51403784),u=y(u,l,a,c,e[n+7],14,1735328473),c=y(c,u,l,a,e[n+12],20,-1926607734),a=E(a,c,u,l,e[n+5],4,-378558),l=E(l,a,c,u,e[n+8],11,-2022574463),u=E(u,l,a,c,e[n+11],16,1839030562),c=E(c,u,l,a,e[n+14],23,-35309556),a=E(a,c,u,l,e[n+1],4,-1530992060),l=E(l,a,c,u,e[n+4],11,1272893353),u=E(u,l,a,c,e[n+7],16,-155497632),c=E(c,u,l,a,e[n+10],23,-1094730640),a=E(a,c,u,l,e[n+13],4,681279174),l=E(l,a,c,u,e[n],11,-358537222),u=E(u,l,a,c,e[n+3],16,-722521979),c=E(c,u,l,a,e[n+6],23,76029189),a=E(a,c,u,l,e[n+9],4,-640364487),l=E(l,a,c,u,e[n+12],11,-421815835),u=E(u,l,a,c,e[n+15],16,530742520),c=E(c,u,l,a,e[n+2],23,-995338651),a=b(a,c,u,l,e[n],6,-198630844),l=b(l,a,c,u,e[n+7],10,1126891415),u=b(u,l,a,c,e[n+14],15,-1416354905),c=b(c,u,l,a,e[n+5],21,-57434055),a=b(a,c,u,l,e[n+12],6,1700485571),l=b(l,a,c,u,e[n+3],10,-1894986606),u=b(u,l,a,c,e[n+10],15,-1051523),c=b(c,u,l,a,e[n+1],21,-2054922799),a=b(a,c,u,l,e[n+8],6,1873313359),l=b(l,a,c,u,e[n+15],10,-30611744),u=b(u,l,a,c,e[n+6],15,-1560198380),c=b(c,u,l,a,e[n+13],21,1309151649),a=b(a,c,u,l,e[n+4],6,-145523070),l=b(l,a,c,u,e[n+11],10,-1120210379),u=b(u,l,a,c,e[n+2],15,718787259),c=b(c,u,l,a,e[n+9],21,-343485551),a=p(a,i),c=p(c,r),u=p(u,o),l=p(l,s);return[a,c,u,l]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}));var S=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var s=0;s<16;++s)t[i+s]=r[s];return t||l(r)};function k(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function I(e,t){return e<<t|e>>>32-t}var A=v("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var r=0;r<i.length;r++)e[r]=i.charCodeAt(r)}e.push(128);var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(r=0;r<s;r++){a[r]=new Array(16);for(var c=0;c<16;c++)a[r][c]=e[64*r+4*c]<<24|e[64*r+4*c+1]<<16|e[64*r+4*c+2]<<8|e[64*r+4*c+3]}for(a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295,r=0;r<s;r++){for(var u=new Array(80),l=0;l<16;l++)u[l]=a[r][l];for(l=16;l<80;l++)u[l]=I(u[l-3]^u[l-8]^u[l-14]^u[l-16],1);var d=n[0],h=n[1],f=n[2],v=n[3],p=n[4];for(l=0;l<80;l++){var g=Math.floor(l/20),m=I(d,5)+k(g,h,f,v)+p+t[g]+u[l]>>>0;p=v,v=f,f=I(h,30)>>>0,h=d,d=m}n[0]=n[0]+d>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+p>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},function(e,t,n){"use strict";n.r(t);var i=n(3),r=n(13);function o(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){o(e,t,n[t])}))}return e}var a=n(4),c=n(5);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"==Object(i.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}var v={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},p=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,n)}return Object(c.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,s({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){Object(a.a)(this,e),this.observers={}}return Object(c.a)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){var r=[].concat(this.observers[e]);r.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function m(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function y(e){return null==e?"":""+e}function E(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function b(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(r())return{};var s=i(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return r()?{}:{obj:e,k:i(o.shift())}}function w(e,t,n){var i=b(e,t,Object);i.obj[i.k]=n}function S(e,t){var n=b(e,t),i=n.obj,r=n.k;if(i)return i[r]}function k(e,t,n){var i=S(e,n);return void 0!==i?i:S(t,n)}function I(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):I(e[i],t[i],n):e[i]=t[i]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var C={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return C[e]})):e}var O="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),Object(c.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split(".")),S(this.data,o)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(s=e.split("."))[1]),this.addNamespaces(t),w(this.data,s,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var c=S(this.data,a)||{};i?I(c,n,r):c=s({},c,n),w(this.data,a,c),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?s({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),R={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,i,r))})),t}},L={},x=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),E(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,u(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return f(t,e),Object(c.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:r};var s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(r=s.shift()),e=s.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==Object(i.a)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,c=this.extractFromKey(e[e.length-1],n),u=c.key,l=c.namespaces,d=l[l.length-1],h=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(f){var v=n.nsSeparator||this.options.nsSeparator;return d+v+u}return u}var p=this.resolve(e,n),g=p&&p.res,m=p&&p.usedKey||u,y=p&&p.exactUsedKey||u,E=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,k="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(S&&g&&k&&b.indexOf(E)<0&&("string"!=typeof w||"[object Array]"!==E)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var I="[object Array]"===E,A=I?[]:{},C=I?y:m;for(var T in g)if(Object.prototype.hasOwnProperty.call(g,T)){var O="".concat(C).concat(a).concat(T);A[T]=this.translate(O,s({},n,{joinArrays:!1,ns:l})),A[T]===O&&(A[T]=g[T])}g=A}}else if(S&&"string"==typeof w&&"[object Array]"===E)(g=g.join(w))&&(g=this.extendTranslation(g,e,n,r));else{var U=!1,R=!1,L=void 0!==n.count&&"string"!=typeof n.count,x=t.hasDefaultValue(n),D=L?this.pluralResolver.getSuffix(h,n.count):"",N=n["defaultValue".concat(D)]||n.defaultValue;!this.isValidLookup(g)&&x&&(U=!0,g=N),this.isValidLookup(g)||(R=!0,g=u);var P=x&&N!==g&&this.options.updateMissing;if(R||U||P){if(this.logger.log(P?"updateKey":"missingKey",h,d,u,P?N:g),a){var _=this.resolve(u,s({},n,{keySeparator:!1}));_&&_.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&V&&V[0])for(var j=0;j<V.length;j++)M.push(V[j]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var q=function(e,t,i){o.options.missingKeyHandler?o.options.missingKeyHandler(e,d,t,P?i:g,P,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,d,t,P?i:g,P,n),o.emit("missingKey",e,d,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?M.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){q([e],u+t,n["defaultValue".concat(t)]||N)}))})):q(M,u,N))}g=this.extendTranslation(g,e,n,p,r),R&&g===u&&this.options.appendNamespaceToMissingKey&&(g="".concat(d,":").concat(u)),R&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(e,t,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(s({},n,{interpolation:s({},this.options.interpolation,n.interpolation)}));var a,c=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=s({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),c){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r&&r[0]===i[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):o.translate.apply(o,i.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,f="string"==typeof h?[h]:h;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=R.handle(f,e,t,this.options&&this.options.postProcessPassResolved?s({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),u=c.key;n=u;var l=c.namespaces;s.options.fallbackNS&&(l=l.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);l.forEach((function(e){s.isValidLookup(t)||(o=e,!L["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(L["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){r=n;var o,c,l=u,f=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(f,u,n,e,a);else d&&(o=s.pluralResolver.getSuffix(n,a.count)),d&&h&&f.push(l+o),h&&f.push(l+="".concat(s.options.contextSeparator).concat(a.context)),d&&f.push(l+=o);for(;c=f.pop();)s.isValidLookup(t)||(i=c,t=s.getResource(n,e,c,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(g);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return Object(c.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(i))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),i.forEach((function(e){r.indexOf(e)<0&&o(n.formatLanguageCode(e))})),r}}]),e}(),P=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function M(){var e={};return P.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_[t.fc]}}))})),e}var V=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=n,this.logger=p.create("pluralResolver"),this.rules=M()}return Object(c.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),o=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var s=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=p.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(c.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,o,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(a.formatSeparator)<0){var r=k(t,c,e);return a.alwaysFormat?a.format(r,void 0,n):r}var o=e.split(a.formatSeparator),s=o.shift().trim(),u=o.join(a.formatSeparator).trim();return a.format(k(t,c,s),u,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?u(a.escape(e)):u(e)}}].forEach((function(t){for(s=0;r=t.regex.exec(e);){if(void 0===(o=l(r[1].trim())))if("function"==typeof d){var n=d(e,r,i);o="string"==typeof n?n:""}else{if(h){o=r[0];continue}a.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=y(o));if(e=e.replace(r[0],t.safeValue(o)),t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,i,r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=s({},o);function c(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,a)).replace(/'/g,'"');try{a=JSON.parse(r),t&&(a=s({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(r)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=d.shift(),u=d,l=!0}if((i=t(c.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=y(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),l&&(i=u.reduce((function(e,t){return r.format(e,t,o.lng,o)}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}();var q=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),r=l(this,d(t).call(this)),O&&g.call(u(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=o,r.logger=p.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,o.backend,o),r}return f(t,e),Object(c.a)(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,o=[],s=[],a=[],c=[];return e.forEach((function(e){var i=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?s.indexOf(a)<0&&s.push(a):(r.state[a]=1,i=!1,s.indexOf(a)<0&&s.push(a),o.indexOf(a)<0&&o.push(a),c.indexOf(t)<0&&c.push(t)))})),i||a.push(e)})),(o.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:o,pending:s,toLoadLanguages:a,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),n&&this.store.addResourceBundle(r,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var i,a,c,u,l,d;i=n.loaded,a=o,u=b(i,[r],Object),l=u.obj,d=u.k,l[d]=l[d]||[],c&&(l[d]=l[d].concat(a)),c||l[d].push(a),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(a,c){a&&c&&r<5?setTimeout((function(){i.read.call(i,e,t,n,r+1,2*o,s)}),o):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(function(i,s){i&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(r," failed"),i),!i&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(r),s),t.loaded(e,i,s)}))}},{key:"saveMissing",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,s({},o,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i))}}]),t}(g);function F(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(i.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(i.a)(e[2])||"object"===Object(i.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function B(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function H(){}var z=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=l(this,d(t).call(this)),O&&g.call(u(e)),e.options=B(n),e.services={},e.logger=p,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),l(e,u(e));setTimeout((function(){e.init(n,i)}),0)}return e}return f(t,e),Object(c.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=s({},F(),this.options,B(t)),this.format=this.options.interpolation.format,n||(n=H),!this.options.isClone){this.modules.logger?p.init(i(this.modules.logger),this.options):p.init(null,this.options);var r=new N(this.options);this.store=new U(this.options.resources,this.options);var o=this.services;o.logger=p,o.resourceStore=this.store,o.languageUtils=r,o.pluralResolver=new V(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new j(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new q(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new x(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=m(),d=function(){var t=function(t,i){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,i=n,r="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return i();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(r)s(r);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(e,t,n){var i=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=H),this.services.backendConnector.reload(e,t,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&R.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=m();this.emit("languageChanging",e);var r=function(e){var r="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,(function(e){!function(e,r){r?(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==Object(i.a)(r)){for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(c))}else o=s({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var s=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||2===i};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(i,e)||(!this.services.backendConnector.backend||!(!s(i,e)||r&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=m();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=m();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter((function(e){return i.indexOf(e)<0}));return r.length?(this.options.preload=i.concat(r),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,r=s({},this.options,n,{isClone:!0}),o=new t(r),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=s({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new x(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))})),o.init(r,i),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),t}(g));t.default=z}])}));
|
|
10
|
+
t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,l=c>>1,u=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=l}return(f?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,l=8*o-r-1,u=(1<<l)-1,d=u>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,v=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=v,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;e[n+f]=255&s,f+=v,s/=256,l-=8);e[n+f-v]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var i=n(12),r=n(21),o=n(25),s=n(33),a=n(34);(e.exports=function(e,t){var n,r,c,l,u;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],i(e)?(n=a.call(e,"c"),r=a.call(e,"e"),c=a.call(e,"w")):(n=c=!0,r=!1),u={value:t,configurable:n,enumerable:r,writable:c},l?o(s(l),u):u}).gs=function(e,t,n){var c,l,u,d;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],i(t)?r(t)?i(n)?r(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,i(e)?(c=a.call(e,"c"),l=a.call(e,"e")):(c=!0,l=!1),d={get:t,set:n,configurable:c,enumerable:l},u?o(s(u),d):d}},function(e,t,n){"use strict";var i=n(22),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!i(e)&&!r.test(o.call(e))}},function(e,t,n){"use strict";var i=n(23);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!i(e)}},function(e,t,n){"use strict";var i=n(24);e.exports=function(e){if(!i(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(12),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(r,typeof e)}},function(e,t,n){"use strict";e.exports=n(26)()?Object.assign:n(27)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var i=n(28),r=n(32),o=Math.max;e.exports=function(e,t){var n,s,a,c=o(arguments.length,2);for(e=Object(r(e)),a=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},s=1;s<c;++s)i(t=arguments[s]).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(29)()?Object.keys:n(30)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(7),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(7);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var i=n(7),r=Array.prototype.forEach,o=Object.create,s=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return r.call(arguments,(function(e){i(e)&&s(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(35)()?String.prototype.contains:n(36)},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";var i=String.prototype.indexOf;e.exports=function(e){return i.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var i=n(39);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(7),r={function:!0,object:!0};e.exports=function(e){return i(e)&&r[typeof e]||!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"changeLanguage",(function(){return ee})),n.d(t,"createInstance",(function(){return Z})),n.d(t,"default",(function(){return $})),n.d(t,"dir",(function(){return Y})),n.d(t,"exists",(function(){return ie})),n.d(t,"getFixedT",(function(){return te})),n.d(t,"hasLoadedNamespace",(function(){return oe})),n.d(t,"init",(function(){return G})),n.d(t,"loadLanguages",(function(){return ae})),n.d(t,"loadNamespaces",(function(){return se})),n.d(t,"loadResources",(function(){return K})),n.d(t,"reloadResources",(function(){return X})),n.d(t,"setDefaultNamespace",(function(){return re})),n.d(t,"t",(function(){return ne})),n.d(t,"use",(function(){return Q}));const i=e=>"string"==typeof e,r=()=>{let e,t;const n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n},o=e=>null==e?"":""+e,s=/###/g,a=e=>e&&e.indexOf("###")>-1?e.replace(s,"."):e,c=e=>!e||i(e),l=(e,t,n)=>{const r=i(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(c(e))return{};const t=a(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return c(e)?{}:{obj:e,k:a(r[o])}},u=(e,t,n)=>{const{obj:i,k:r}=l(e,t,Object);if(void 0!==i||1===t.length)return void(i[r]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=l(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=l(e,s,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},d=(e,t)=>{const{obj:n,k:i}=l(e,t);if(n)return n[i]},h=(e,t,n)=>{const i=d(e,n);return void 0!==i?i:d(t,n)},f=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?i(e[r])||e[r]instanceof String||i(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):f(e[r],t[r],n):e[r]=t[r]);return e},v=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const p=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e;const m=[" ",",","?","!",";"],y=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const i=t.split(n);let r=e;for(let e=0;e<i.length;){if(!r||"object"!=typeof r)return;let t,o="";for(let s=e;s<i.length;++s)if(s!==e&&(o+=n),o+=i[s],t=r[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<i.length-1)continue;e+=s-e+1;break}r=t}return r},S=e=>e&&e.replace("_","-"),w={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||w,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(i(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new b(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new b(this.logger,e)}}var k=new b;class I{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,i]=e;for(let e=0;e<i;e++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[i,r]=t;for(let t=0;t<r;t++)i.apply(i,[e,...n])})}}}class A extends I{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):i(n)&&o?a.push(...n.split(o)):a.push(n)));const c=d(this.data,a);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!c&&s&&i(n)?E(this.data&&this.data[e]&&this.data[e][t],n,o):c}addResource(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=t,t=s[1]),this.addNamespaces(t),u(this.data,s,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(i(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=t,t=s[1]),this.addNamespaces(t);let a=d(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?f(a,n,r):a={...a,...n},u(this.data,s,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var C={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,i,r))}),t}};const O={};class T extends I{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const i=m.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===i.length)return!0;const r=y.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!r.test(e);if(!o){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(s&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(o)?[o]:o};const s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return{key:e,namespaces:i(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],t),c=a[a.length-1],l=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${c}${e}${s}`,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(t)}:`${c}${e}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(t)}:s}const d=this.resolve(e,t);let h=d&&d.res;const f=d&&d.usedKey||s,v=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(h),p=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!i(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(!(m&&h&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||i(p)&&Array.isArray(h))if(m&&i(p)&&Array.isArray(h))h=h.join(p),h&&(h=this.extendTranslation(h,e,t,n));else{let r=!1,a=!1;const u=void 0!==t.count&&!i(t.count),f=T.hasDefaultValue(t),v=u?this.pluralResolver.getSuffix(l,t.count,t):"",g=t.ordinal&&u?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",p=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=p&&t[`defaultValue${this.options.pluralSeparator}zero`]||t["defaultValue"+v]||t["defaultValue"+g]||t.defaultValue;!this.isValidLookup(h)&&f&&(r=!0,h=m),this.isValidLookup(h)||(a=!0,h=s);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,E=f&&m!==h&&this.options.updateMissing;if(a||r||E){if(this.logger.log(E?"updateKey":"missingKey",l,c,s,E?m:h),o){const e=this.resolve(s,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const i=(e,n,i)=>{const r=f&&i!==h?i:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,n,r,E,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,c,n,r,E,t),this.emit("missingKey",e,c,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);p&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(this.options.pluralSeparator+"zero")<0&&n.push(this.options.pluralSeparator+"zero"),n.forEach(n=>{i([e],s+n,t["defaultValue"+n]||m)})}):i(e,s,m))}h=this.extendTranslation(h,e,t,d,n),a&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${s}`),(a||r)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,r?h:void 0):this.options.parseMissingKeyHandler(h))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,h,{...t,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=e,d.usedParams=this.getUsedParamsDetails(t),d):e}if(o){const e=Array.isArray(h),n=e?[]:{},i=e?v:f;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const r=`${i}${o}${e}`;n[e]=this.translate(r,{...t,joinArrays:!1,ns:a}),n[e]===r&&(n[e]=h[e])}h=n}}return r?(d.res=h,d.usedParams=this.getUsedParamsDetails(t),d):h}extendTranslation(e,t,n,r,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=i(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(a){const t=e.match(this.interpolator.nestingRegexp);c=t&&t.length}let l=n.replace&&!i(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);c<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return o&&o[0]===i[0]&&!n.context?(s.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${t[0]}`),null):s.translate(...i,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,c=i(a)?[a]:a;return null!=e&&c&&c.length&&!1!==n.applyPostProcessor&&(e=C.handle(c,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const c=this.extractFromKey(e,a),l=c.key;n=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=void 0!==a.count&&!i(a.count),h=d&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(i(a.context)||"number"==typeof a.context)&&""!==a.context,v=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(s=e,!O[`${v[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(O[`${v[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,a);else{let e;d&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=this.options.pluralSeparator+"zero",r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(i.push(l+e),a.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),h&&i.push(l+t)),f){const n=`${l}${this.options.contextSeparator}${a.context}`;i.push(n),d&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),h&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!i(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}const U=e=>e.charAt(0).toUpperCase()+e.slice(1);class R{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=U(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=U(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=U(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),i(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: "+e))};return i(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):i(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],x={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const N=["v1","v2","v3"],D=["v4"],P={zero:0,one:1,two:2,few:3,many:4,other:5};class M{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.options.compatibilityJSON&&!D.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return L.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:x[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=S("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch(n){if(!e.match(/-|_/))return;const i=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(i,t)}return this.pluralRulesCache[r]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>P[e]-P[t]).map(e=>`${this.options.prepend}${t.ordinal?"ordinal"+this.options.prepend:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?"ordinal"+this.options.prepend:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn("no plural rule found for: "+e),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_"+i.toString():r():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!N.includes(this.options.compatibilityJSON)}}const V=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=h(e,t,n);return!s&&o&&i(n)&&(s=E(e,n,r),void 0===s&&(s=E(t,n,r))),s},_=e=>e.replace(/\$/g,"$$$$");class j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:E}=e.interpolation;this.escape=void 0!==t?t:p,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==i&&i,this.prefix=r?v(r):o||"{{",this.suffix=s?v(s):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?v(d):h||v("$t("),this.nestingSuffix=f?v(f):g||v(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==E&&E,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let s,a,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=V(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),s=i.join(this.formatSeparator).trim();return this.format(V(t,l,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>_(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?_(this.escape(e)):_(e)}].forEach(t=>{for(c=0;s=t.regex.exec(e);){const n=s[1].trim();if(a=u(n),void 0===a)if("function"==typeof d){const t=d(e,s,r);a=i(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(h){a=s[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else i(a)||this.useRawValueToEscape||(a=o(a));const l=t.safeValue(a);if(e=e.replace(s[0],l),h?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t){let n,r,s,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const c=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const i=e.split(new RegExp(n+"[ ]*{"));let r="{"+i[1];e=i[0],r=this.interpolate(r,s);const o=r.match(/'/g),a=r.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{s=JSON.parse(r),t&&(s={...t,...s})}catch(t){return this.logger.warn("failed parsing options string in nesting for key "+e,t),`${e}${n}${r}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let l=[];s={...a},s=s.replace&&!i(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),l=e,u=!0}if(r=t(c.call(this,n[1].trim(),s),s),r&&n[0]===e&&!i(r))return r;i(r)||(r=o(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const q=e=>{const t={};return(n,i,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(S(i),r),t[s]=a),a(n)}};class F{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create("formatter"),this.options=e,this.formats={number:q((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:q((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:q((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:q((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:q((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=q(t)}format(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);if("currency"===t&&r.indexOf(":")<0)n.currency||(n.currency=r.trim());else if("relativetime"===t&&r.indexOf(":")<0)n.range||(n.range=r.trim());else{r.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=r),"false"===r&&(n[o]=!1),"true"===r&&(n[o]=!0),isNaN(r)||(n[o]=parseInt(r,10))}})}}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const s=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},a=s.locale||s.lng||i.locale||i.lng||n;t=this.formats[r](e,a,{...o,...i,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn("there was no format function for "+r),e},e)}}class B extends I{constructor(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=k.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},s={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(s[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n,i)=>{const{obj:r,k:o}=l(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[r],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,i+1,2*r,o)},r):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const a={...o,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let r;r=5===c.length?c(e,t,n,i,a):c(e,t,n,i),r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else c(e,t,n,i,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}}const z=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),i(e[1])&&(t.defaultValue=e[1]),i(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),H=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),W=()=>{};class J extends I{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=H(e),this.services={},this.logger=k,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(i(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const o=z();this.options={...o,...this.options,...H(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?k.init(s(this.modules.logger),this.options):k.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=F);const n=new R(this.options);this.store=new A(this.options.resources,this.options);const i=this.services;i.logger=k,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new M(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(i.formatter=s(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new j(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new B(s(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)})),this.modules.languageDetector&&(i.languageDetector=s(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=s(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new T(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)})),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=W),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const a=r(),c=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;const n=i(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],i=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)i(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>i(e))}this.options.preload&&this.options.preload.forEach(e=>i(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const i=r();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=W),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const o=r();this.emit("languageChanging",e);const s=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,i)=>{i?(s(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,o.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},c=t=>{e||t||!this.services.languageDetector||(t=[]);const n=i(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(e):c(this.services.languageDetector.detect()),o}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var s=arguments.length,a=new Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${l}${e}`):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(u,i)};return i(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){const n=r();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=r();i(e)&&(e=[e]);const o=this.options.preload||[],s=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=o.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new R(z());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new J(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new J(i);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));return["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new A(this.store.data,i),r.services.resourceStore=r.store),r.translator=new T(r.services,i),r.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit(e,...n)})),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $=J.createInstance();$.createInstance=J.createInstance;const Z=$.createInstance,Y=$.dir,G=$.init,K=$.loadResources,X=$.reloadResources,Q=$.use,ee=$.changeLanguage,te=$.getFixedT,ne=$.t,ie=$.exists,re=$.setDefaultNamespace,oe=$.hasLoadedNamespace,se=$.loadNamespaces,ae=$.loadLanguages},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b}));var{slice:i,forEach:r}=[];var o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,s={create(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},i=n,r=encodeURIComponent(t),s="".concat(e,"=").concat(r);if(i.maxAge>0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!o.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!o.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var c="string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i.partitioned&&(s+="; Partitioned"),s}(e,t,r)},read(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,"",-1,t)}},a={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return s.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:o}=t;n&&"undefined"!=typeof document&&s.create(n,e,i,r,o)}},c={name:"querystring",lookup(e){var t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){var i,{search:r}=window.location;!window.location.search&&(null===(i=window.location.hash)||void 0===i?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1).split("&"),s=0;s<o.length;s++){var a=o[s].indexOf("=");if(a>0)o[s].substring(0,a)===n&&(t=o[s].substring(a+1))}}return t}},l={name:"hash",lookup(e){var t,{lookupHash:n,lookupFromHashIndex:i}=e;if("undefined"!=typeof window){var{hash:r}=window.location;if(r&&r.length>2){var o=r.substring(1);if(n)for(var s=o.split("&"),a=0;a<s.length;a++){var c=s[a].indexOf("=");if(c>0)s[a].substring(0,c)===n&&(t=s[a].substring(c+1))}if(t)return t;if(!t&&i>-1){var l,u=r.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(u))return;return null===(l=u["number"==typeof i?i:0])||void 0===l?void 0:l.replace("/","")}}}return t}},u=null,d=()=>{if(null!==u)return u;try{if(!(u="undefined"!=typeof window&&null!==window.localStorage))return!1;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){u=!1}return u},h={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&d())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:n}=t;n&&d()&&window.localStorage.setItem(n,e)}},f=null,v=()=>{if(null!==f)return f;try{if(!(f="undefined"!=typeof window&&null!==window.sessionStorage))return!1;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){f=!1}return f},g={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&v())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:n}=t;n&&v()&&window.sessionStorage.setItem(n,e)}},p={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:n,userLanguage:i,language:r}=navigator;if(n)for(var o=0;o<n.length;o++)t.push(n[o]);i&&t.push(i),r&&t.push(r)}return t.length>0?t:void 0}},m={name:"htmlTag",lookup(e){var t,{htmlTag:n}=e,i=n||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},y={name:"path",lookup(e){var t,{lookupFromPathIndex:n}=e;if("undefined"!=typeof window){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(i))return null===(t=i["number"==typeof n?n:0])||void 0===t?void 0:t.replace("/","")}}},E={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:n}=e,i="number"==typeof n?n+1:1,r="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[i]}},S=!1;try{document.cookie,S=!0}catch(e){}var w=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];S||w.splice(1,1);class b{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return r.call(i.call(arguments,1),t=>{if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:w,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(a),this.addDetector(c),this.addDetector(h),this.addDetector(g),this.addDetector(p),this.addDetector(m),this.addDetector(y),this.addDetector(E),this.addDetector(l)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}b.type="languageDetector"},function(e,t,n){"use strict";n.r(t);var i=n(6),r=n(13);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d(i.key),i)}}function u(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var h,f,v,g=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return u({},t,n||"")},parseLoadPayload:function(e,t){},request:r.a,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},p=(h=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)},(f=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=a(a(a({},g()),this.options||{}),n),this.allOptions=i,this.services&&this.options.reloadInterval){var r=setInterval((function(){return t.reload()}),this.options.reloadInterval);"object"===o(r)&&"function"==typeof r.unref&&r.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=Object(i.b)(a)).then((function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,i){var r=this,o="string"==typeof n?[n]:n,s="string"==typeof i?[i]:i,a=this.options.parseLoadPayload(o,s);this.options.request(this.options,e,a,(function(o,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message){var a=o.message.toLowerCase();if(["failed","fetch","network","load"].find((function(e){return a.indexOf(e)>-1})))return t("failed loading "+e+": "+o.message,!0)}if(o)return t(o,!1);var c,l;try{c="string"==typeof s.data?r.options.parse(s.data,n,i):s.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,c)}))}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,i),a=0,c=[],l=[];e.forEach((function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var u=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,u,s,(function(t,n){a+=1,c.push(t),l.push(n),a===e.length&&"function"==typeof r&&r(c,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){i.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};a(o),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),s.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)}))}))}))}}}])&&l(h.prototype,f),v&&l(h,v),Object.defineProperty(h,"prototype",{writable:!1}),h);p.type="backend",t.default=p},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?o:String(o)),i)}var r,o}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}function u(e,t,n){return(u=l()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&c(r,n.prototype),r}).apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,a(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c(i,e)})(e)}function h(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(d(Error)),p=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return s(t,e),t}(g),m=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return s(t,e),t}(g),y=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return s(t,e),t}(g),E=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(g),S=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return s(t,e),t}(g),w=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(g),b=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return s(t,e),t}(g),k="numeric",I="short",A="long",C={year:k,month:k,day:k},O={year:k,month:I,day:k},T={year:k,month:I,day:k,weekday:I},U={year:k,month:A,day:k},R={year:k,month:A,day:k,weekday:A},L={hour:k,minute:k},x={hour:k,minute:k,second:k},N={hour:k,minute:k,second:k,timeZoneName:I},D={hour:k,minute:k,second:k,timeZoneName:A},P={hour:k,minute:k,hourCycle:"h23"},M={hour:k,minute:k,second:k,hourCycle:"h23"},V={hour:k,minute:k,second:k,hourCycle:"h23",timeZoneName:I},_={hour:k,minute:k,second:k,hourCycle:"h23",timeZoneName:A},j={year:k,month:k,day:k,hour:k,minute:k},q={year:k,month:k,day:k,hour:k,minute:k,second:k},F={year:k,month:I,day:k,hour:k,minute:k},B={year:k,month:I,day:k,hour:k,minute:k,second:k},z={year:k,month:I,day:k,weekday:I,hour:k,minute:k},H={year:k,month:A,day:k,hour:k,minute:k,timeZoneName:I},W={year:k,month:A,day:k,hour:k,minute:k,second:k,timeZoneName:I},J={year:k,month:A,day:k,weekday:A,hour:k,minute:k,timeZoneName:A},$={year:k,month:A,day:k,weekday:A,hour:k,minute:k,second:k,timeZoneName:A},Z=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new b},t.formatOffset=function(e,t){throw new b},t.offset=function(e){throw new b},t.equals=function(e){throw new b},r(e,[{key:"type",get:function(){throw new b}},{key:"name",get:function(){throw new b}},{key:"ianaName",get:function(){return this.name}},{key:"isUniversal",get:function(){throw new b}},{key:"isValid",get:function(){throw new b}}]),e}(),Y=null,G=function(e){function t(){return e.apply(this,arguments)||this}s(t,e);var n=t.prototype;return n.offsetName=function(e,t){return dt(e,t.format,t.locale)},n.formatOffset=function(e,t){return gt(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"system"===e.type},r(t,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Y&&(Y=new t),Y}}]),t}(Z),K={};var X={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};var Q={},ee=function(e){function t(n){var i;return(i=e.call(this)||this).zoneName=n,i.valid=t.isValidZone(n),i}s(t,e),t.create=function(e){return Q[e]||(Q[e]=new t(e)),Q[e]},t.resetCache=function(){Q={},K={}},t.isValidSpecifier=function(e){return this.isValidZone(e)},t.isValidZone=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}};var n=t.prototype;return n.offsetName=function(e,t){return dt(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return gt(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,i=(n=this.name,K[n]||(K[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),K[n]),r=i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.type,a=o.value,c=X[s];"era"===s?i[c]=a:He(c)||(i[c]=parseInt(a,10))}return i}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),r=i[1],o=i[2];return[i[3],r,o,i[4],i[5],i[6],i[7]]}(i,t),o=r[0],s=r[1],a=r[2],c=r[3],l=r[4],u=r[5],d=r[6];"BC"===c&&(o=1-Math.abs(o));var h=+t,f=h%1e3;return(at({year:o,month:s,day:a,hour:24===l?0:l,minute:u,second:d,millisecond:0})-(h-=f>=0?f:1e3+f))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Z),te=["base"],ne=["padTo","floor"],ie={};var re={};function oe(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=re[n];return i||(i=new Intl.DateTimeFormat(e,t),re[n]=i),i}var se={};var ae={};var ce=null;var le={};function ue(e,t,n,i){var r=e.listingMode();return"error"===r?null:"en"===r?n(t):i(t)}var de=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,n.padTo,n.floor;var i=h(n,ne);if(!t||Object.keys(i).length>0){var r=o({useGrouping:!1},n);n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=se[n];return i||(i=new Intl.NumberFormat(e,t),se[n]=i),i}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Qe(this.floor?Math.floor(e):it(e,3),this.padTo)},e}(),he=function(){function e(e,t,n){this.opts=n,this.originalZone=void 0;var i=void 0;if(this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){var r=e.offset/60*-1,s=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r;0!==e.offset&&ee.create(s).valid?(i=s,this.dt=e):(i="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);var a=o({},this.opts);a.timeZone=a.timeZone||i,this.dtf=oe(t,a)}var t=e.prototype;return t.format=function(){return this.originalZone?this.formatToParts().map((function(e){return e.value})).join(""):this.dtf.format(this.dt.toJSDate())},t.formatToParts=function(){var e=this,t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((function(t){return"timeZoneName"===t.type?o({},t,{value:e.originalZone.offsetName(e.dt.ts,{locale:e.dt.locale,format:e.opts.timeZoneName})}):t})):t},t.resolvedOptions=function(){return this.dtf.resolvedOptions()},e}(),fe=function(){function e(e,t,n){this.opts=o({style:"long"},n),!t&&$e()&&(this.rtf=function(e,t){void 0===t&&(t={});var n=t;n.base;var i=h(n,te),r=JSON.stringify([e,i]),o=ae[r];return o||(o=new Intl.RelativeTimeFormat(e,t),ae[r]=o),o}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,i){void 0===n&&(n="always");void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+r[e][0];case-1:return s?"yesterday":"last "+r[e][0];case 0:return s?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,c=Math.abs(t),l=1===c,u=r[e],d=i?l?u[1]:u[2]||u[1]:l?r[e][0]:e;return a?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ve={firstDay:1,minimalDays:4,weekend:[6,7]},ge=function(){function e(e,t,n,i,r){var o=function(e){var t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));var n,i,r=e.indexOf("-u-");if(-1===r)return[e];try{n=oe(e).resolvedOptions(),i=e}catch(t){var o=e.substring(0,r);n=oe(o).resolvedOptions(),i=o}var s=n;return[i,s.numberingSystem,s.calendar]}(e),s=o[0],a=o[1],c=o[2];this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||c||null,this.weekSettings=i,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)},e.create=function(t,n,i,r,o){void 0===o&&(o=!1);var s=t||Te.defaultLocale;return new e(s||(o?"en-US":ce||(ce=(new Intl.DateTimeFormat).resolvedOptions().locale)),n||Te.defaultNumberingSystem,i||Te.defaultOutputCalendar,Ke(r)||Te.defaultWeekSettings,s)},e.resetCache=function(){ce=null,re={},se={},ae={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,o=n.outputCalendar,s=n.weekSettings;return e.create(i,r,o,s)};var t=e.prototype;return t.listingMode=function(){var e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ke(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(o({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(o({},e,{defaultToEN:!1}))},t.months=function(e,t){var n=this;return void 0===t&&(t=!1),ue(this,e,St,(function(){var i=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return n.monthsCache[r][e]||(n.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var i=bi.utc(2009,n,1);t.push(e(i))}return t}((function(e){return n.extract(e,i,"month")}))),n.monthsCache[r][e]}))},t.weekdays=function(e,t){var n=this;return void 0===t&&(t=!1),ue(this,e,It,(function(){var i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return n.weekdaysCache[r][e]||(n.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var i=bi.utc(2016,11,13+n);t.push(e(i))}return t}((function(e){return n.extract(e,i,"weekday")}))),n.weekdaysCache[r][e]}))},t.meridiems=function(){var e=this;return ue(this,void 0,(function(){return At}),(function(){if(!e.meridiemCache){var t={hour:"numeric",hourCycle:"h12"};e.meridiemCache=[bi.utc(2016,11,13,9),bi.utc(2016,11,13,19)].map((function(n){return e.extract(n,t,"dayperiod")}))}return e.meridiemCache}))},t.eras=function(e){var t=this;return ue(this,e,Ut,(function(){var n={era:e};return t.eraCache[e]||(t.eraCache[e]=[bi.utc(-40,1,1),bi.utc(2017,1,1)].map((function(e){return t.extract(e,n,"era")}))),t.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return i?i.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new de(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new he(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new fe(this.intl,this.isEnglish(),e)},t.listFormatter=function(e){return void 0===e&&(e={}),function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=ie[n];return i||(i=new Intl.ListFormat(e,t),ie[n]=i),i}(this.intl,e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.getWeekSettings=function(){return this.weekSettings?this.weekSettings:Ze()?function(e){var t=le[e];if(!t){var n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,le[e]=t}return t}(this.locale):ve},t.getStartOfWeek=function(){return this.getWeekSettings().firstDay},t.getMinDaysInFirstWeek=function(){return this.getWeekSettings().minimalDays},t.getWeekendDays=function(){return this.getWeekSettings().weekend},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}(),pe=null,me=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}s(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(ht(n[1],n[2]))}return null};var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return gt(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+gt(this.fixed,"narrow")}},{key:"ianaName",get:function(){return 0===this.fixed?"Etc/UTC":"Etc/GMT"+gt(-this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===pe&&(pe=new t(0)),pe}}]),t}(Z),ye=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}s(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Z);function Ee(e,t){if(He(e)||null===e)return t;if(e instanceof Z)return e;if("string"==typeof e){var n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?G.instance:"utc"===n||"gmt"===n?me.utcInstance:me.parseSpecifier(n)||ee.create(e)}return We(e)?me.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ye(e)}var Se,we=function(){return Date.now()},be="system",ke=null,Ie=null,Ae=null,Ce=60,Oe=null,Te=function(){function e(){}return e.resetCaches=function(){ge.resetCache(),ee.resetCache()},r(e,null,[{key:"now",get:function(){return we},set:function(e){we=e}},{key:"defaultZone",get:function(){return Ee(be,G.instance)},set:function(e){be=e}},{key:"defaultLocale",get:function(){return ke},set:function(e){ke=e}},{key:"defaultNumberingSystem",get:function(){return Ie},set:function(e){Ie=e}},{key:"defaultOutputCalendar",get:function(){return Ae},set:function(e){Ae=e}},{key:"defaultWeekSettings",get:function(){return Oe},set:function(e){Oe=Ke(e)}},{key:"twoDigitCutoffYear",get:function(){return Ce},set:function(e){Ce=e%100}},{key:"throwOnInvalid",get:function(){return Se},set:function(e){Se=e}}]),e}(),Ue=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Re=[0,31,59,90,120,151,181,212,243,273,304,334],Le=[0,31,60,91,121,152,182,213,244,274,305,335];function xe(e,t){return new Ue("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Ne(e,t,n){var i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);var r=i.getUTCDay();return 0===r?7:r}function De(e,t,n){return n+(rt(e)?Le:Re)[t-1]}function Pe(e,t){var n=rt(e)?Le:Re,i=n.findIndex((function(e){return e<t}));return{month:i+1,day:t-n[i]}}function Me(e,t){return(e-t+7)%7+1}function Ve(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var i,r=e.year,s=e.month,a=e.day,c=De(r,s,a),l=Me(Ne(r,s,a),n),u=Math.floor((c-l+14-t)/7);return u<1?u=lt(i=r-1,t,n):u>lt(r,t,n)?(i=r+1,u=1):i=r,o({weekYear:i,weekNumber:u,weekday:l},pt(e))}function _e(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var i,r=e.weekYear,s=e.weekNumber,a=e.weekday,c=Me(Ne(r,1,t),n),l=ot(r),u=7*s+a-c-7+t;u<1?u+=ot(i=r-1):u>l?(i=r+1,u-=ot(r)):i=r;var d=Pe(i,u);return o({year:i,month:d.month,day:d.day},pt(e))}function je(e){var t=e.year;return o({year:t,ordinal:De(t,e.month,e.day)},pt(e))}function qe(e){var t=e.year,n=Pe(t,e.ordinal);return o({year:t,month:n.month,day:n.day},pt(e))}function Fe(e,t){if(!He(e.localWeekday)||!He(e.localWeekNumber)||!He(e.localWeekYear)){if(!He(e.weekday)||!He(e.weekNumber)||!He(e.weekYear))throw new E("Cannot mix locale-based week fields with ISO-based week fields");return He(e.localWeekday)||(e.weekday=e.localWeekday),He(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),He(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Be(e){var t=Je(e.year),n=Xe(e.month,1,12),i=Xe(e.day,1,st(e.year,e.month));return t?n?!i&&xe("day",e.day):xe("month",e.month):xe("year",e.year)}function ze(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,o=Xe(t,0,23)||24===t&&0===n&&0===i&&0===r,s=Xe(n,0,59),a=Xe(i,0,59),c=Xe(r,0,999);return o?s?a?!c&&xe("millisecond",r):xe("second",i):xe("minute",n):xe("hour",t)}function He(e){return void 0===e}function We(e){return"number"==typeof e}function Je(e){return"number"==typeof e&&e%1==0}function $e(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ye(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function Ge(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ke(e){if(null==e)return null;if("object"!=typeof e)throw new w("Week settings must be an object");if(!Xe(e.firstDay,1,7)||!Xe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((function(e){return!Xe(e,1,7)})))throw new w("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Xe(e,t,n){return Je(e)&&e>=t&&e<=n}function Qe(e,t){return void 0===t&&(t=2),e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0")}function et(e){return He(e)||null===e||""===e?void 0:parseInt(e,10)}function tt(e){return He(e)||null===e||""===e?void 0:parseFloat(e)}function nt(e){if(!He(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function it(e,t,n){void 0===n&&(n=!1);var i=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*i)/i}function rt(e){return e%4==0&&(e%100!=0||e%400==0)}function ot(e){return rt(e)?366:365}function st(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?rt(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function at(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(e.year,e.month-1,e.day),+t}function ct(e,t,n){return-Me(Ne(e,1,t),n)+t-1}function lt(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var i=ct(e,t,n),r=ct(e+1,t,n);return(ot(e)-i+r)/7}function ut(e){return e>99?e:e>Te.twoDigitCutoffYear?1900+e:2e3+e}function dt(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);var a=o({timeZoneName:t},s),c=new Intl.DateTimeFormat(n,a).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}function ht(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function ft(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new w("Invalid unit value "+e);return t}function vt(e,t){var n={};for(var i in e)if(Ge(e,i)){var r=e[i];if(null==r)continue;n[t(i)]=ft(r)}return n}function gt(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+Qe(n,2)+":"+Qe(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+Qe(n,2)+Qe(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function pt(e){return function(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}(e,["hour","minute","second","millisecond"])}var mt=["January","February","March","April","May","June","July","August","September","October","November","December"],yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Et=["J","F","M","A","M","J","J","A","S","O","N","D"];function St(e){switch(e){case"narrow":return[].concat(Et);case"short":return[].concat(yt);case"long":return[].concat(mt);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var wt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],bt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],kt=["M","T","W","T","F","S","S"];function It(e){switch(e){case"narrow":return[].concat(kt);case"short":return[].concat(bt);case"long":return[].concat(wt);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var At=["AM","PM"],Ct=["Before Christ","Anno Domini"],Ot=["BC","AD"],Tt=["B","A"];function Ut(e){switch(e){case"narrow":return[].concat(Tt);case"short":return[].concat(Ot);case"long":return[].concat(Ct);default:return null}}function Rt(e,t){for(var n,i="",r=v(e);!(n=r()).done;){var o=n.value;o.literal?i+=o.val:i+=t(o.val)}return i}var Lt={D:C,DD:O,DDD:U,DDDD:R,t:L,tt:x,ttt:N,tttt:D,T:P,TT:M,TTT:V,TTTT:_,f:j,ff:F,fff:H,ffff:J,F:q,FF:B,FFF:W,FFFF:$},xt=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],o=0;o<e.length;o++){var s=e.charAt(o);"'"===s?(n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),r},e.macroTokenToFormatOpts=function(e){return Lt[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,o({},this.opts,t)).format()},t.dtFormatter=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,o({},this.opts,t))},t.formatDateTime=function(e,t){return this.dtFormatter(e,t).format()},t.formatDateTimeParts=function(e,t){return this.dtFormatter(e,t).formatToParts()},t.formatInterval=function(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())},t.resolvedOptions=function(e,t){return this.dtFormatter(e,t).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return Qe(e,t);var n=o({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return r?function(e){return At[e.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod")},l=function(e,n){return r?function(e,t){return St(t)[e.month-1]}(t,e):s(n?{month:e}:{month:e,day:"numeric"},"month")},u=function(e,n){return r?function(e,t){return It(t)[e.weekday-1]}(t,e):s(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return r?function(e,t){return Ut(t)[e.year<0?0:1]}(t,e):s({era:e},"era")};return Rt(e.parseFormat(n),(function(n){switch(n){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"uu":return i.num(Math.floor(t.millisecond/10),2);case"uuu":return i.num(Math.floor(t.millisecond/100));case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12==0?12:t.hour%12);case"hh":return i.num(t.hour%12==0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return o?s({day:"numeric"},"day"):i.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?s({month:"numeric"},"month"):i.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?s({year:"numeric"},"year"):i.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"n":return i.num(t.localWeekNumber);case"nn":return i.num(t.localWeekNumber,2);case"ii":return i.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return i.num(t.localWeekYear,4);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var i,r=this,o=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=e.parseFormat(n),a=s.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),c=t.shiftTo.apply(t,a.map(o).filter((function(e){return e})));return Rt(s,(i=c,function(e){var t=o(e);return t?r.num(i.get(t),e.length):e}))},e}(),Nt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var i=t[0],r=t[1],s=t[2],a=n(e,s),c=a[0],l=a[1],u=a[2];return[o({},i,c),l||r,u]}),[{},null,1]).slice(0,2)}}function Mt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],c=s[1],l=a.exec(e);if(l)return c(l)}return[null,null]}function Vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var i,r={};for(i=0;i<t.length;i++)r[t[i]]=et(e[n+i]);return[r,null,n+i]}}var _t=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,jt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,qt=RegExp(""+jt.source+("(?:"+_t.source+"?(?:\\[("+Nt.source+")\\])?)?")),Ft=RegExp("(?:T"+qt.source+")?"),Bt=Vt("weekYear","weekNumber","weekDay"),zt=Vt("year","ordinal"),Ht=RegExp(jt.source+" ?(?:"+_t.source+"|("+Nt.source+"))?"),Wt=RegExp("(?: "+Ht.source+")?");function Jt(e,t,n){var i=e[t];return He(i)?n:et(i)}function $t(e,t){return[{hours:Jt(e,t,0),minutes:Jt(e,t+1,0),seconds:Jt(e,t+2,0),milliseconds:nt(e[t+3])},null,t+4]}function Zt(e,t){var n=!e[t]&&!e[t+1],i=ht(e[t+1],e[t+2]);return[{},n?null:me.instance(i),t+3]}function Yt(e,t){return[{},e[t]?ee.create(e[t]):null,t+1]}var Gt=RegExp("^T?"+jt.source+"$"),Kt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Xt(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],l=e[8],u="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e};return[{years:h(tt(n)),months:h(tt(i)),weeks:h(tt(r)),days:h(tt(o)),hours:h(tt(s)),minutes:h(tt(a)),seconds:h(tt(c),"-0"===c),milliseconds:h(nt(l),d)}]}var Qt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function en(e,t,n,i,r,o,s){var a={year:2===t.length?ut(et(t)):et(t),month:yt.indexOf(n)+1,day:et(i),hour:et(r),minute:et(o)};return s&&(a.second=et(s)),e&&(a.weekday=e.length>3?wt.indexOf(e)+1:bt.indexOf(e)+1),a}var tn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function nn(e){var t,n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],l=e[8],u=e[9],d=e[10],h=e[11],f=en(n,o,r,i,s,a,c);return t=l?Qt[l]:u?0:ht(d,h),[f,new me(t)]}var rn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,on=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,sn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function an(e){var t=e[1],n=e[2],i=e[3];return[en(t,e[4],i,n,e[5],e[6],e[7]),me.utcInstance]}function cn(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6];return[en(t,e[7],n,i,r,o,s),me.utcInstance]}var ln=Dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ft),un=Dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ft),dn=Dt(/(\d{4})-?(\d{3})/,Ft),hn=Dt(qt),fn=Pt((function(e,t){return[{year:Jt(e,t),month:Jt(e,t+1,1),day:Jt(e,t+2,1)},null,t+3]}),$t,Zt,Yt),vn=Pt(Bt,$t,Zt,Yt),gn=Pt(zt,$t,Zt,Yt),pn=Pt($t,Zt,Yt);var mn=Pt($t);var yn=Dt(/(\d{4})-(\d\d)-(\d\d)/,Wt),En=Dt(Ht),Sn=Pt($t,Zt,Yt);var wn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},bn=o({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},wn),kn=o({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},wn),In=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],An=In.slice(0).reverse();function Cn(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:o({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Un(i)}function On(e,t){for(var n,i,r=null!=(n=t.milliseconds)?n:0,o=v(An.slice(1));!(i=o()).done;){var s=i.value;t[s]&&(r+=t[s]*e[s].milliseconds)}return r}function Tn(e,t){var n=On(e,t)<0?-1:1;In.reduceRight((function(i,r){if(He(t[r]))return i;if(i){var o=t[i]*n,s=e[r][i],a=Math.floor(o/s);t[r]+=a*n,t[i]-=a*s*n}return r}),null),In.reduce((function(n,i){if(He(t[i]))return n;if(n){var r=t[n]%1;t[n]-=r,t[i]+=r*e[n][i]}return i}),null)}var Un=function(e){function t(e){var t="longterm"===e.conversionAccuracy||!1,n=t?kn:bn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ge.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}t.fromMillis=function(e,n){return t.fromObject({milliseconds:e},n)},t.fromObject=function(e,n){if(void 0===n&&(n={}),null==e||"object"!=typeof e)throw new w("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new t({values:vt(e,t.normalizeUnit),loc:ge.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})},t.fromDurationLike=function(e){if(We(e))return t.fromMillis(e);if(t.isDuration(e))return e;if("object"==typeof e)return t.fromObject(e);throw new w("Unknown duration argument "+e+" of type "+typeof e)},t.fromISO=function(e,n){var i=function(e){return Mt(e,[Kt,Xt])}(e)[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.fromISOTime=function(e,n){var i=function(e){return Mt(e,[Gt,mn])}(e)[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the Duration is invalid");var i=e instanceof Ue?e:new Ue(e,n);if(Te.throwOnInvalid)throw new y(i);return new t({invalid:i})},t.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new S(e);return t},t.isDuration=function(e){return e&&e.isLuxonDuration||!1};var n=t.prototype;return n.toFormat=function(e,t){void 0===t&&(t={});var n=o({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?xt.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},n.toHuman=function(e){var t=this;if(void 0===e&&(e={}),!this.isValid)return"Invalid Duration";var n=In.map((function(n){var i=t.values[n];return He(i)?null:t.loc.numberFormatter(o({style:"unit",unitDisplay:"long"},e,{unit:n.slice(0,-1)})).format(i)})).filter((function(e){return e}));return this.loc.listFormatter(o({type:"conjunction",style:e.listStyle||"narrow"},e)).format(n)},n.toObject=function(){return this.isValid?o({},this.values):{}},n.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=it(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},n.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();return t<0||t>=864e5?null:(e=o({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e,{includeOffset:!1}),bi.fromMillis(t,{zone:"UTC"}).toISOTime(e))},n.toJSON=function(){return this.toISO()},n.toString=function(){return this.toISO()},n[e]=function(){return this.isValid?"Duration { values: "+JSON.stringify(this.values)+" }":"Duration { Invalid, reason: "+this.invalidReason+" }"},n.toMillis=function(){return this.isValid?On(this.matrix,this.values):NaN},n.valueOf=function(){return this.toMillis()},n.plus=function(e){if(!this.isValid)return this;for(var n=t.fromDurationLike(e),i={},r=0,o=In;r<o.length;r++){var s=o[r];(Ge(n.values,s)||Ge(this.values,s))&&(i[s]=n.get(s)+this.get(s))}return Cn(this,{values:i},!0)},n.minus=function(e){if(!this.isValid)return this;var n=t.fromDurationLike(e);return this.plus(n.negate())},n.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var r=i[n];t[r]=ft(e(this.values[r],r))}return Cn(this,{values:t},!0)},n.get=function(e){return this[t.normalizeUnit(e)]},n.set=function(e){return this.isValid?Cn(this,{values:o({},this.values,vt(e,t.normalizeUnit))}):this},n.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.conversionAccuracy,o=t.matrix;return Cn(this,{loc:this.loc.clone({locale:n,numberingSystem:i}),matrix:o,conversionAccuracy:r})},n.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},n.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return Tn(this.matrix,e),Cn(this,{values:e},!0)},n.rescale=function(){return this.isValid?Cn(this,{values:function(e){for(var t={},n=0,i=Object.entries(e);n<i.length;n++){var r=i[n],o=r[0],s=r[1];0!==s&&(t[o]=s)}return t}(this.normalize().shiftToAll().toObject())},!0):this},n.shiftTo=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(e){return t.normalizeUnit(e)}));for(var r,o={},s={},a=this.toObject(),c=0,l=In;c<l.length;c++){var u=l[c];if(n.indexOf(u)>=0){r=u;var d=0;for(var h in s)d+=this.matrix[h][u]*s[h],s[h]=0;We(a[u])&&(d+=a[u]);var f=Math.trunc(d);o[u]=f,s[u]=(1e3*d-1e3*f)/1e3}else We(a[u])&&(s[u]=a[u])}for(var v in s)0!==s[v]&&(o[r]+=v===r?s[v]:s[v]/this.matrix[r][v]);return Tn(this.matrix,o),Cn(this,{values:o},!0)},n.shiftToAll=function(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this},n.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=0===this.values[i]?0:-this.values[i]}return Cn(this,{values:e},!0)},n.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t=0,n=In;t<n.length;t++){var i=n[t];if(r=this.values[i],o=e.values[i],!(void 0===r||0===r?void 0===o||0===o:r===o))return!1}var r,o;return!0},r(t,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(Symbol.for("nodejs.util.inspect.custom")),Rn="Invalid Interval";function Ln(e,t){return e&&e.isValid?t&&t.isValid?t<e?xn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:xn.invalid("missing or invalid end"):xn.invalid("missing or invalid start")}var xn=function(e){function t(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the Interval is invalid");var i=e instanceof Ue?e:new Ue(e,n);if(Te.throwOnInvalid)throw new m(i);return new t({invalid:i})},t.fromDateTimes=function(e,n){var i=ki(e),r=ki(n),o=Ln(i,r);return null==o?new t({start:i,end:r}):o},t.after=function(e,n){var i=Un.fromDurationLike(n),r=ki(e);return t.fromDateTimes(r,r.plus(i))},t.before=function(e,n){var i=Un.fromDurationLike(n),r=ki(e);return t.fromDateTimes(r.minus(i),r)},t.fromISO=function(e,n){var i=(e||"").split("/",2),r=i[0],o=i[1];if(r&&o){var s,a,c,l;try{a=(s=bi.fromISO(r,n)).isValid}catch(o){a=!1}try{l=(c=bi.fromISO(o,n)).isValid}catch(o){l=!1}if(a&&l)return t.fromDateTimes(s,c);if(a){var u=Un.fromISO(o,n);if(u.isValid)return t.after(s,u)}else if(l){var d=Un.fromISO(r,n);if(d.isValid)return t.before(c,d)}}return t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.isInterval=function(e){return e&&e.isLuxonInterval||!1};var n=t.prototype;return n.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},n.count=function(e,t){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var n,i=this.start.startOf(e,t);return n=(n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:i.locale}):this.end).startOf(e,t),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())},n.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},n.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},n.isAfter=function(e){return!!this.isValid&&this.s>e},n.isBefore=function(e){return!!this.isValid&&this.e<=e},n.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},n.set=function(e){var n=void 0===e?{}:e,i=n.start,r=n.end;return this.isValid?t.fromDateTimes(i||this.s,r||this.e):this},n.splitAt=function(){var e=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];for(var o=i.map(ki).filter((function(t){return e.contains(t)})).sort((function(e,t){return e.toMillis()-t.toMillis()})),s=[],a=this.s,c=0;a<this.e;){var l=o[c]||this.e,u=+l>+this.e?this.e:l;s.push(t.fromDateTimes(a,u)),a=u,c+=1}return s},n.splitBy=function(e){var n=Un.fromDurationLike(e);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r=this.s,o=1,s=[];r<this.e;){var a=this.start.plus(n.mapUnits((function(e){return e*o})));i=+a>+this.e?this.e:a,s.push(t.fromDateTimes(r,i)),r=i,o+=1}return s},n.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},n.overlaps=function(e){return this.e>e.s&&this.s<e.e},n.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},n.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},n.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},n.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},n.intersection=function(e){if(!this.isValid)return this;var n=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return n>=i?null:t.fromDateTimes(n,i)},n.union=function(e){if(!this.isValid)return this;var n=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,i)},t.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},t.xor=function(e){for(var n,i,r=null,o=0,s=[],a=e.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=v((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(i=c()).done;){var l=i.value;1===(o+="s"===l.type?1:-1)?r=l.time:(r&&+r!=+l.time&&s.push(t.fromDateTimes(r,l.time)),r=null)}return t.merge(s)},n.difference=function(){for(var e=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.xor([this].concat(i)).map((function(t){return e.intersection(t)})).filter((function(e){return e&&!e.isEmpty()}))},n.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":Rn},n[e]=function(){return this.isValid?"Interval { start: "+this.s.toISO()+", end: "+this.e.toISO()+" }":"Interval { Invalid, reason: "+this.invalidReason+" }"},n.toLocaleString=function(e,t){return void 0===e&&(e=C),void 0===t&&(t={}),this.isValid?xt.create(this.s.loc.clone(t),e).formatInterval(this):Rn},n.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Rn},n.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():Rn},n.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):Rn},n.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,i=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+i+this.e.toFormat(e):Rn},n.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Un.invalid(this.invalidReason)},n.mapEndpoints=function(e){return t.fromDateTimes(e(this.s),e(this.e))},r(t,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(Symbol.for("nodejs.util.inspect.custom")),Nn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Te.defaultZone);var t=bi.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return ee.isValidZone(e)},e.normalizeZone=function(e){return Ee(e,Te.defaultZone)},e.getStartOfWeek=function(e){var t=void 0===e?{}:e,n=t.locale,i=void 0===n?null:n,r=t.locObj;return((void 0===r?null:r)||ge.create(i)).getStartOfWeek()},e.getMinimumDaysInFirstWeek=function(e){var t=void 0===e?{}:e,n=t.locale,i=void 0===n?null:n,r=t.locObj;return((void 0===r?null:r)||ge.create(i)).getMinDaysInFirstWeek()},e.getWeekendWeekdays=function(e){var t=void 0===e?{}:e,n=t.locale,i=void 0===n?null:n,r=t.locObj;return((void 0===r?null:r)||ge.create(i)).getWeekendDays().slice()},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,l=n.outputCalendar,u=void 0===l?"gregory":l;return(c||ge.create(r,s,u)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,l=n.outputCalendar,u=void 0===l?"gregory":l;return(c||ge.create(r,s,u)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ge.create(r,s,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ge.create(r,s,null)).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return ge.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,i=void 0===n?null:n;return ge.create(i,null,"gregory").eras(e)},e.features=function(){return{relative:$e(),localeWeek:Ze()}},e}();function Dn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=n(t)-n(e);return Math.floor(Un.fromMillis(i).as("days"))}function Pn(e,t,n,i){var r=function(e,t,n){for(var i,r,o={},s=e,a=0,c=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter+4*(t.year-e.year)}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=Dn(e,t);return(n-n%7)/7}],["days",Dn]];a<c.length;a++){var l=c[a],u=l[0],d=l[1];n.indexOf(u)>=0&&(i=u,o[u]=d(e,t),(r=s.plus(o))>t?(o[u]--,(e=s.plus(o))>t&&(r=e,o[u]--,e=s.plus(o))):e=r)}return[e,o,r,i]}(e,t,n),o=r[0],s=r[1],a=r[2],c=r[3],l=t-o,u=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===u.length){var d;if(a<t)a=o.plus(((d={})[c]=1,d));a!==o&&(s[c]=(s[c]||0)+l/(a-o))}var h,f=Un.fromObject(s,i);return u.length>0?(h=Un.fromMillis(l,i)).shiftTo.apply(h,u).plus(f):f}var Mn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Vn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},_n=Mn.hanidec.replace(/[\[|\]]/g,"").split("");function jn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+Mn[n||"latn"]+t)}function qn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(Mn.hanidec))t+=_n.indexOf(e[n]);else for(var r in Vn){var o=Vn[r],s=o[0],a=o[1];i>=s&&i<=a&&(t+=i-s)}}return parseInt(t,10)}return t}(n))}}}var Fn="[ "+String.fromCharCode(160)+"]",Bn=new RegExp(Fn,"g");function zn(e){return e.replace(/\./g,"\\.?").replace(Bn,Fn)}function Hn(e){return e.replace(/\./g,"").replace(Bn," ").toLowerCase()}function Wn(e,t){return null===e?null:{regex:RegExp(e.map(zn).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return Hn(i)===Hn(e)}))+t}}}function Jn(e,t){return{regex:e,deser:function(e){return ht(e[1],e[2])},groups:t}}function $n(e){return{regex:e,deser:function(e){return e[0]}}}var Zn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};var Yn=null;function Gn(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return function(e,t){if(e.literal)return e;var n=Xn(xt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)})))}function Kn(e,t,n){var i=Gn(xt.parseFormat(n),e),r=i.map((function(t){return n=t,r=jn(i=e),o=jn(i,"{2}"),s=jn(i,"{3}"),a=jn(i,"{4}"),c=jn(i,"{6}"),l=jn(i,"{1,2}"),u=jn(i,"{1,3}"),d=jn(i,"{1,6}"),h=jn(i,"{1,9}"),f=jn(i,"{2,4}"),v=jn(i,"{4,6}"),g=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(p=function(e){if(n.literal)return g(e);switch(e.val){case"G":return Wn(i.eras("short"),0);case"GG":return Wn(i.eras("long"),0);case"y":return qn(d);case"yy":return qn(f,ut);case"yyyy":return qn(a);case"yyyyy":return qn(v);case"yyyyyy":return qn(c);case"M":return qn(l);case"MM":return qn(o);case"MMM":return Wn(i.months("short",!0),1);case"MMMM":return Wn(i.months("long",!0),1);case"L":return qn(l);case"LL":return qn(o);case"LLL":return Wn(i.months("short",!1),1);case"LLLL":return Wn(i.months("long",!1),1);case"d":return qn(l);case"dd":return qn(o);case"o":return qn(u);case"ooo":return qn(s);case"HH":return qn(o);case"H":return qn(l);case"hh":return qn(o);case"h":return qn(l);case"mm":return qn(o);case"m":case"q":return qn(l);case"qq":return qn(o);case"s":return qn(l);case"ss":return qn(o);case"S":return qn(u);case"SSS":return qn(s);case"u":return $n(h);case"uu":return $n(l);case"uuu":return qn(r);case"a":return Wn(i.meridiems(),0);case"kkkk":return qn(a);case"kk":return qn(f,ut);case"W":return qn(l);case"WW":return qn(o);case"E":case"c":return qn(r);case"EEE":return Wn(i.weekdays("short",!1),1);case"EEEE":return Wn(i.weekdays("long",!1),1);case"ccc":return Wn(i.weekdays("short",!0),1);case"cccc":return Wn(i.weekdays("long",!0),1);case"Z":case"ZZ":return Jn(new RegExp("([+-]"+l.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Jn(new RegExp("([+-]"+l.source+")("+o.source+")?"),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return g(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,p;var n,i,r,o,s,a,c,l,u,d,h,f,v,g,p})),o=r.find((function(e){return e.invalidReason}));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};var s=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),a=s[0],c=s[1],l=RegExp(a,"i"),u=function(e,t,n){var i=e.match(t);if(i){var r={},o=1;for(var s in n)if(Ge(n,s)){var a=n[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,r]}return[i,{}]}(t,l,c),d=u[0],h=u[1],f=h?function(e){var t,n=null;return He(e.z)||(n=ee.create(e.z)),He(e.Z)||(n||(n=new me(e.Z)),t=e.Z),He(e.q)||(e.M=3*(e.q-1)+1),He(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),He(e.u)||(e.S=nt(e.u)),[Object.keys(e).reduce((function(t,n){var i=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(t[i]=e[n]),t}),{}),n,t]}(h):[null,null,void 0],v=f[0],g=f[1],p=f[2];if(Ge(h,"a")&&Ge(h,"H"))throw new E("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:l,rawMatches:d,matches:h,result:v,zone:g,specificOffset:p}}function Xn(e,t){if(!e)return null;var n=xt.create(t,e).dtFormatter((Yn||(Yn=bi.fromMillis(1555555555555)),Yn)),i=n.formatToParts(),r=n.resolvedOptions();return i.map((function(t){return function(e,t,n){var i=e.type,r=e.value;if("literal"===i){var o=/^\s+$/.test(r);return{literal:!o,val:o?" ":r}}var s=t[i],a=i;"hour"===i&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");var c=Zn[a];if("object"==typeof c&&(c=c[s]),c)return{literal:!1,val:c}}(t,e,r)}))}var Qn="Invalid DateTime";function ei(e){return new Ue("unsupported zone",'the zone "'+e.name+'" is not supported')}function ti(e){return null===e.weekData&&(e.weekData=Ve(e.c)),e.weekData}function ni(e){return null===e.localWeekData&&(e.localWeekData=Ve(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ii(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new bi(o({},n,t,{old:n}))}function ri(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function oi(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function si(e,t,n){return ri(at(e),t,n)}function ai(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s=o({},e.c,{year:i,month:r,day:Math.min(e.c.day,st(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=Un.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),c=ri(at(s),n,e.zone),l=c[0],u=c[1];return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function ci(e,t,n,i,r,s){var a=n.setZone,c=n.zone;if(e&&0!==Object.keys(e).length||t){var l=t||c,u=bi.fromObject(e,o({},n,{zone:l,specificOffset:s}));return a?u:u.setZone(c)}return bi.invalid(new Ue("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function li(e,t,n){return void 0===n&&(n=!0),e.isValid?xt.create(ge.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ui(e,t){var n=e.c.year>9999||e.c.year<0,i="";return n&&e.c.year>=0&&(i+="+"),i+=Qe(e.c.year,n?6:4),t?(i+="-",i+=Qe(e.c.month),i+="-",i+=Qe(e.c.day)):(i+=Qe(e.c.month),i+=Qe(e.c.day)),i}function di(e,t,n,i,r,o){var s=Qe(e.c.hour);return t?(s+=":",s+=Qe(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(s+=":")):s+=Qe(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(s+=Qe(e.c.second),0===e.c.millisecond&&i||(s+=".",s+=Qe(e.c.millisecond,3))),r&&(e.isOffsetFixed&&0===e.offset&&!o?s+="Z":e.o<0?(s+="-",s+=Qe(Math.trunc(-e.o/60)),s+=":",s+=Qe(Math.trunc(-e.o%60))):(s+="+",s+=Qe(Math.trunc(e.o/60)),s+=":",s+=Qe(Math.trunc(e.o%60)))),o&&(s+="["+e.zone.ianaName+"]"),s}var hi={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fi={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},vi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},gi=["year","month","day","hour","minute","second","millisecond"],pi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],mi=["year","ordinal","hour","minute","second","millisecond"];function yi(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new S(e);return t}(e)}}function Ei(e,t){var n,i,r=Ee(t.zone,Te.defaultZone),o=ge.fromObject(t),s=Te.now();if(He(e.year))n=s;else{for(var a=0,c=gi;a<c.length;a++){var l=c[a];He(e[l])&&(e[l]=hi[l])}var u=Be(e)||ze(e);if(u)return bi.invalid(u);var d=si(e,r.offset(s),r);n=d[0],i=d[1]}return new bi({ts:n,zone:r,loc:o,o:i})}function Si(e,t,n){var i=!!He(n.round)||n.round,r=function(e,r){return e=it(e,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},o=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var s,a=v(n.units);!(s=a()).done;){var c=s.value,l=o(c);if(Math.abs(l)>=1)return r(l,c)}return r(e>t?-0:0,n.units[n.units.length-1])}function wi(e){var t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}var bi=function(e){function t(e){var t=e.zone||Te.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Ue("invalid input"):null)||(t.isValid?null:ei(t));this.ts=He(e.ts)?Te.now():e.ts;var i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];i=o[0],r=o[1]}else{var s=t.offset(this.ts);i=oi(this.ts,s),i=(n=Number.isNaN(i.year)?new Ue("invalid input"):null)?null:i,r=n?null:s}this._zone=t,this.loc=e.loc||ge.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}t.now=function(){return new t({})},t.local=function(){var e=wi(arguments),t=e[0],n=e[1],i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],c=n[5],l=n[6];return Ei({year:i,month:r,day:o,hour:s,minute:a,second:c,millisecond:l},t)},t.utc=function(){var e=wi(arguments),t=e[0],n=e[1],i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],c=n[5],l=n[6];return t.zone=me.utcInstance,Ei({year:i,month:r,day:o,hour:s,minute:a,second:c,millisecond:l},t)},t.fromJSDate=function(e,n){void 0===n&&(n={});var i,r=(i=e,"[object Date]"===Object.prototype.toString.call(i)?e.valueOf():NaN);if(Number.isNaN(r))return t.invalid("invalid input");var o=Ee(n.zone,Te.defaultZone);return o.isValid?new t({ts:r,zone:o,loc:ge.fromObject(n)}):t.invalid(ei(o))},t.fromMillis=function(e,n){if(void 0===n&&(n={}),We(e))return e<-864e13||e>864e13?t.invalid("Timestamp out of range"):new t({ts:e,zone:Ee(n.zone,Te.defaultZone),loc:ge.fromObject(n)});throw new w("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},t.fromSeconds=function(e,n){if(void 0===n&&(n={}),We(e))return new t({ts:1e3*e,zone:Ee(n.zone,Te.defaultZone),loc:ge.fromObject(n)});throw new w("fromSeconds requires a numerical input")},t.fromObject=function(e,n){void 0===n&&(n={}),e=e||{};var i=Ee(n.zone,Te.defaultZone);if(!i.isValid)return t.invalid(ei(i));var r=ge.fromObject(n),o=vt(e,yi),s=Fe(o,r),a=s.minDaysInFirstWeek,c=s.startOfWeek,l=Te.now(),u=He(n.specificOffset)?i.offset(l):n.specificOffset,d=!He(o.ordinal),h=!He(o.year),f=!He(o.month)||!He(o.day),g=h||f,p=o.weekYear||o.weekNumber;if((g||d)&&p)throw new E("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&d)throw new E("Can't mix ordinal dates with month/day");var m,y,S=p||o.weekday&&!g,w=oi(l,u);S?(m=pi,y=fi,w=Ve(w,a,c)):d?(m=mi,y=vi,w=je(w)):(m=gi,y=hi);for(var b,k=!1,I=v(m);!(b=I()).done;){var A=b.value;He(o[A])?o[A]=k?y[A]:w[A]:k=!0}var C=(S?function(e,t,n){void 0===t&&(t=4),void 0===n&&(n=1);var i=Je(e.weekYear),r=Xe(e.weekNumber,1,lt(e.weekYear,t,n)),o=Xe(e.weekday,1,7);return i?r?!o&&xe("weekday",e.weekday):xe("week",e.weekNumber):xe("weekYear",e.weekYear)}(o,a,c):d?function(e){var t=Je(e.year),n=Xe(e.ordinal,1,ot(e.year));return t?!n&&xe("ordinal",e.ordinal):xe("year",e.year)}(o):Be(o))||ze(o);if(C)return t.invalid(C);var O=si(S?_e(o,a,c):d?qe(o):o,u,i),T=new t({ts:O[0],zone:i,o:O[1],loc:r});return o.weekday&&g&&e.weekday!==T.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+T.toISO()):T},t.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return Mt(e,[ln,fn],[un,vn],[dn,gn],[hn,pn])}(e);return ci(n[0],n[1],t,"ISO 8601",e)},t.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return Mt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[tn,nn])}(e);return ci(n[0],n[1],t,"RFC 2822",e)},t.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return Mt(e,[rn,an],[on,an],[sn,cn])}(e);return ci(n[0],n[1],t,"HTTP",t)},t.fromFormat=function(e,n,i){if(void 0===i&&(i={}),He(e)||He(n))throw new w("fromFormat requires an input string and a format");var r=i,o=r.locale,s=void 0===o?null:o,a=r.numberingSystem,c=void 0===a?null:a,l=function(e,t,n){var i=Kn(e,t,n);return[i.result,i.zone,i.specificOffset,i.invalidReason]}(ge.fromOpts({locale:s,numberingSystem:c,defaultToEN:!0}),e,n),u=l[0],d=l[1],h=l[2],f=l[3];return f?t.invalid(f):ci(u,d,i,"format "+n,e,h)},t.fromString=function(e,n,i){return void 0===i&&(i={}),t.fromFormat(e,n,i)},t.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return Mt(e,[yn,fn],[En,Sn])}(e);return ci(n[0],n[1],t,"SQL",e)},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new w("need to specify a reason the DateTime is invalid");var i=e instanceof Ue?e:new Ue(e,n);if(Te.throwOnInvalid)throw new p(i);return new t({invalid:i})},t.isDateTime=function(e){return e&&e.isLuxonDateTime||!1},t.parseFormatForOpts=function(e,t){void 0===t&&(t={});var n=Xn(e,ge.fromObject(t));return n?n.map((function(e){return e?e.val:null})).join(""):null},t.expandFormat=function(e,t){return void 0===t&&(t={}),Gn(xt.parseFormat(e),ge.fromObject(t)).map((function(e){return e.val})).join("")};var n=t.prototype;return n.get=function(e){return this[e]},n.getPossibleOffsets=function(){if(!this.isValid||this.isOffsetFixed)return[this];var e=at(this.c),t=this.zone.offset(e-864e5),n=this.zone.offset(e+864e5),i=this.zone.offset(e-6e4*t),r=this.zone.offset(e-6e4*n);if(i===r)return[this];var o=e-6e4*i,s=e-6e4*r,a=oi(o,i),c=oi(s,r);return a.hour===c.hour&&a.minute===c.minute&&a.second===c.second&&a.millisecond===c.millisecond?[ii(this,{ts:o}),ii(this,{ts:s})]:[this]},n.resolvedLocaleOptions=function(e){void 0===e&&(e={});var t=xt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},n.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(me.instance(e),t)},n.toLocal=function(){return this.setZone(Te.defaultZone)},n.setZone=function(e,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,s=i.keepCalendarTime,a=void 0!==s&&s;if((e=Ee(e,Te.defaultZone)).equals(this.zone))return this;if(e.isValid){var c=this.ts;if(o||a){var l=e.offset(this.ts);c=si(this.toObject(),l,e)[0]}return ii(this,{ts:c,zone:e})}return t.invalid(ei(e))},n.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar;return ii(this,{loc:this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r})})},n.setLocale=function(e){return this.reconfigure({locale:e})},n.set=function(e){if(!this.isValid)return this;var t,n=vt(e,yi),i=Fe(n,this.loc),r=i.minDaysInFirstWeek,s=i.startOfWeek,a=!He(n.weekYear)||!He(n.weekNumber)||!He(n.weekday),c=!He(n.ordinal),l=!He(n.year),u=!He(n.month)||!He(n.day),d=l||u,h=n.weekYear||n.weekNumber;if((d||c)&&h)throw new E("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&c)throw new E("Can't mix ordinal dates with month/day");a?t=_e(o({},Ve(this.c,r,s),n),r,s):He(n.ordinal)?(t=o({},this.toObject(),n),He(n.day)&&(t.day=Math.min(st(t.year,t.month),t.day))):t=qe(o({},je(this.c),n));var f=si(t,this.o,this.zone);return ii(this,{ts:f[0],o:f[1]})},n.plus=function(e){return this.isValid?ii(this,ai(this,Un.fromDurationLike(e))):this},n.minus=function(e){return this.isValid?ii(this,ai(this,Un.fromDurationLike(e).negate())):this},n.startOf=function(e,t){var n=(void 0===t?{}:t).useLocaleWeeks,i=void 0!==n&&n;if(!this.isValid)return this;var r={},o=Un.normalizeUnit(e);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0}if("weeks"===o)if(i){var s=this.loc.getStartOfWeek();this.weekday<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if("quarters"===o){var a=Math.ceil(this.month/3);r.month=3*(a-1)+1}return this.set(r)},n.endOf=function(e,t){var n;return this.isValid?this.plus((n={},n[e]=1,n)).startOf(e,t).minus(1):this},n.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?xt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Qn},n.toLocaleString=function(e,t){return void 0===e&&(e=C),void 0===t&&(t={}),this.isValid?xt.create(this.loc.clone(t),e).formatDateTime(this):Qn},n.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?xt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},n.toISO=function(e){var t=void 0===e?{}:e,n=t.format,i=void 0===n?"extended":n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.suppressMilliseconds,a=void 0!==s&&s,c=t.includeOffset,l=void 0===c||c,u=t.extendedZone,d=void 0!==u&&u;if(!this.isValid)return null;var h="extended"===i,f=ui(this,h);return f+="T",f+=di(this,h,o,a,l,d)},n.toISODate=function(e){var t=(void 0===e?{}:e).format,n=void 0===t?"extended":t;return this.isValid?ui(this,"extended"===n):null},n.toISOWeekDate=function(){return li(this,"kkkk-'W'WW-c")},n.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.includeOffset,a=void 0===s||s,c=t.includePrefix,l=void 0!==c&&c,u=t.extendedZone,d=void 0!==u&&u,h=t.format,f=void 0===h?"extended":h;return this.isValid?(l?"T":"")+di(this,"extended"===f,o,i,a,d):null},n.toRFC2822=function(){return li(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},n.toHTTP=function(){return li(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},n.toSQLDate=function(){return this.isValid?ui(this,!0):null},n.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone,o=void 0!==r&&r,s=t.includeOffsetSpace,a="HH:mm:ss.SSS";return(o||i)&&((void 0===s||s)&&(a+=" "),o?a+="z":i&&(a+="ZZ")),li(this,a,!0)},n.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},n.toString=function(){return this.isValid?this.toISO():Qn},n[e]=function(){return this.isValid?"DateTime { ts: "+this.toISO()+", zone: "+this.zone.name+", locale: "+this.locale+" }":"DateTime { Invalid, reason: "+this.invalidReason+" }"},n.valueOf=function(){return this.toMillis()},n.toMillis=function(){return this.isValid?this.ts:NaN},n.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},n.toUnixInteger=function(){return this.isValid?Math.floor(this.ts/1e3):NaN},n.toJSON=function(){return this.toISO()},n.toBSON=function(){return this.toJSDate()},n.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=o({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},n.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},n.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Un.invalid("created by diffing an invalid DateTime");var i,r=o({locale:this.locale,numberingSystem:this.numberingSystem},n),s=(i=t,Array.isArray(i)?i:[i]).map(Un.normalizeUnit),a=e.valueOf()>this.valueOf(),c=Pn(a?this:e,a?e:this,s,r);return a?c.negate():c},n.diffNow=function(e,n){return void 0===e&&(e="milliseconds"),void 0===n&&(n={}),this.diff(t.now(),e,n)},n.until=function(e){return this.isValid?xn.fromDateTimes(this,e):this},n.hasSame=function(e,t,n){if(!this.isValid)return!1;var i=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,n)<=i&&i<=r.endOf(t,n)},n.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},n.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var n=e.base||t.fromObject({},{zone:this.zone}),i=e.padding?this<n?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(r=e.unit,s=void 0),Si(n,this.plus(i),o({},e,{numeric:"always",units:r,unit:s}))},n.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?Si(e.base||t.fromObject({},{zone:this.zone}),this,o({},e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},t.min=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(!n.every(t.isDateTime))throw new w("min requires all arguments be DateTimes");return Ye(n,(function(e){return e.valueOf()}),Math.min)},t.max=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(!n.every(t.isDateTime))throw new w("max requires all arguments be DateTimes");return Ye(n,(function(e){return e.valueOf()}),Math.max)},t.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var i=n,r=i.locale,o=void 0===r?null:r,s=i.numberingSystem,a=void 0===s?null:s;return Kn(ge.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0}),e,t)},t.fromStringExplain=function(e,n,i){return void 0===i&&(i={}),t.fromFormatExplain(e,n,i)},r(t,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?ti(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?ti(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?ti(this).weekday:NaN}},{key:"isWeekend",get:function(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}},{key:"localWeekday",get:function(){return this.isValid?ni(this).weekday:NaN}},{key:"localWeekNumber",get:function(){return this.isValid?ni(this).weekNumber:NaN}},{key:"localWeekYear",get:function(){return this.isValid?ni(this).weekYear:NaN}},{key:"ordinal",get:function(){return this.isValid?je(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Nn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Nn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Nn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Nn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return rt(this.year)}},{key:"daysInMonth",get:function(){return st(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ot(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?lt(this.weekYear):NaN}},{key:"weeksInLocalWeekYear",get:function(){return this.isValid?lt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}}],[{key:"DATE_SHORT",get:function(){return C}},{key:"DATE_MED",get:function(){return O}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return T}},{key:"DATE_FULL",get:function(){return U}},{key:"DATE_HUGE",get:function(){return R}},{key:"TIME_SIMPLE",get:function(){return L}},{key:"TIME_WITH_SECONDS",get:function(){return x}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return D}},{key:"TIME_24_SIMPLE",get:function(){return P}},{key:"TIME_24_WITH_SECONDS",get:function(){return M}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return V}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return _}},{key:"DATETIME_SHORT",get:function(){return j}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_MED",get:function(){return F}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return B}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return z}},{key:"DATETIME_FULL",get:function(){return H}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return W}},{key:"DATETIME_HUGE",get:function(){return J}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return $}}]),t}(Symbol.for("nodejs.util.inspect.custom"));function ki(e){if(bi.isDateTime(e))return e;if(e&&e.valueOf&&We(e.valueOf()))return bi.fromJSDate(e);if(e&&"object"==typeof e)return bi.fromObject(e);throw new w("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=bi,t.Duration=Un,t.FixedOffsetZone=me,t.IANAZone=ee,t.Info=Nn,t.Interval=xn,t.InvalidZone=ye,t.Settings=Te,t.SystemZone=G,t.VERSION="3.4.4",t.Zone=Z},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Te})),n.d(t,"Axios",(function(){return Ue})),n.d(t,"AxiosError",(function(){return Re})),n.d(t,"CanceledError",(function(){return Le})),n.d(t,"isCancel",(function(){return xe})),n.d(t,"CancelToken",(function(){return Ne})),n.d(t,"VERSION",(function(){return De})),n.d(t,"all",(function(){return Pe})),n.d(t,"Cancel",(function(){return Me})),n.d(t,"isAxiosError",(function(){return Ve})),n.d(t,"spread",(function(){return _e})),n.d(t,"toFormData",(function(){return je})),n.d(t,"AxiosHeaders",(function(){return qe})),n.d(t,"HttpStatusCode",(function(){return Fe})),n.d(t,"formToJSON",(function(){return Be})),n.d(t,"getAdapter",(function(){return ze})),n.d(t,"mergeConfig",(function(){return He}));var i={};n.r(i),n.d(i,"hasBrowserEnv",(function(){return m})),n.d(i,"hasStandardBrowserWebWorkerEnv",(function(){return S})),n.d(i,"hasStandardBrowserEnv",(function(){return E})),n.d(i,"navigator",(function(){return y})),n.d(i,"origin",(function(){return w}));var r=n(1),o=n(8),s=n(3);function a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function c(e,t){this._pairs=[],e&&Object(s.a)(e,this,t)}const l=c.prototype;l.append=function(e,t){this._pairs.push([e,t])},l.toString=function(e){const t=e?function(t){return e.call(this,t,a)}:a;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var u=c;function d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function h(e,t,n){if(!t)return e;const i=n&&n.encode||d;r.a.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):r.a.isURLSearchParams(t)?t.toString():new u(t,n).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}var f=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){r.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},v=n(2),g={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},p={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:u,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const m="undefined"!=typeof window&&"undefined"!=typeof document,y="object"==typeof navigator&&navigator||void 0,E=m&&(!y||["ReactNative","NativeScript","NS"].indexOf(y.product)<0),S="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,w=m&&window.location.href||"http://localhost";var b={...i,...p};var k=function(e){function t(e,n,i,o){let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),c=o>=e.length;if(s=!s&&r.a.isArray(i)?i.length:s,c)return r.a.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a;i[s]&&r.a.isObject(i[s])||(i[s]=[]);return t(e,n,i[s],o)&&r.a.isArray(i[s])&&(i[s]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[s])),!a}if(r.a.isFormData(e)&&r.a.isFunction(e.entries)){const n={};return r.a.forEachEntry(e,(e,i)=>{t(function(e){return r.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null};const I={transitional:g,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=r.a.isObject(e);o&&r.a.isHTMLForm(e)&&(e=new FormData(e));if(r.a.isFormData(e))return i?JSON.stringify(k(e)):e;if(r.a.isArrayBuffer(e)||r.a.isBuffer(e)||r.a.isStream(e)||r.a.isFile(e)||r.a.isBlob(e)||r.a.isReadableStream(e))return e;if(r.a.isArrayBufferView(e))return e.buffer;if(r.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Object(s.a)(e,new b.classes.URLSearchParams,{visitor:function(e,t,n,i){return b.isNode&&r.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=r.a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Object(s.a)(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(r.a.isString(e))try{return(t||JSON.parse)(e),r.a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||I.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(r.a.isResponse(e)||r.a.isReadableStream(e))return e;if(e&&r.a.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw v.a.from(e,v.a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:b.classes.FormData,Blob:b.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};r.a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});var A=I;const C=r.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const O=Symbol("internals");function T(e){return e&&String(e).trim().toLowerCase()}function U(e){return!1===e||null==e?e:r.a.isArray(e)?e.map(U):String(e)}function R(e,t,n,i,o){return r.a.isFunction(i)?i.call(this,t,n):(o&&(t=n),r.a.isString(t)?r.a.isString(i)?-1!==t.indexOf(i):r.a.isRegExp(i)?i.test(t):void 0:void 0)}class L{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=T(t);if(!o)throw new Error("header name must be a non-empty string");const s=r.a.findKey(i,o);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||t]=U(e))}const s=(e,t)=>r.a.forEach(e,(e,n)=>o(e,n,t));if(r.a.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(r.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&C[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(r.a.isObject(e)&&r.a.isIterable(e)){let n,i,o={};for(const t of e){if(!r.a.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?r.a.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=T(e)){const n=r.a.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(r.a.isFunction(t))return t.call(this,e,n);if(r.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=T(e)){const n=r.a.findKey(this,e);return!(!n||void 0===this[n]||t&&!R(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=T(e)){const o=r.a.findKey(n,e);!o||t&&!R(0,n[o],o,t)||(delete n[o],i=!0)}}return r.a.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!R(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return r.a.forEach(this,(i,o)=>{const s=r.a.findKey(n,o);if(s)return t[s]=U(i),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=U(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.a.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&r.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[O]=this[O]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=T(e);t[i]||(!function(e,t){const n=r.a.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[i]=!0)}return r.a.isArray(e)?e.forEach(i):i(e),this}}L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.a.reduceDescriptors(L.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),r.a.freezeMethods(L);var x=L;function N(e,t){const n=this||A,i=t||n,o=x.from(i.headers);let s=i.data;return r.a.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function D(e){return!(!e||!e.__CANCEL__)}function P(e,t,n){v.a.call(this,null==e?"canceled":e,v.a.ERR_CANCELED,t,n),this.name="CanceledError"}r.a.inherits(P,v.a,{__CANCEL__:!0});var M=P,V=n(9);function _(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new v.a("Request failed with status code "+n.status,[v.a.ERR_BAD_REQUEST,v.a.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var j=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=i[s];r||(r=c),n[o]=a,i[o]=c;let u=s,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}};var q=function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,i||(i=setTimeout(()=>{i=null,s(n)},o-a)))},()=>n&&s(n)]};const F=(e,t,n=3)=>{let i=0;const r=j(50,250);return q(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,c=r(a);i=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},B=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},z=e=>(...t)=>r.a.asap(()=>e(...t));var H,W,J=b.hasStandardBrowserEnv?(H=new URL(b.origin),W=b.navigator&&/(msie|trident)/i.test(b.navigator.userAgent),e=>(e=new URL(e,b.origin),H.protocol===e.protocol&&H.host===e.host&&(W||H.port===e.port))):()=>!0,$=b.hasStandardBrowserEnv?{write(e,t,n,i,o,s,a){if("undefined"==typeof document)return;const c=[`${e}=${encodeURIComponent(t)}`];r.a.isNumber(n)&&c.push("expires="+new Date(n).toUTCString()),r.a.isString(i)&&c.push("path="+i),r.a.isString(o)&&c.push("domain="+o),!0===s&&c.push("secure"),r.a.isString(a)&&c.push("SameSite="+a),document.cookie=c.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Z(e,t,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Y=e=>e instanceof x?{...e}:e;function G(e,t){t=t||{};const n={};function i(e,t,n,i){return r.a.isPlainObject(e)&&r.a.isPlainObject(t)?r.a.merge.call({caseless:i},e,t):r.a.isPlainObject(t)?r.a.merge({},t):r.a.isArray(t)?t.slice():t}function o(e,t,n,o){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e,0,o):i(e,t,0,o)}function s(e,t){if(!r.a.isUndefined(t))return i(void 0,t)}function a(e,t){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function c(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t,n)=>o(Y(e),Y(t),0,!0)};return r.a.forEach(Object.keys({...e,...t}),(function(i){const s=l[i]||o,a=s(e[i],t[i],i);r.a.isUndefined(a)&&s!==c||(n[i]=a)})),n}var K=e=>{const t=G({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=x.from(a),t.url=h(Z(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),r.a.isFormData(n))if(b.hasStandardBrowserEnv||b.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(r.a.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(b.hasStandardBrowserEnv&&(i&&r.a.isFunction(i)&&(i=i(t)),i||!1!==i&&J(t.url))){const e=o&&s&&$.read(s);e&&a.set(o,e)}return t};var X="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=K(e);let o=i.data;const s=x.from(i.headers).normalize();let a,c,l,u,d,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=i;function m(){u&&u(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function E(){if(!y)return;const i=x.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());_((function(e){t(e),m()}),(function(e){n(e),m()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(new v.a("Request aborted",v.a.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const i=t&&t.message?t.message:"Network Error",r=new v.a(i,v.a.ERR_NETWORK,e,y);r.event=t||null,n(r),y=null},y.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||g;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new v.a(t,r.clarifyTimeoutError?v.a.ETIMEDOUT:v.a.ECONNABORTED,e,y)),y=null},void 0===o&&s.setContentType(null),"setRequestHeader"in y&&r.a.forEach(s.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),r.a.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),h&&"json"!==h&&(y.responseType=i.responseType),p&&([l,d]=F(p,!0),y.addEventListener("progress",l)),f&&y.upload&&([c,u]=F(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(a=t=>{y&&(n(!t||t.type?new M(null,e,y):t),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const S=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);S&&-1===b.protocols.indexOf(S)?n(new v.a("Unsupported protocol "+S+":",v.a.ERR_BAD_REQUEST,e)):y.send(o||null)}))};var Q=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;i.abort(t instanceof v.a?t:new M(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new v.a(`timeout ${t} of ms exceeded`,v.a.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:c}=i;return c.unsubscribe=()=>r.a.asap(a),c}};const ee=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},te=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ne=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of te(e))yield*ee(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:ie}=r.a,re=(({Request:e,Response:t})=>({Request:e,Response:t}))(r.a.global),{ReadableStream:oe,TextEncoder:se}=r.a.global,ae=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ce=e=>{e=r.a.merge.call({skipUndefined:!0},re,e);const{fetch:t,Request:n,Response:i}=e,o=t?ie(t):"function"==typeof fetch,s=ie(n),a=ie(i);if(!o)return!1;const c=o&&ie(oe),l=o&&("function"==typeof se?(u=new se,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const d=s&&c&&ae(()=>{let e=!1;const t=new n(b.origin,{body:new oe,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),h=a&&c&&ae(()=>r.a.isReadableStream(new i("").body)),f={stream:h&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new v.a(`Response type '${e}' is not supported`,v.a.ERR_NOT_SUPPORT,n)})});const g=async(e,t)=>{const i=r.a.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(r.a.isBlob(e))return e.size;if(r.a.isSpecCompliantForm(e)){const t=new n(b.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return r.a.isArrayBufferView(e)||r.a.isArrayBuffer(e)?e.byteLength:(r.a.isURLSearchParams(e)&&(e+=""),r.a.isString(e)?(await l(e)).byteLength:void 0)})(t):i};return async e=>{let{url:o,method:a,data:c,signal:l,cancelToken:u,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:E,headers:S,withCredentials:w="same-origin",fetchOptions:b}=K(e),k=t||fetch;E=E?(E+"").toLowerCase():"text";let I=Q([l,u&&u.toAbortSignal()],p),A=null;const C=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let O;try{if(y&&d&&"get"!==a&&"head"!==a&&0!==(O=await g(S,c))){let e,t=new n(o,{method:"POST",body:c,duplex:"half"});if(r.a.isFormData(c)&&(e=t.headers.get("content-type"))&&S.setContentType(e),t.body){const[e,n]=B(O,F(z(y)));c=ne(t.body,65536,e,n)}}r.a.isString(w)||(w=w?"include":"omit");const t=s&&"credentials"in n.prototype,l={...b,signal:I,method:a.toUpperCase(),headers:S.normalize().toJSON(),body:c,duplex:"half",credentials:t?w:void 0};A=s&&new n(o,l);let u=await(s?k(A,b):k(o,l));const v=h&&("stream"===E||"response"===E);if(h&&(m||v&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=r.a.toFiniteNumber(u.headers.get("content-length")),[n,o]=m&&B(t,F(z(m),!0))||[];u=new i(ne(u.body,65536,n,()=>{o&&o(),C&&C()}),e)}E=E||"text";let p=await f[r.a.findKey(f,E)||"text"](u,e);return!v&&C&&C(),await new Promise((t,n)=>{_(t,n,{data:p,headers:x.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:A})})}catch(t){if(C&&C(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new v.a("Network Error",v.a.ERR_NETWORK,e,A),{cause:t.cause||t});throw v.a.from(t,t&&t.code,e,A)}}},le=new Map,ue=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:r}=t,o=[i,r,n];let s,a,c=o.length,l=le;for(;c--;)s=o[c],a=l.get(s),void 0===a&&l.set(s,a=c?new Map:ce(t)),l=a;return a};ue();const de={http:V.a,xhr:X,fetch:{get:ue}};r.a.forEach(de,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const he=e=>"- "+e,fe=e=>r.a.isFunction(e)||null===e||!1===e;var ve={getAdapter:function(e,t){e=r.a.isArray(e)?e:[e];const{length:n}=e;let i,o;const s={};for(let a=0;a<n;a++){let n;if(i=e[a],o=i,!fe(i)&&(o=de[(n=String(i)).toLowerCase()],void 0===o))throw new v.a(`Unknown adapter '${n}'`);if(o&&(r.a.isFunction(o)||(o=o.get(t))))break;s[n||"#"+a]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(he).join("\n"):" "+he(e[0]):"as no adapter specified";throw new v.a("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:de};function ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new M(null,e)}function pe(e){ge(e),e.headers=x.from(e.headers),e.data=N.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ve.getAdapter(e.adapter||A.adapter,e)(e).then((function(t){return ge(e),t.data=N.call(e,e.transformResponse,t),t.headers=x.from(t.headers),t}),(function(t){return D(t)||(ge(e),t&&t.response&&(t.response.data=N.call(e,e.transformResponse,t.response),t.response.headers=x.from(t.response.headers))),Promise.reject(t)}))}const me={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{me[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ye={};me.transitional=function(e,t,n){function i(e,t){return"[Axios v1.13.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new v.a(i(r," has been removed"+(t?" in "+t:"")),v.a.ERR_DEPRECATED);return t&&!ye[r]&&(ye[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},me.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Ee={assertOptions:function(e,t,n){if("object"!=typeof e)throw new v.a("options must be an object",v.a.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new v.a("option "+o+" must be "+n,v.a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new v.a("Unknown option "+o,v.a.ERR_BAD_OPTION)}},validators:me};const Se=Ee.validators;class we{constructor(e){this.defaults=e||{},this.interceptors={request:new f,response:new f}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=G(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Ee.assertOptions(n,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean)},!1),null!=i&&(r.a.isFunction(i)?t.paramsSerializer={serialize:i}:Ee.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ee.assertOptions(t,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&r.a.merge(o.common,o[t.method]);o&&r.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=x.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,h=0;if(!c){const e=[pe.bind(this),void 0];for(e.unshift(...a),e.push(...l),d=e.length,u=Promise.resolve(t);h<d;)u=u.then(e[h++],e[h++]);return u}d=a.length;let f=t;for(;h<d;){const e=a[h++],t=a[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=pe.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,d=l.length;h<d;)u=u.then(l[h++],l[h++]);return u}getUri(e){return h(Z((e=G(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}r.a.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,n){return this.request(G(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.a.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(G(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}we.prototype[e]=t(),we.prototype[e+"Form"]=t(!0)}));var be=we;class ke{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new M(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ke((function(t){e=t})),cancel:e}}}var Ie=ke;const Ae={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ae).forEach(([e,t])=>{Ae[t]=e});var Ce=Ae;const Oe=function e(t){const n=new be(t),i=Object(o.a)(be.prototype.request,n);return r.a.extend(i,be.prototype,n,{allOwnKeys:!0}),r.a.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(G(t,n))},i}(A);Oe.Axios=be,Oe.CanceledError=M,Oe.CancelToken=Ie,Oe.isCancel=D,Oe.VERSION="1.13.2",Oe.toFormData=s.a,Oe.AxiosError=v.a,Oe.Cancel=Oe.CanceledError,Oe.all=function(e){return Promise.all(e)},Oe.spread=function(e){return function(t){return e.apply(null,t)}},Oe.isAxiosError=function(e){return r.a.isObject(e)&&!0===e.isAxiosError},Oe.mergeConfig=G,Oe.AxiosHeaders=x,Oe.formToJSON=e=>k(r.a.isHTMLForm(e)?new FormData(e):e),Oe.getAdapter=ve.getAdapter,Oe.HttpStatusCode=Ce,Oe.default=Oe;var Te=Oe;const{Axios:Ue,AxiosError:Re,CanceledError:Le,isCancel:xe,CancelToken:Ne,VERSION:De,all:Pe,Cancel:Me,isAxiosError:Ve,spread:_e,toFormData:je,AxiosHeaders:qe,HttpStatusCode:Fe,formToJSON:Be,getAdapter:ze,mergeConfig:He}=Te},function(e,t,n){"use strict";n.r(t),n.d(t,"Desktop",(function(){return qe}));var i=n(0);const r=Object(i.createLogger)("agentx-js-api"),o=(e,t)=>({info:(...n)=>e.info(t,...n),warn:(...n)=>e.warn(t,...n),error:(...n)=>e.error(t,...n)});class s{constructor(e){this.logger=e.logger}check(e){return e?!!e.isInited||(this.logger.error("SERVICE still not initialized... Await it's init(...) first."),!1):(this.logger.error("SERVICE is not defined..."),!1)}}const a=e=>new s(e);var c=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const l={rps:120,tag:"jsapi"},u={rps:0,tag:"jsapi"},d={tag:"jsapi"},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",l),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",u),v=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",u),g=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",u),p=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",u),m=e=>e.actionsChannels.createSource("addCustomTask",l),y=e=>e.actionsChannels.createSource("getToken/Req",u),E=e=>e.actionsChannels.createDestination("getToken/Res",d),S=e=>e.actionsChannels.createSource("getTaskMap/Req",u),w=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),b=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",u),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",u),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),C=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",u),O=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class T{checkService(){return this.serviceChecker.check(this.SERVICE)}getNextReqId(){const e=Date.now();return this.lastReqTs!==e?(this.lastReqTs=e,this.lastReqN=0):this.lastReqN++,`${this.lastReqTs}_${this.lastReqN}`}constructor(e){this.lastReqTs=Date.now(),this.lastReqN=0,this.toggleMiximizeRestore=e=>{var t;if(e&&e.target){const n=null===(t=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===t?void 0:t.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),r.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),r.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-answer event")},this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.sourceActionsChannels={fireGeneralSilentNotification:h(this.SERVICE),fireGeneralAutoDismissNotification:f(this.SERVICE),fireGeneralAcknowledgeNotification:g(this.SERVICE),addCustomTask:m(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:S(this.SERVICE),getMediaTypeQueue:b(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:v(this.SERVICE),fireGeneralAcknowledgeNotification:p(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:w(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:O(this.SERVICE)},this.logger.info("Inited"))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fireGeneralSilentNotification(...e){this.checkService()&&this.sourceActionsChannels.fireGeneralSilentNotification.send(...e)}fireGeneralAutoDismissNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.AutoDismiss&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(r),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...e)})}))}fireGeneralAcknowledgeNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.Acknowledge&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(r),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...e)})}))}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getTaskMap.removeListener(n))};this.destinationActionsChannels.getTaskMap.addListener(n),this.sourceActionsChannels.getTaskMap.send(t)})}))}getMediaTypeQueue(e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),i=({args:[e,r]})=>{r===n&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(i))};this.destinationActionsChannels.getMediaTypeQueue.addListener(i),this.sourceActionsChannels.getMediaTypeQueue.send(e,n)})}))}getToken(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getToken.removeListener(n))};this.destinationActionsChannels.getToken.addListener(n),this.sourceActionsChannels.getToken.send(t)})}))}getIdleCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getIdleCodes.removeListener(n))};this.destinationActionsChannels.getIdleCodes.addListener(n),this.sourceActionsChannels.getIdleCodes.send(t)})}))}getWrapUpCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getWrapUpCodes.removeListener(n))};this.destinationActionsChannels.getWrapUpCodes.addListener(n),this.sourceActionsChannels.getWrapUpCodes.send(t)})}))}getClosestElement(e,t){return e&&e!==document&&e!==window?e instanceof ShadowRoot?this.getClosestElement(e.host,t):e instanceof HTMLElement&&e.matches(t)?e:this.getClosestElement(e.parentNode,t):null}}const U=o(r,"[Actions JSAPI] =>");class R{constructor(e){this.isInited=!1,this.listeners=new Map,this.listenersOnce=new Map,this.logger=e.logger}init(e){this.aqmServiceEntity=e.aqmServiceEntity,this.aqmServiceEntityString=e.aqmServiceEntityString,this.isInited=!0}cleanup(){this.removeAllEventListeners(),this.aqmServiceEntity=void 0,this.aqmServiceEntityString=void 0,this.isInited=!1}_addEventListener(e,t,n){var i,r,o;const s=n?"listenersOnce":"listeners";this[s].has(e)||this[s].set(e,new Map);const a=this[s].get(e),c=n?"listenOnce":"listen",l=i=>{let r=null;return n&&(r=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(i){n?(i.stopListenOnce(),r&&r.stopListenOnce()):i.stopListen();const o=[];o.push(`UnBound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(o.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&c in this.aqmServiceEntity[e]){const r=this.aqmServiceEntity[e][c](t);a.set(t,l(r));const o=[];o.push(`Bound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`to "${this.aqmServiceEntityString}"`),null===(i=this.logger)||void 0===i||i.info(o.join(" "))}else null===(r=this.logger)||void 0===r||r.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(o=this.logger)||void 0===o||o.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,n){const i=n?"listenersOnce":"listeners";if(this[i].has(e)){const n=this[i].get(e);if(n){if(n.has(t)){n.get(t)(),n.delete(t)}n.size<1&&this[i].delete(e)}}}addEventListener(e,t){this._addEventListener(e,t,!1)}addOnceEventListener(e,t){this._addEventListener(e,t,!0)}removeEventListener(e,t){this._removeEventListener(e,t,!1)}removeOnceEventListener(e,t){this._removeEventListener(e,t,!0)}removeAllEventListeners(){["listeners","listenersOnce"].forEach(e=>{this[e].forEach((e,t)=>{e.forEach((e,t)=>e()),e.clear()}),this[e].clear()})}}const L=e=>new R(e);var x,N,D,P,M,V,_,j,q;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(x||(x={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(N||(N={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(D||(D={})),function(e){e.All="All",e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social"}(P||(P={})),function(e){e.SMS="SMS",e.TELEPHONY="Call",e.CHAT="Chat",e.EMAIL="Email",e.MESSENGER="Messenger",e.WHATSAPP="WhatsApp",e.APPLE_BUSINESS_CHAT="Apple Business Chat",e.GOOGLE_BUSINESS_MESSAGES="Google's Business Messages"}(M||(M={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(V||(V={})),function(e){e.EMAIL="email",e.CHAT="chat",e.TELEPHONY="telephony",e.SOCIAL="social",e.SMS="sms",e.FACEBOOK="facebook",e.WHATSAPP="whatsapp",e.APPLEMESSAGES="appleMessages",e.GOOGLEMESSAGES="googleMessages"}(_||(_={})),(q=j||(j={})).validateAgentState=e=>Object.values(D).includes(e),q.validateURL=e=>/^[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/.test(e),q.validateChannelName=e=>Object.values(M).includes(e),q.validateStateChannelType=e=>Array.isArray(e)&&e.length>0&&e.every(e=>["telephony","chat","email","social"].includes(e)),q.validateDestinationType=e=>Object.values(N).includes(e),q.validateMediaType=e=>Object.values(x).includes(e),q.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,q.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,q.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&q.validatePropValueNotNullAndEmpty(e),q.validateStringToBoolean=e=>{const t=null==e?void 0:e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},q.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,q.validateChannelType=e=>Object.values(M).includes(e),q.validateMonitorType=e=>Object.values(V).includes(e),q.validateUUID=e=>/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e),q.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),q.validateBuddyAgents=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateChannelName(null==e?void 0:e.channelName),t,"channelName is not a valid channel name"),void 0!==(null==e?void 0:e.state)&&i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state"),void 0!==(null==e?void 0:e.trackingId)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.trackingId),t,"trackingId is not a valid string")},q.validateAuxCodeType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e),t,"value is null or empty"),i.AssertUtils.check("IDLE_CODE"===e||"WRAP_UP_CODE"===e,t,"value is not IDLE_CODE or WRAP_UP_CODE")},q.validateAuxCodePayload=(e,t)=>{q.validateAuxCodeType(e.workType,t),void 0!==e.page&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.page),t,"page is is null or empty"),void 0!==e.pageSize&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.pageSize),t,"pageSize is is null or empty"),void 0!==e.search&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.search),t,"search is is null or empty"),void 0!==e.customFilter&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.customFilter),t,"customFilter is is null or empty")},q.validateCancelCtq=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.queueId),t,"queueId is not a valid UUID")},q.validateWrapupPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.auxCodeId),t,"auxCodeId is not a valid string"),i.AssertUtils.check(q.validateStringToBoolean(null==e?void 0:e.isAutoWrapup),t,"isAutoWrapup is not a valid boolean value")},q.validateVTeamTransferPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.vteamId),t,"vteamId is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.vteamType),t,"vteamType is not a valid string")},q.validateBlindTransferPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destAgentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destAgentTeamId),t,"destAgentTeamId is not a valid string"),i.AssertUtils.check(q.validateStringNumberOnly(null==e?void 0:e.destAgentDN),t,"destAgentDN is not a numbers only string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destSiteId),t,"destSiteId is not a valid string")},q.validateConsultPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),void 0!==(null==e?void 0:e.destAgentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destAgentId is not a valid UUID"),void 0!==(null==e?void 0:e.mediaType)&&i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),void 0!==(null==e?void 0:e.holdParticipants)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultTransferPayLoad=(e,t)=>{void 0!==(null==e?void 0:e.agentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.destAgentId),t,"destagentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.mediaResourceId),t,"mediaResourceId is not a valid UUID"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateWrapUpV2Payload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.auxCodeId),t,"auxCodeId is not a valid string")},q.validateChangeAgentStateType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.state),t,"state is null or empty"),i.AssertUtils.check("available"===e.state.toLowerCase()||"idle"===e.state.toLowerCase(),t,"state is not Available or Idle"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is null or empty"),i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID")},q.validateConsultDataV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultConferenceDataV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.agentId)&&i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentId),t,"agentId is not a valid UUID"),void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateTransferV2Payload=(e,t)=>{void 0!==(null==e?void 0:e.to)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(null==e?void 0:e.destinationType),t,"destinationType is not a valid destination type")},q.validateBuddyAgentsV2Payload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateAgentState(null==e?void 0:e.state),t,"state is not a valid state")},q.validateVTeam=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.agentSessionId),t,"agentSessionId is not a valid UUID"),i.AssertUtils.check(q.validateChannelType(null==e?void 0:e.channelType),t,"channelType is not a valid channel type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.type),t,"type is not a valid string"),void 0!==(null==e?void 0:e.trackingId)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.trackingId),t,"trackingId is not a valid string")},q.validateDialerTasks=(e,t)=>{(null==e?void 0:e.id)&&i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.entryPointId),t,"entryPointId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.destination),t,"destination is null or empty"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.direction),t,"direction is not a valid UUID"),(null==e?void 0:e.origin)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.origin),t,"origin is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.attributes.key),t,"attributes.key is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.attributes.value),t,"attributes.value is null or empty"),i.AssertUtils.check(q.validateMediaType(null==e?void 0:e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.outboundType),t,"outboundType is null or empty")},q.validatePreviewCampaignPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.interactionId),t,"interactionId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(null==e?void 0:e.campaignId),t,"campaignId is null or empty")},q.validateMonitoringRequest=(e,t)=>{i.AssertUtils.check(q.validateUUID(null==e?void 0:e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateMonitorType(null==e?void 0:e.monitorType),t,"monitorType is not a valid monitor type"),void 0!==(null==e?void 0:e.queueIds)&&e.queueIds.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"queueIds is not a valid UUID")}),void 0!==(null==e?void 0:e.teams)&&e.teams.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"team is not a valid UUID")}),void 0!==(null==e?void 0:e.sites)&&e.sites.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"site is not a valid UUID")}),void 0!==(null==e?void 0:e.agents)&&e.agents.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"agent is not a valid UUID")}),void 0!==(null==e?void 0:e.startUTCTimestamp)&&i.AssertUtils.check(q.validateUTCTimeStampNumberFormat(e.startUTCTimestamp),t,"startUTCTimestamp is not a valid timestamp"),void 0!==(null==e?void 0:e.continuousDuration)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.continuousDuration),t,"continuousDuration is not a valid string or not undefined"),void 0!==(null==e?void 0:e.taskId)&&i.AssertUtils.check(q.validateUUID(e.taskId),t,"taskId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(null==e?void 0:e.trackingId),t,"trackingId is not a valid UUID"),(null==e?void 0:e.invisibleMode)&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.invisibleMode),t,"invisibleMode is not a valid string or not undefined")},q.validateMultiConsultPayload=(e,t)=>{e&&Object.entries(e).forEach(([e,n])=>{switch(e){case"agentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"agentId is not a valid UUID");break;case"destAgentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"destAgentId is not a valid UUID");break;case"mediaType":i.AssertUtils.check(q.validateMediaType(n),t,"mediaType is not a valid media type");break;case"holdParticipants":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(n),t,"holdParticipants is not valid");break;case"destAgentDN":i.AssertUtils.check(q.validateStringNumberOnly(String(n)),t,"destAgentDN is not a numbers only string");break;case"destinationType":i.AssertUtils.check(q.validateDestinationType(n),t,"destinationType is not a valid destination type");break;case"destAgentTeamId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destAgentTeamId is not a valid string");break;case"destSiteId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destSiteId is not a valid string");break;case"queueId":i.AssertUtils.check(q.validateUUID(String(n)),t,"queueId is not a valid UUID");break;case"trackingId":i.AssertUtils.check(q.validateUUID(String(n)),t,"trackingId is not a valid string")}})};var F=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class B{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.contact,aqmServiceEntityString:"SERVICE.aqm.contact"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}sendDtmf(e){this.checkService()&&this.SERVICE.webCalling.sendDTMF(e)}accept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"accept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.accept(e)}))}consultAccept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultAccept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultAccept(e)}))}buddyAgents(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgents(e.data,"buddyAgents"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgents(e)}))}end(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"end","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.end(e)}))}consultEnd(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEnd","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEnd(e)}))}cancelCtq(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateCancelCtq(e.data,"cancelCtq"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelCtq(e)}))}wrapup(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateWrapupPayload(e.data,"wrapup"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapup(e)}))}vteamTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateVTeamTransferPayload(e.data,"vteamTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransfer(e)}))}blindTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransfer","interactionId is not a valid UUID"),j.validateBlindTransferPayload(e.data,"blindTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransfer(e)}))}hold(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"hold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.hold(e)}))}unHold(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"unHold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.unHold(e)}))}consult(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consult","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateURL(e.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(e.data,"consult"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consult(e)}))}consultConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConference","interactionId is not a valid UUID"),j.validateConsultPayload(e.data,"consultConference"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConference(e)}))}decline(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(null===(t=e.data)||void 0===t?void 0:t.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"decline","isConsult is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.decline(e)}))}consultTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),j.validateConsultTransferPayLoad(e.data,"consultTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransfer(e)}))}vteamList(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateVTeam(e.data,"vteamList"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamList(e)}))}pauseRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecording","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecording(e)}))}resumeRecording(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecording","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(null===(t=e.data)||void 0===t?void 0:t.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecording(e)}))}acceptV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"acceptV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.acceptV2(e)}))}endV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endV2","interactionId is not a valid UUID"),e.isEndingFromNonPrimary&&i.AssertUtils.check(j.validateBoolean(e.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(e):void 0}))}cancelTaskV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelTaskV2","interactionId is not a valid UUID"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(e):void 0}))}pauseRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecordingV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecordingV2(e)}))}resumeRecordingV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecordingV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(null===(t=e.data)||void 0===t?void 0:t.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecordingV2(e)}))}wrapupV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"wrapupV2","interactionId is not a valid UUID"),j.validateWrapUpV2Payload(e.data,"wrapupV2"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(e):void 0}))}consultV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultV2","interactionId is not a valid UUID"),j.validateConsultDataV2Payload(e.data,"consultV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultV2(e)}))}consultEndV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEndV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEndV2","isConsult is not a valid boolean value"),e.isSecondaryEpDnAgent&&i.AssertUtils.check(j.validateBoolean(e.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),e.queueId&&i.AssertUtils.check(j.validateUUID(e.queueId),"consultEndV2","queueId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEndV2(e)}))}consultConferenceV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConferenceV2","interactionId is not a valid UUID"),j.validateConsultConferenceDataV2Payload(e.data,"consultConferenceV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConferenceV2(e)}))}exitConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"exitConference","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.exitConference(e)}))}consultTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"consultTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransferV2(e)}))}blindTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"blindTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransferV2(e)}))}vteamTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"vteamTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"vteamTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransferV2(e)}))}buddyAgentsV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgentsV2Payload(e.data,"buddyAgentsV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgentsV2(e)}))}dropConferenceParticipant(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"dropConferenceParticipant","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.dropConferenceParticipant(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const z=o(r,"[AgentContact JSAPI] =>"),H=o(z,"[AqmServiceEvents: Contact] => ");var W=n(4),J=n.n(W),$=n(10),Z=n.n($),Y=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const G={agentName:void 0,agentProfileID:void 0,agentSessionId:void 0,idleCode:void 0,teamId:void 0,teamName:void 0,dn:void 0,status:void 0,subStatus:void 0,idleCodes:void 0,wrapupCodes:void 0,outDialRegex:void 0,isOutboundEnabledForTenant:void 0,isOutboundEnabledForAgent:void 0,isEndCallEnabled:void 0,isEndConsultEnabled:void 0,allowConsultToQueue:void 0,isAdhocDialingEnabled:void 0,isAgentAvailableAfterOutdial:void 0,isCampaignManagementEnabled:void 0,agentPersonalStatsEnabled:void 0};class K{stateChangeByChannelType(e){throw new Error("Method not implemented.")}checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,n)=>{const i=e[n],r=this.latestData[n];return JSON.stringify(i)!==JSON.stringify(r)&&t.push({name:n,value:i,oldValue:r}),t},[]);t.length&&(t.forEach(e=>this.latestData[e.name]=e.value),this.emit("updated",t))}static getOutdialRegex(e){if(e&&e.dialPlanEntity){const t=e.dialPlanEntity.find(e=>"Any Format"===e.name);if(t)return t.regex}return""}constructor(e){this.emitter=J()(),this.listeners=new Set,this.teams=[],this.idleCodes={},this.latestData=Object.assign({},G),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const n=e.find(e=>e.teamId===t);return(null==n?void 0:n.teamName)||""}init(e){return Y(this,void 0,void 0,(function*(){e&&(this.SERVICE=e),this.checkService()&&(yield this.fetchLatestData(),this.subscribeSelfDataEvents(),this.logger.info("Inited"))}))}cleanup(){this.unsubscribeSelfDataEvents(),this.removeAllEventListeners(),this.SERVICE=void 0,this.update(Object.assign({},G)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,n,i,r,o,s;return Y(this,void 0,void 0,(function*(){const a=(null===(e=this.SERVICE)||void 0===e?void 0:e.conf.profile)?null===(t=this.SERVICE)||void 0===t?void 0:t.conf.profile:yield null===(n=this.SERVICE)||void 0===n?void 0:n.conf.fetchProfile();if(a){const{teams:e,agentName:t,agentProfileID:n,defaultDn:c,agentSubStatus:l,agentStatus:u,idleCodes:d,wrapupCodes:h,dialPlan:f,isOutboundEnabledForTenant:v,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:p,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:w,agentPersonalStatsEnabled:b}=a;let{idleCode:k}=a;const I=c;let A=u,C=l;if(this.teams=e,null==d||d.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}}),!k||!(null===(i=this.SERVICE)||void 0===i?void 0:i.conf.isReloginSuccess)){const e=yield null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.reload();(null==e?void 0:e.data)&&(k="0"!=e.data.auxCodeId&&e.data.auxCodeId?this.idleCodes[e.data.auxCodeId]:void 0,A=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.status,C=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.subStatus)}const O=K.getOutdialRegex(f);this.update({agentName:t,agentProfileID:n,dn:I,status:A,subStatus:C,idleCode:k,idleCodes:d,wrapupCodes:h,outDialRegex:O,isOutboundEnabledForTenant:v,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:p,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:w,agentPersonalStatsEnabled:b})}}))}subscribeSelfDataEvents(){var e,t,n,i,r,o;if(this.checkService()){{const t=null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.eAgentReloginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",dn:n="",status:i="",subStatus:r="",auxCodeId:o=""}})=>{const s=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:s,dn:n,status:i,subStatus:r,idleCode:this.idleCodes[o]})});this.listeners.add(()=>null==t?void 0:t.stopListen())}{const e=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.eAgentStationLoginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",status:n="",subStatus:i="",auxCodeId:r=""}})=>{const o=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,status:n,subStatus:i,idleCode:this.idleCodes[r]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:n="",auxCodeId:i=""}})=>{var r;const o=this.idleCodes?null===(r=this.idleCodes[i])||void 0===r?void 0:r.name:"";this.update({agentSessionId:e,status:t,subStatus:n,idleCode:{id:i,name:o}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.eAgentChannelReloginSuccess.listen(e=>{this.emit("eAgentChannelReloginSuccess",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(o=this.SERVICE)||void 0===o?void 0:o.aqm.agent.eAgentChannelStateChanged.listen(e=>{this.emit("eAgentChannelStateChanged",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(e){var t,n,r;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check("available"===(null===(t=e.state)||void 0===t?void 0:t.toLowerCase())||"idle"===(null===(n=e.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.stateChange({data:e})}))}stateChangeV2(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeId),"stateChange","auxCodeId is null or empty"),i.AssertUtils.check(j.validateStateChannelType(e.channelType),"stateChange","channelType is null or empty or invalid"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.stateChangeV2({data:e});r.info("stateChangeV2 - Service is not available")}))}mockOutdialAniList(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.mockOutdialAniList)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.mockOutdialAniList())}))}fetchAddressBooks(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.fetchAddressBooks)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.fetchAddressBooks())}))}changeAgentState(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(t,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:e,data:t})}))}fetchAgentIdleCodes(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchAgentIdleCodes","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:e,agentId:t})}))}fetchOrganizationIdleCodes(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(t=this.SERVICE)||void 0===t?void 0:t.abs.fetchIdleCodes({orgId:e,accessType:"ALL"})}))}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){Z()(this.emitter)}}const X=o(r,"[AgentInfo JSAPI] =>");var Q=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ee{waitUntil(e){return Q(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}constructor(e){this.initEventType={},this.emitter=J()(),this.logger=e.logger,this.agentxSERVICE=e.SERVICE}checkService(e){return Q(this,void 0,void 0,(function*(){e?(e.isInited||(this.logger.warn("SERVICE is not inited. Awaiting it's initAgentxServices(...)..."),yield this.waitUntil(()=>e.isInited)),this.logger.info("SERVICE is inited. Continuing..."),this.emit("inited")):this.logger.error("SERVICE is not defiend...")}))}emit(e,...t){this.emitter.emit(e,...t)}init(e){return Q(this,void 0,void 0,(function*(){this.agentxSERVICE?yield this.checkService(this.agentxSERVICE):this.logger.error("SERVICE is not defined..."),this.initEventType.widgetName=e.widgetName,this.initEventType.widgetProvider=e.widgetProvider,this.publishEvent("agentx-js-sdk-init")}))}registerCrmConnector(e){if(window.self!==window.top){this.initEventType.crmPlatform=e.crmPlatform,this.initEventType.crmConnectorProvider=e.crmConnectorProvider||"Cisco",r.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const t=document.referrer;r.info("This Desktop is loaded inside an iframe.",t),this.publishEvent("agentx-js-sdk-register-crm-connector")}else r.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:t,crmConnectorProvider:n,widgetName:i,widgetProvider:o}=this.initEventType,s=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",s),r.info(`Publishing js sdk init ${e} event : [widgetName: ${i}, widgetProvider: ${o}, crmPlatform: ${t}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(r.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},s)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return null!=window.navigator.languages?window.navigator.languages[0]:window.navigator.language}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}}const te=o(r,"[Config JSAPI] =>");var ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ie{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.dialer,aqmServiceEntityString:"SERVICE.aqm.dialer"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startOutdial(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateDialerTasks(e.data,"startOutdial"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.startOutdial(e)}))}previewCampaignAccept(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignAccept"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.acceptPreviewContact(e)}))}previewCampaignSkip(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignSkip"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.skipPreviewContact(e)}))}removePreviewContact(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"removePreviewContact"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.removePreviewContact(e)}))}updateCadVariables(e){var t,n,r,o,s;return ne(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"updateCadVariables","interactionId is not valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(n=null===(t=e.data)||void 0===t?void 0:t.attributes)||void 0===n?void 0:n.key),"updateCadVariables","attributes.key is not valid"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(o=null===(r=e.data)||void 0===r?void 0:r.attributes)||void 0===o?void 0:o.value),"updateCadVariables","attributes.value is not valid"),e.secureCad&&e.secureCad.forEach(e=>{i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e),"updateCadVariables","secureCad is not valid")}),e.keyId&&i.AssertUtils.check(j.validateUUID(e.keyId),"updateCadVariables","keyId is not valid UUID"),e.keyVersion&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.dialer.updateCadVariables(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const re=o(r,"[Dialer JSAPI] =>"),oe=o(re,"[AqmServiceEvents: Dialer] =>");class se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}createInstance(e){return i.I18N.createService(e)}createMixin(e){return i.I18N.createMixin(e)}get DEFAULT_INIT_OPTIONS(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.i18n.DEFAULT_INIT_OPTIONS}getMergedInitOptions(...e){return i.I18N.mergeServiceInitOptions(...e)}}const ae=o(r,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(e){const t=Object(i.createLogger)(e);return this.clientLoggers.set(e,t),this.logger.info(`Client logger created: "${e}"`),t}cleanupLogs(e){this.clientLoggers.has(e)&&i.Logger.POOL.cleanupPrefixedLogs(e)}browserDownloadLogsJson(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsJson(e)}browserDownloadLogsText(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsText(e)}getLogsCollection(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsCollection(e)}getLogsJsonUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsJsonUrl(e)}getLogsTextUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsTextUrl(e)}}const le=o(r,"[Logger JSAPI] =>");class ue{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.screenpop,aqmServiceEntityString:"SERVICE.aqm.screenpop"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const de=o(r,"[ScreenPop JSAPI] =>"),he=o(de,"[AqmServiceEvents: ScreenPop] =>");class fe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}listenKeyPress(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyPress(...e))}listenKeyConflict(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyConflict(...e))}listenConflictResolved(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenConflictResolved(...e))}register(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.register(...e))}unregisterKeys(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.unregisterKeys(...e))}getRegisteredKeys(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.getRegisteredKeys()}get DEFAULT_SHORTCUT_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.DEFAULT_SHORTCUT_KEYS}get MODIFIERS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.MODIFIERS}get REGISTERED_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.REGISTERED_KEYS}}const ve=o(r,"[ShortcutKey JSAPI] =>");var ge=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class pe{waitUntil(e){return ge(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}checkService(){var e,t,n,i,r;return ge(this,void 0,void 0,(function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(n=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===n?void 0:n.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.error),yield this.waitUntil(()=>{var e,t;return!(null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.error)})),this.logger.info("Websocket connection established successfully. Continue to subscribe...")):this.logger.error("issue in loading rtdwc")}))}constructor(e){this.emitter=J()(),this.logger=e.logger}init(){return ge(this,void 0,void 0,(function*(){yield this.checkService(),this.logger.info("rtdwc initialized")}))}subscribe({datasetName:e,update:t,error:n}){var i,r;return ge(this,void 0,void 0,(function*(){return yield this.checkService(),yield null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.subscribe({datasetName:e,update:t,error:n})}))}}const me=o(r,"[RTDWC JSAPI] =>");var ye=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ee{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.supervisor,aqmServiceEntityString:"SERVICE.aqm.supervisor"}),this.logger.info("[JSAPI] Monitoring Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.startMonitoring(e)}))}endMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(e)}))}holdMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(e)}))}unHoldMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(e)}))}bargeIn(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.bargeIn(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Se=o(r,"[Call Monitoring JSAPI] =>"),we=o(Se,"[AqmServiceEvents: Call Monitoring] =>");class be{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}trackBehavioralEvent(...e){var t;if(this.checkService())try{r.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(t=this.SERVICE)||void 0===t||t.webexMetrics.trackBehavioralEvent(...e)}catch(e){r.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const ke=o(r,"[webexMetrics Internal JSAPI] =>");var Ie=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ae{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(!this.checkService())return;const r=yield qe.actions.getTaskMap();if(0!==(null==r?void 0:r.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==e.data.logoutReason&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==e.data.logoutReason&&i.AssertUtils.check("user requested logout"===e.data.logoutReason.toLowerCase()||"inactivity Logout"===e.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent)||void 0===n?void 0:n.logout(e)}))}signoutAgent(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(this.checkService())try{return r.info("[App:TPW] event=signoutAgentBySupervisor for agent ",e.data.agentId),i.AssertUtils.check(j.validateUUID(e.orgId),"signoutAgent","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.agentId),"signoutAgent","agentId is not a valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.signoutAgent(e)}catch(t){r.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",e.data.agentId,t)}}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ce=o(r,"[Station Logout JSAPI] =>"),Oe=o(Ce,"[AqmServiceEvents: Call Monitoring] =>");class Te{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,n;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(n=(t=this.logger).warn)||void 0===n||n.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ue=o(r,"[AI Assistant JSAPI] =>"),Re=o(Ue,"[AqmServiceEvents: AiAssistant] =>");class Le{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,n;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.dataNotifs.aiAssistant,aqmServiceEntityString:"SERVICE.dataNotifs.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(n=(t=this.logger).warn)||void 0===n||n.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const xe=o(r,"[AI Assistant JSAPI] =>"),Ne=o(xe,"[AqmServiceEvents: AiAssistant] =>");var De=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Pe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(e){var t,n;return De(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.startTime),"fetchTasks","startTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.endTime),"fetchTasks","endTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.pageNumber),"fetchTasks","pageNumber is null or empty"),i.AssertUtils.check(j.validateNumber(e.startTime),"fetchTasks","startTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.endTime),"fetchTasks","endTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchTasks(e)}))}fetchCapture(e){var t,n;return De(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchCapture(e)}))}}const Me=o(r,"[PI JSAPI] =>");var Ve=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class _e{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] AgentConfigJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchPaginatedAuxCodes(e){var t,n;return Ve(this,void 0,void 0,(function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===n?void 0:n.fetchPaginatedAuxCodes(e)}))}}const je=o(r,"[AGENT CONFIG JSAPI] =>"),qe=(()=>{AGENTX_SERVICE?r.info('Found global "AGENTX_SERVICE"!'):r.error('Missed global "AGENTX_SERVICE"...');const e=(t=AGENTX_SERVICE,new ee({logger:te,SERVICE:t}));var t;const n=new ce({logger:le}),i=new fe({logger:ve,serviceChecker:a({logger:ve})}),o=new T({logger:U,serviceChecker:a({logger:U})}),s=new K({logger:X,serviceChecker:a({logger:X})}),c=new B({logger:z,serviceChecker:a({logger:z}),aqmEvents:L({logger:H})}),l=new ie({logger:re,aqmEvents:L({logger:oe}),serviceChecker:a({logger:re})}),u=new Ee({logger:Se,aqmEvents:L({logger:we}),serviceChecker:a({logger:Se})}),d=new ue({logger:de,aqmEvents:L({logger:he}),serviceChecker:a({logger:de})}),h=new Ae({logger:Ce,aqmEvents:L({logger:Oe}),serviceChecker:a({logger:Ce})}),f=new Te({logger:Ue,aqmEvents:L({logger:Re}),serviceChecker:a({logger:Ue})}),v=new Le({logger:xe,aqmEvents:L({logger:Ne}),serviceChecker:a({logger:xe})}),g=new se({logger:ae,serviceChecker:a({logger:ae})}),p=new pe({logger:me});p.init();const m=new Pe({logger:Me,serviceChecker:a({logger:Me})}),y=new _e({logger:je,serviceChecker:a({logger:je})}),E=new be({logger:ke,serviceChecker:a({logger:ke})});return e.addEventListener("inited",()=>{c.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),l.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),v.init(AGENTX_SERVICE),m.init(AGENTX_SERVICE),i.init(AGENTX_SERVICE),o.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE),E.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{c.cleanup(),s.cleanup(),l.cleanup(),u.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),v.cleanup(),m.cleanup(),i.cleanup(),g.cleanup(),o.cleanup(),y.cleanup(),E.cleanup()}),{config:e,logger:n,monitoring:u,shortcutKey:i,actions:o,agentContact:c,agentStateInfo:s,dialer:l,screenpop:d,aiAssistant:f,dataNotifsAiAssistant:v,i18n:g,rtdwc:p,postInteractions:m,logout:h,agentConfigJsApi:y,webexMetricsInternal:E}})()},function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return f})),n.d(t,"v3",(function(){return w})),n.d(t,"v4",(function(){return b})),n.d(t,"v5",(function(){return A}));var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function o(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}for(var s=[],a=0;a<256;++a)s[a]=(a+256).toString(16).substr(1);var c,l,u=function(e,t){var n=t||0,i=s;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},d=0,h=0;var f=function(e,t,n){var i=t&&n||0,r=t||[],s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:l;if(null==s||null==a){var f=e.random||(e.rng||o)();null==s&&(s=c=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==a&&(a=l=16383&(f[6]<<8|f[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:h+1,p=v-d+(g-h)/1e4;if(p<0&&void 0===e.clockseq&&(a=a+1&16383),(p<0||v>d)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=v,h=g,l=a;var m=(1e4*(268435455&(v+=122192928e5))+g)%4294967296;r[i++]=m>>>24&255,r[i++]=m>>>16&255,r[i++]=m>>>8&255,r[i++]=255&m;var y=v/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var E=0;E<6;++E)r[i+E]=s[E];return t||u(r)};var v=function(e,t,n){var i=function(e,i,r,o){var s=r&&o||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof i&&(i=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(i)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(i)||16!==i.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=n(i.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var c=0;c<16;++c)r[s+c]=a[c];return r||u(a)};try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i};function g(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function p(e,t,n,i,r,o){return g((s=g(g(t,e),g(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function m(e,t,n,i,r,o,s){return p(t&n|~t&i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return p(t&i|n&~i,e,t,r,o,s)}function E(e,t,n,i,r,o,s){return p(t^n^i,e,t,r,o,s)}function S(e,t,n,i,r,o,s){return p(n^(t|~i),e,t,r,o,s)}var w=v("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,i,r=[],o=32*e.length;for(t=0;t<o;t+=8)n=e[t>>5]>>>t%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),r.push(i);return r}(function(e,t){var n,i,r,o,s;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,c=-271733879,l=-1732584194,u=271733878;for(n=0;n<e.length;n+=16)i=a,r=c,o=l,s=u,a=m(a,c,l,u,e[n],7,-680876936),u=m(u,a,c,l,e[n+1],12,-389564586),l=m(l,u,a,c,e[n+2],17,606105819),c=m(c,l,u,a,e[n+3],22,-1044525330),a=m(a,c,l,u,e[n+4],7,-176418897),u=m(u,a,c,l,e[n+5],12,1200080426),l=m(l,u,a,c,e[n+6],17,-1473231341),c=m(c,l,u,a,e[n+7],22,-45705983),a=m(a,c,l,u,e[n+8],7,1770035416),u=m(u,a,c,l,e[n+9],12,-1958414417),l=m(l,u,a,c,e[n+10],17,-42063),c=m(c,l,u,a,e[n+11],22,-1990404162),a=m(a,c,l,u,e[n+12],7,1804603682),u=m(u,a,c,l,e[n+13],12,-40341101),l=m(l,u,a,c,e[n+14],17,-1502002290),c=m(c,l,u,a,e[n+15],22,1236535329),a=y(a,c,l,u,e[n+1],5,-165796510),u=y(u,a,c,l,e[n+6],9,-1069501632),l=y(l,u,a,c,e[n+11],14,643717713),c=y(c,l,u,a,e[n],20,-373897302),a=y(a,c,l,u,e[n+5],5,-701558691),u=y(u,a,c,l,e[n+10],9,38016083),l=y(l,u,a,c,e[n+15],14,-660478335),c=y(c,l,u,a,e[n+4],20,-405537848),a=y(a,c,l,u,e[n+9],5,568446438),u=y(u,a,c,l,e[n+14],9,-1019803690),l=y(l,u,a,c,e[n+3],14,-187363961),c=y(c,l,u,a,e[n+8],20,1163531501),a=y(a,c,l,u,e[n+13],5,-1444681467),u=y(u,a,c,l,e[n+2],9,-51403784),l=y(l,u,a,c,e[n+7],14,1735328473),c=y(c,l,u,a,e[n+12],20,-1926607734),a=E(a,c,l,u,e[n+5],4,-378558),u=E(u,a,c,l,e[n+8],11,-2022574463),l=E(l,u,a,c,e[n+11],16,1839030562),c=E(c,l,u,a,e[n+14],23,-35309556),a=E(a,c,l,u,e[n+1],4,-1530992060),u=E(u,a,c,l,e[n+4],11,1272893353),l=E(l,u,a,c,e[n+7],16,-155497632),c=E(c,l,u,a,e[n+10],23,-1094730640),a=E(a,c,l,u,e[n+13],4,681279174),u=E(u,a,c,l,e[n],11,-358537222),l=E(l,u,a,c,e[n+3],16,-722521979),c=E(c,l,u,a,e[n+6],23,76029189),a=E(a,c,l,u,e[n+9],4,-640364487),u=E(u,a,c,l,e[n+12],11,-421815835),l=E(l,u,a,c,e[n+15],16,530742520),c=E(c,l,u,a,e[n+2],23,-995338651),a=S(a,c,l,u,e[n],6,-198630844),u=S(u,a,c,l,e[n+7],10,1126891415),l=S(l,u,a,c,e[n+14],15,-1416354905),c=S(c,l,u,a,e[n+5],21,-57434055),a=S(a,c,l,u,e[n+12],6,1700485571),u=S(u,a,c,l,e[n+3],10,-1894986606),l=S(l,u,a,c,e[n+10],15,-1051523),c=S(c,l,u,a,e[n+1],21,-2054922799),a=S(a,c,l,u,e[n+8],6,1873313359),u=S(u,a,c,l,e[n+15],10,-30611744),l=S(l,u,a,c,e[n+6],15,-1560198380),c=S(c,l,u,a,e[n+13],21,1309151649),a=S(a,c,l,u,e[n+4],6,-145523070),u=S(u,a,c,l,e[n+11],10,-1120210379),l=S(l,u,a,c,e[n+2],15,718787259),c=S(c,l,u,a,e[n+9],21,-343485551),a=g(a,i),c=g(c,r),l=g(l,o),u=g(u,s);return[a,c,l,u]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}));var b=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var s=0;s<16;++s)t[i+s]=r[s];return t||u(r)};function k(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function I(e,t){return e<<t|e>>>32-t}var A=v("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var r=0;r<i.length;r++)e[r]=i.charCodeAt(r)}e.push(128);var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(r=0;r<s;r++){a[r]=new Array(16);for(var c=0;c<16;c++)a[r][c]=e[64*r+4*c]<<24|e[64*r+4*c+1]<<16|e[64*r+4*c+2]<<8|e[64*r+4*c+3]}for(a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295,r=0;r<s;r++){for(var l=new Array(80),u=0;u<16;u++)l[u]=a[r][u];for(u=16;u<80;u++)l[u]=I(l[u-3]^l[u-8]^l[u-14]^l[u-16],1);var d=n[0],h=n[1],f=n[2],v=n[3],g=n[4];for(u=0;u<80;u++){var p=Math.floor(u/20),m=I(d,5)+k(p,h,f,v)+g+t[p]+l[u]>>>0;g=v,v=f,f=I(h,30)>>>0,h=d,d=m}n[0]=n[0]+d>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+g>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))}])}));
|