@qikdev/sdk 0.1.191 → 0.1.200

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.
Files changed (58) hide show
  1. package/dist/main.js +2559 -1
  2. package/package.json +19 -11
  3. package/src/version.js +1 -1
  4. package/.gitlab-ci.yml +0 -24
  5. package/.nvmrc +0 -1
  6. package/dist/main.js.LICENSE.txt +0 -8
  7. package/jsdoc.conf +0 -10
  8. package/test/index.spec.js +0 -41
  9. package/test/mocha.opts +0 -0
  10. /package/{public → dist}/docs/access.html +0 -0
  11. /package/{public → dist}/docs/api.html +0 -0
  12. /package/{public → dist}/docs/auth.html +0 -0
  13. /package/{public → dist}/docs/cache.html +0 -0
  14. /package/{public → dist}/docs/content.html +0 -0
  15. /package/{public → dist}/docs/files.html +0 -0
  16. /package/{public → dist}/docs/filter.html +0 -0
  17. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  18. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  19. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  20. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  21. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  22. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  23. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  24. /package/{public → dist}/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  25. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  26. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  27. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  28. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  29. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  30. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  31. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  32. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  33. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  34. /package/{public → dist}/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  35. /package/{public → dist}/docs/index.html +0 -0
  36. /package/{public → dist}/docs/qik.access.js.html +0 -0
  37. /package/{public → dist}/docs/qik.api.js.html +0 -0
  38. /package/{public → dist}/docs/qik.auth.js.html +0 -0
  39. /package/{public → dist}/docs/qik.cache.js.html +0 -0
  40. /package/{public → dist}/docs/qik.content.js.html +0 -0
  41. /package/{public → dist}/docs/qik.core.js.html +0 -0
  42. /package/{public → dist}/docs/qik.files.js.html +0 -0
  43. /package/{public → dist}/docs/qik.filter.js.html +0 -0
  44. /package/{public → dist}/docs/qik.socket.js.html +0 -0
  45. /package/{public → dist}/docs/qik.system.js.html +0 -0
  46. /package/{public → dist}/docs/qik.utils.js.html +0 -0
  47. /package/{public → dist}/docs/scripts/collapse.js +0 -0
  48. /package/{public → dist}/docs/scripts/linenumber.js +0 -0
  49. /package/{public → dist}/docs/scripts/nav.js +0 -0
  50. /package/{public → dist}/docs/scripts/polyfill.js +0 -0
  51. /package/{public → dist}/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  52. /package/{public → dist}/docs/scripts/prettify/lang-css.js +0 -0
  53. /package/{public → dist}/docs/scripts/prettify/prettify.js +0 -0
  54. /package/{public → dist}/docs/scripts/search.js +0 -0
  55. /package/{public → dist}/docs/socket.html +0 -0
  56. /package/{public → dist}/docs/styles/jsdoc.css +0 -0
  57. /package/{public → dist}/docs/styles/prettify.css +0 -0
  58. /package/{public → dist}/docs/system.html +0 -0
package/dist/main.js CHANGED
@@ -1 +1,2559 @@
1
- (()=>{var t={669:(t,e,r)=>{t.exports=r(609)},448:(t,e,r)=>{"use strict";var n=r(867),o=r(26),i=r(327),a=r(97),s=r(109),u=r(985),c=r(61);t.exports=function(t){return new Promise((function(e,l){var f=t.data,p=t.headers;n.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password||"";p.Authorization="Basic "+btoa(d+":"+y)}var m=a(t.baseURL,t.url);if(h.open(t.method.toUpperCase(),i(m,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:t,request:h};o(e,l,n),h=null}},h.onabort=function(){h&&(l(c("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){l(c("Network Error",t,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),l(c(e,t,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var g=r(372),v=(t.withCredentials||u(m))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;v&&(p[t.xsrfHeaderName]=v)}if("setRequestHeader"in h&&n.forEach(p,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:h.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){h&&(h.abort(),l(t),h=null)})),void 0===f&&(f=null),h.send(f)}))}},609:(t,e,r)=>{"use strict";var n=r(867),o=r(849),i=r(321),a=r(185);function s(t){var e=new i(t),r=o(i.prototype.request,e);return n.extend(r,i.prototype,e),n.extend(r,e),r}var u=s(r(655));u.Axios=i,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(t){return Promise.all(t)},u.spread=r(713),t.exports=u,t.exports.default=u},263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},972:(t,e,r)=>{"use strict";var n=r(263);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,r)=>{"use strict";var n=r(867),o=r(327),i=r(782),a=r(572),s=r(185);function u(t){this.defaults=t,this.interceptors={request:new i,response:new i}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=s(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,r){return this.request(n.merge(r||{},{method:t,url:e}))}})),n.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,r,o){return this.request(n.merge(o||{},{method:t,url:e,data:r}))}})),t.exports=u},782:(t,e,r)=>{"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},97:(t,e,r)=>{"use strict";var n=r(793),o=r(303);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},61:(t,e,r)=>{"use strict";var n=r(481);t.exports=function(t,e,r,o,i){var a=new Error(t);return n(a,e,r,o,i)}},572:(t,e,r)=>{"use strict";var n=r(867),o=r(527),i=r(502),a=r(655);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(s(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},185:(t,e,r)=>{"use strict";var n=r(867);t.exports=function(t,e){e=e||{};var r={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,(function(t){void 0!==e[t]&&(r[t]=e[t])})),n.forEach(i,(function(o){n.isObject(e[o])?r[o]=n.deepMerge(t[o],e[o]):void 0!==e[o]?r[o]=e[o]:n.isObject(t[o])?r[o]=n.deepMerge(t[o]):void 0!==t[o]&&(r[o]=t[o])})),n.forEach(a,(function(n){void 0!==e[n]?r[n]=e[n]:void 0!==t[n]&&(r[n]=t[n])}));var s=o.concat(i).concat(a),u=Object.keys(e).filter((function(t){return-1===s.indexOf(t)}));return n.forEach(u,(function(n){void 0!==e[n]?r[n]=e[n]:void 0!==t[n]&&(r[n]=t[n])})),r}},26:(t,e,r)=>{"use strict";var n=r(61);t.exports=function(t,e,r){var o=r.config.validateStatus;!o||o(r.status)?t(r):e(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},527:(t,e,r)=>{"use strict";var n=r(867);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},655:(t,e,r)=>{"use strict";var n=r(867),o=r(16),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,u={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=r(448)),s),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){u.headers[t]=n.merge(i)})),t.exports=u},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},327:(t,e,r)=>{"use strict";var n=r(867);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var a=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,r)=>{"use strict";var n=r(867);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},985:(t,e,r)=>{"use strict";var n=r(867);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},16:(t,e,r)=>{"use strict";var n=r(867);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},109:(t,e,r)=>{"use strict";var n=r(867),o=["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"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},867:(t,e,r)=>{"use strict";var n=r(849),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:a,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return s(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return e},deepMerge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]="object"==typeof r?t({},r):r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return e},extend:function(t,e,r){return c(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},818:(t,e)=>{"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};"undefined"!=typeof window&&window.document,"undefined"!=typeof process&&null!=process.versions&&process.versions.node;"object"===("undefined"==typeof self?"undefined":r(self))&&self.constructor&&self.constructor.name,"undefined"!=typeof window&&"nodejs"===window.name||"undefined"!=typeof navigator&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),"undefined"!=typeof Deno&&Deno.core},924:(t,e,r)=>{"use strict";var n=r(210),o=r(559),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},559:(t,e,r)=>{"use strict";var n=r(612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},648:t=>{"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(e+i);for(var a,s=r.call(arguments,1),u=function(){if(this instanceof a){var e=i.apply(this,s.concat(r.call(arguments)));return Object(e)===e?e:this}return i.apply(t,s.concat(r.call(arguments)))},c=Math.max(0,i.length-s.length),l=[],f=0;f<c;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),i.prototype){var p=function(){};p.prototype=i.prototype,a.prototype=new p,p.prototype=null}return a}},612:(t,e,r)=>{"use strict";var n=r(648);t.exports=Function.prototype.bind||n},210:(t,e,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(t){return c}}}():c,f=r(405)(),p=Object.getPrototypeOf||function(t){return t.__proto__},h={},d="undefined"==typeof Uint8Array?n:p(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(r=p(o.prototype))}return y[e]=r,r},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(612),b=r(642),S=v.call(Function.call,Array.prototype.concat),x=v.call(Function.apply,Array.prototype.splice),w=v.call(Function.call,String.prototype.replace),A=v.call(Function.call,String.prototype.slice),j=v.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,_=function(t){var e=A(t,0,1),r=A(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return w(t,O,(function(t,e,r,o){n[n.length]=r?w(o,E,"$1"):e||t})),n},k=function(t,e){var r,n=t;if(b(g,n)&&(n="%"+(r=g[n])[0]+"%"),b(y,n)){var i=y[n];if(i===h&&(i=m(n)),void 0===i&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=_(t),n=r.length>0?r[0]:"",i=k("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],x(r,S([0,1],f)));for(var p=1,h=!0;p<r.length;p+=1){var d=r[p],m=A(d,0,1),g=A(d,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&h||(l=!0),b(y,s="%"+(n+="."+d)+"%"))c=y[s];else if(null!=c){if(!(d in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&p+1>=r.length){var v=u(c,d);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[d]}else h=b(c,d),c=c[d];h&&!l&&(y[s]=c)}}return c}},405:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(419);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},642:(t,e,r)=>{"use strict";var n=r(612);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},884:(t,e,r)=>{var n,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a="a-z\\xdf-\\xf6\\xf8-\\xff",s="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="["+u+"]",l="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",f="\\d+",p="["+a+"]",h="[^\\ud800-\\udfff"+u+f+"\\u2700-\\u27bf"+a+s+"]",d="\\ud83c[\\udffb-\\udfff]",y="[^\\ud800-\\udfff]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+s+"]",b="(?:"+p+"|"+h+")",S="(?:"+v+"|"+h+")",x="(?:['’](?:d|ll|m|re|s|t|ve))?",w="(?:['’](?:D|LL|M|RE|S|T|VE))?",A="(?:"+l+"|"+d+")?",j="[\\ufe0e\\ufe0f]?",O=j+A+"(?:\\u200d(?:"+[y,m,g].join("|")+")"+j+A+")*",E="(?:"+["[\\u2700-\\u27bf]",m,g].join("|")+")"+O,_="(?:"+[y+l+"?",l,m,g,"[\\ud800-\\udfff]"].join("|")+")",k=RegExp("['’]","g"),P=RegExp(l,"g"),T=RegExp(d+"(?="+d+")|"+_+O,"g"),C=RegExp([v+"?"+p+"+"+x+"(?="+[c,v,"$"].join("|")+")",S+"+"+w+"(?="+[c,v+b,"$"].join("|")+")",v+"?"+b+"+"+x,v+"+"+w,f,E].join("|"),"g"),z=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),F=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,L="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,R="object"==typeof self&&self&&self.Object===Object&&self,N=L||R||Function("return this")(),D=(n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(t){return null==n?void 0:n[t]});function I(t){return z.test(t)}var U=Object.prototype.toString,M=N.Symbol,B=M?M.prototype:void 0,$=B?B.toString:void 0;function W(t){return null==t?"":function(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==U.call(t)}(t))return $?$.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}var G,q=(G=function(t,e,r){return e=e.toLowerCase(),t+(r?H(W(e).toLowerCase()):e)},function(t){return function(t,e,r,n){for(var o=-1,i=t?t.length:0;++o<i;)r=e(r,t[o],o,t);return r}(function(t,e,r){return t=W(t),void 0===e?function(t){return F.test(t)}(t)?function(t){return t.match(C)||[]}(t):function(t){return t.match(o)||[]}(t):t.match(e)||[]}(function(t){return(t=W(t))&&t.replace(i,D).replace(P,"")}(t).replace(k,"")),G,"")}),H=("toUpperCase",function(t){var e,r,n,o,i=I(t=W(t))?function(t){return I(t)?function(t){return t.match(T)||[]}(t):function(t){return t.split("")}(t)}(t):void 0,a=i?i[0]:t.charAt(0),s=i?(e=i,r=1,o=e.length,n=void 0===n?o:n,!r&&n>=o?e:function(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}(e,r,n)).join(""):t.slice(1);return a.toUpperCase()+s});t.exports=q},208:(t,e,r)=>{var n,o="__lodash_hash_undefined__",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,s=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,f="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=f||p||Function("return this")(),d=Array.prototype,y=Function.prototype,m=Object.prototype,g=h["__core-js_shared__"],v=(n=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",b=y.toString,S=m.hasOwnProperty,x=m.toString,w=RegExp("^"+b.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=h.Symbol,j=d.splice,O=L(h,"Map"),E=L(Object,"create"),_=A?A.prototype:void 0,k=_?_.toString:void 0;function P(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function T(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function z(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function F(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function L(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){if(!U(t)||v&&v in t)return!1;var e=function(t){var e=U(t)?x.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?w:l;return e.test(function(t){if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(r)?r:void 0}P.prototype.clear=function(){this.__data__=E?E(null):{}},P.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},P.prototype.get=function(t){var e=this.__data__;if(E){var r=e[t];return r===o?void 0:r}return S.call(e,t)?e[t]:void 0},P.prototype.has=function(t){var e=this.__data__;return E?void 0!==e[t]:S.call(e,t)},P.prototype.set=function(t,e){return this.__data__[t]=E&&void 0===e?o:e,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(t){var e=this.__data__,r=z(e,t);return!(r<0||(r==e.length-1?e.pop():j.call(e,r,1),0))},T.prototype.get=function(t){var e=this.__data__,r=z(e,t);return r<0?void 0:e[r][1]},T.prototype.has=function(t){return z(this.__data__,t)>-1},T.prototype.set=function(t,e){var r=this.__data__,n=z(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},C.prototype.clear=function(){this.__data__={hash:new P,map:new(O||T),string:new P}},C.prototype.delete=function(t){return F(this,t).delete(t)},C.prototype.get=function(t){return F(this,t).get(t)},C.prototype.has=function(t){return F(this,t).has(t)},C.prototype.set=function(t,e){return F(this,t).set(t,e),this};var R=D((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(M(t))return k?k.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return s.test(t)&&r.push(""),t.replace(u,(function(t,e,n,o){r.push(n?o.replace(c,"$1"):e||t)})),r}));function N(t){if("string"==typeof t||M(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function D(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(D.Cache||C),r}D.Cache=C;var I=Array.isArray;function U(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function M(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==x.call(t)}t.exports=function(t,e,r){var n=null==t?void 0:function(t,e){var r;e=function(t,e){if(I(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!M(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}(e,t)?[e]:I(r=e)?r:R(r);for(var n=0,o=e.length;null!=t&&n<o;)t=t[N(e[n++])];return n&&n==o?t:void 0}(t,e);return void 0===n?r:n}},593:t=>{const e="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,r="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new i}abort(){this.signal.dispatchEvent("abort")}},n="function"==typeof AbortSignal,o="function"==typeof r.AbortSignal,i=n?AbortSignal:o?r.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if("abort"===t){this.aborted=!0;const e={type:t,target:this};this.onabort(e),this._listeners.forEach((t=>t(e)),this)}}onabort(){}addEventListener(t,e){"abort"===t&&this._listeners.push(e)}removeEventListener(t,e){"abort"===t&&(this._listeners=this._listeners.filter((t=>t!==e)))}},a=new Set,s=(t,e)=>{const r=`LRU_CACHE_OPTION_${t}`;l(r)&&f(r,`${t} option`,`options.${e}`,m)},u=(t,e)=>{const r=`LRU_CACHE_METHOD_${t}`;if(l(r)){const{prototype:n}=m,{get:o}=Object.getOwnPropertyDescriptor(n,t);f(r,`${t} method`,`cache.${e}()`,o)}},c=(...t)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...t):console.error(...t)},l=t=>!a.has(t),f=(t,e,r,n)=>{a.add(t),c(`The ${e} is deprecated. Please use ${r} instead.`,"DeprecationWarning",t,n)},p=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),h=t=>p(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?d:null:null;class d extends Array{constructor(t){super(t),this.fill(0)}}class y{constructor(t){if(0===t)return[];const e=h(t);this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class m{constructor(t={}){const{max:e=0,ttl:r,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:i,updateAgeOnHas:u,allowStale:f,dispose:d,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:b,maxSize:S=0,maxEntrySize:x=0,sizeCalculation:w,fetchMethod:A,fetchContext:j,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:E}=t,{length:_,maxAge:k,stale:P}=t instanceof m?{}:t;if(0!==e&&!p(e))throw new TypeError("max option must be a nonnegative integer");const T=e?h(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=S,this.maxEntrySize=x||this.maxSize,this.sizeCalculation=w||_,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=A||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=j,!this.fetchMethod&&void 0!==j)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new T(e),this.prev=new T(e),this.head=0,this.tail=0,this.free=new y(e),this.initialFill=1,this.size=0,"function"==typeof d&&(this.dispose=d),"function"==typeof g?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!O,0!==this.maxEntrySize){if(0!==this.maxSize&&!p(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!p(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!P,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!i,this.updateAgeOnHas=!!u,this.ttlResolution=p(n)||0===n?n:1,this.ttlAutopurge=!!o,this.ttl=r||k||0,this.ttl){if(!p(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";l(t)&&(a.add(t),c("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,m))}P&&s("stale","allowStale"),k&&s("maxAge","ttl"),_&&s("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new d(this.max),this.starts=new d(this.max),this.setItemTTL=(t,r,n=e.now())=>{if(this.starts[t]=0!==r?n:0,this.ttls[t]=r,0!==r&&this.ttlAutopurge){const e=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),r+1);e.unref&&e.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?e.now():0};let t=0;const r=()=>{const r=e.now();if(this.ttlResolution>0){t=r;const e=setTimeout((()=>t=0),this.ttlResolution);e.unref&&e.unref()}return r};this.getRemainingTTL=e=>{const n=this.keyMap.get(e);return void 0===n?0:0===this.ttls[n]||0===this.starts[n]?1/0:this.starts[n]+this.ttls[n]-(t||r())},this.isStale=e=>0!==this.ttls[e]&&0!==this.starts[e]&&(t||r())-this.starts[e]>this.ttls[e]}updateItemAge(t){}setItemTTL(t,e,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new d(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,e,r,n)=>{if(!p(r)){if(!n)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(e,t),!p(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(t,e)=>{this.sizes[t]=e;const r=this.maxSize-this.sizes[t];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,e){}requireSize(t,e,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.tail;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.head);)e=this.prev[e]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.head;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.tail);)e=this.next[e]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,e={}){for(const r of this.indexes())if(t(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],e)}forEach(t,e=this){for(const r of this.indexes())t.call(e,this.valList[r],this.keyList[r],this)}rforEach(t,e=this){for(const r of this.rindexes())t.call(e,this.valList[r],this.keyList[r],this)}get prune(){return u("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),t=!0);return t}dump(){const t=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],o=this.valList[r],i={value:this.isBackgroundFetch(o)?o.__staleWhileFetching:o};if(this.ttls){i.ttl=this.ttls[r];const t=e.now()-this.starts[r];i.start=Math.floor(Date.now()-t)}this.sizes&&(i.size=this.sizes[r]),t.unshift([n,i])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const t=Date.now()-n.start;n.start=e.now()-t}this.set(r,n.value,n)}}dispose(t,e,r){}set(t,e,{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,size:i=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL}={}){if(i=this.requireSize(t,e,i,a),this.maxEntrySize&&i>this.maxEntrySize)return this;let u=0===this.size?void 0:this.keyMap.get(t);if(void 0===u)u=this.newIndex(),this.keyList[u]=t,this.valList[u]=e,this.keyMap.set(t,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,i),s=!1;else{const r=this.valList[u];e!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():o||(this.dispose(r,t,"set"),this.disposeAfter&&this.disposed.push([r,t,"set"])),this.removeItemSize(u),this.valList[u]=e,this.addItemSize(u,i)),this.moveToTail(u)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),s||this.setItemTTL(u,r,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const e=this.head,r=this.keyList[e],n=this.valList[e];return this.isBackgroundFetch(n)?n.__abortController.abort():(this.dispose(n,r,"evict"),this.disposeAfter&&this.disposed.push([n,r,"evict"])),this.removeItemSize(e),t&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(r),this.size--,e}has(t,{updateAgeOnHas:e=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return void 0!==r&&!this.isStale(r)&&(e&&this.updateItemAge(r),!0)}peek(t,{allowStale:e=this.allowStale}={}){const r=this.keyMap.get(t);if(void 0!==r&&(e||!this.isStale(r))){const t=this.valList[r];return this.isBackgroundFetch(t)?t.__staleWhileFetching:t}}backgroundFetch(t,e,n,o){const i=void 0===e?void 0:this.valList[e];if(this.isBackgroundFetch(i))return i;const a=new r,s={signal:a.signal,options:n,context:o},u=new Promise((e=>e(this.fetchMethod(t,i,s)))).then((e=>(a.signal.aborted||this.set(t,e,s.options),e)),(r=>{if(this.valList[e]===u&&(n.noDeleteOnFetchRejection&&void 0!==u.__staleWhileFetching?this.valList[e]=u.__staleWhileFetching:this.delete(t)),u.__returned===u)throw r}));return u.__abortController=a,u.__staleWhileFetching=i,u.__returned=null,void 0===e?(this.set(t,u,s.options),e=this.keyMap.get(t)):this.valList[e]=u,u}isBackgroundFetch(t){return t&&"object"==typeof t&&"function"==typeof t.then&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||null===t.__returned)}async fetch(t,{allowStale:e=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:a=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,fetchContext:l=this.fetchContext,forceRefresh:f=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:e,updateAgeOnGet:r,noDeleteOnStaleGet:n});const p={allowStale:e,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:i,size:a,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c};let h=this.keyMap.get(t);if(void 0===h){const e=this.backgroundFetch(t,h,p,l);return e.__returned=e}{const n=this.valList[h];if(this.isBackgroundFetch(n))return e&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n;if(!f&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),n;const o=this.backgroundFetch(t,h,p,l);return e&&void 0!==o.__staleWhileFetching?o.__staleWhileFetching:o.__returned=o}}get(t,{allowStale:e=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet}={}){const o=this.keyMap.get(t);if(void 0!==o){const i=this.valList[o],a=this.isBackgroundFetch(i);if(this.isStale(o))return a?e?i.__staleWhileFetching:void 0:(n||this.delete(t),e?i:void 0);if(a)return;return this.moveToTail(o),r&&this.updateItemAge(o),i}}connect(t,e){this.prev[e]=t,this.next[t]=e}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return u("del","delete"),this.delete}delete(t){let e=!1;if(0!==this.size){const r=this.keyMap.get(t);if(void 0!==r)if(e=!0,1===this.size)this.clear();else{this.removeItemSize(r);const e=this.valList[r];this.isBackgroundFetch(e)?e.__abortController.abort():(this.dispose(e,t,"delete"),this.disposeAfter&&this.disposed.push([e,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(const t of this.rindexes({allowStale:!0})){const e=this.valList[t];if(this.isBackgroundFetch(e))e.__abortController.abort();else{const r=this.keyList[t];this.dispose(e,r,"delete"),this.disposeAfter&&this.disposed.push([e,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return u("reset","clear"),this.clear}get length(){return((t,e)=>{const r="LRU_CACHE_PROPERTY_length";if(l(r)){const{prototype:e}=m,{get:n}=Object.getOwnPropertyDescriptor(e,t);f(r,"length property","cache.size",n)}})("length"),this.size}static get AbortController(){return r}static get AbortSignal(){return i}}t.exports=m},631:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,x=String.prototype.toLowerCase,w=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,E=Math.floor,_="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function L(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-E(-t):E(t);if(n!==t){var o=String(n),i=v.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var R=r(654),N=R.custom,D=$(N)?N:null;function I(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function U(t){return b.call(String(t),/"/g,"&quot;")}function M(t){return!("[object Array]"!==q(t)||C&&"object"==typeof t&&C in t)}function B(t){return!("[object RegExp]"!==q(t)||C&&"object"==typeof t&&C in t)}function $(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return V(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return y?L(e,S):S}if("bigint"==typeof e){var w=String(e)+"n";return y?L(e,w):w}var E=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=E&&E>0&&"object"==typeof e)return M(e)?"[Array]":"[Object]";var k,N=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(H(o,e)>=0)return"[Circular]";function W(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return G(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!B(e)){var J=function(t){if(t.name)return t.name;var e=g.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Y(e,W);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if($(e)){var et=T?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(e);return"object"!=typeof e||T?et:Z(et)}if((k=e)&&"object"==typeof k&&("undefined"!=typeof HTMLElement&&k instanceof HTMLElement||"string"==typeof k.nodeName&&"function"==typeof k.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot<nt.length;ot++)rt+=" "+nt[ot].name+"="+I(U(nt[ot].value),"double",s);return rt+=">",e.childNodes&&e.childNodes.length&&(rt+="..."),rt+"</"+x.call(String(e.nodeName))+">"}if(M(e)){if(0===e.length)return"[]";var it=Y(e,W);return N&&!function(t){for(var e=0;e<t.length;e++)if(H(t[e],"\n")>=0)return!1;return!0}(it)?"["+X(it,N)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==q(t)||C&&"object"==typeof t&&C in t)}(e)){var at=Y(e,W);return"cause"in Error.prototype||!("cause"in e)||z.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+W(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(D&&"function"==typeof e[D]&&R)return R(e,{depth:E-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a.call(e,(function(t,r){st.push(W(r,e,!0)+" => "+W(t,e))})),K("Map",i.call(e),st,N)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l.call(e,(function(t){ut.push(W(t,e))})),K("Set",c.call(e),ut,N)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Q("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Q("WeakSet");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return Q("WeakRef");if(function(t){return!("[object Number]"!==q(t)||C&&"object"==typeof t&&C in t)}(e))return Z(W(Number(e)));if(function(t){if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}(e))return Z(W(_.call(e)));if(function(t){return!("[object Boolean]"!==q(t)||C&&"object"==typeof t&&C in t)}(e))return Z(d.call(e));if(function(t){return!("[object String]"!==q(t)||C&&"object"==typeof t&&C in t)}(e))return Z(W(String(e)));if(!function(t){return!("[object Date]"!==q(t)||C&&"object"==typeof t&&C in t)}(e)&&!B(e)){var ct=Y(e,W),lt=F?F(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&C&&Object(e)===e&&C in e?v.call(q(e),8,-1):ft?"Object":"",ht=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?ht+"{}":N?ht+"{"+X(ct,N)+"}":ht+"{ "+j.call(ct,", ")+" }"}return String(e)};var W=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return W.call(t,e)}function q(t){return y.call(t)}function H(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function V(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return V(v.call(t,0,e.maxStringLength),e)+n}return I(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+S.call(e.toString(16))}function Z(t){return"Object("+t+")"}function Q(t){return t+" { ? }"}function K(t,e,r,n){return t+" ("+e+") {"+(n?X(r,n):j.call(r,", "))+"}"}function X(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Y(t,e){var r=M(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,a="function"==typeof k?k(t):[];if(T){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in t)G(t,u)&&(r&&String(Number(u))===u&&u<t.length||T&&i["$"+u]instanceof Symbol||(w.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"==typeof k)for(var c=0;c<a.length;c++)z.call(t,a[c])&&n.push("["+e(a[c])+"]: "+e(t[a[c]],t));return n}},798:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,n="RFC3986";t.exports={default:n,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:n}},129:(t,e,r)=>{"use strict";var n=r(261),o=r(235),i=r(798);t.exports={formats:i,parse:o,stringify:n}},235:(t,e,r)=>{"use strict";var n=r(769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,r,n){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(t,e,r,n){for(var o=n?e:u(e,r),i=t.length-1;i>=0;--i){var a,s=t[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(l,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var r,c={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,f=e.parameterLimit===1/0?void 0:e.parameterLimit,p=l.split(e.delimiter,f),h=-1,d=e.charset;if(e.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?d="utf-8":"utf8=%26%2310003%3B"===p[r]&&(d="iso-8859-1"),h=r,r=p.length);for(r=0;r<p.length;++r)if(r!==h){var y,m,g=p[r],v=g.indexOf("]="),b=-1===v?g.indexOf("="):v+1;-1===b?(y=e.decoder(g,a.decoder,d,"key"),m=e.strictNullHandling?null:""):(y=e.decoder(g.slice(0,b),a.decoder,d,"key"),m=n.maybeMap(u(g.slice(b+1),e),(function(t){return e.decoder(t,a.decoder,d,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===d&&(m=s(m)),g.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(c,y)?c[y]=n.combine(c[y],m):c[y]=m}return c}(t,r):t,f=r.plainObjects?Object.create(null):{},p=Object.keys(l),h=0;h<p.length;++h){var d=p[h],y=c(d,l[d],r,"string"==typeof t);f=n.merge(f,y,r)}return!0===r.allowSparse?f:n.compact(f)}},261:(t,e,r)=>{"use strict";var n=r(478),o=r(769),i=r(798),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,f=function(t,e){l.apply(t,u(e)?e:[e])},p=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},y={},m=function t(e,r,i,a,s,l,p,h,m,g,v,b,S,x,w,A){for(var j,O=e,E=A,_=0,k=!1;void 0!==(E=E.get(y))&&!k;){var P=E.get(e);if(_+=1,void 0!==P){if(P===_)throw new RangeError("Cyclic object value");k=!0}void 0===E.get(y)&&(_=0)}if("function"==typeof h?O=h(r,O):O instanceof Date?O=v(O):"comma"===i&&u(O)&&(O=o.maybeMap(O,(function(t){return t instanceof Date?v(t):t}))),null===O){if(s)return p&&!x?p(r,d.encoder,w,"key",b):r;O=""}if("string"==typeof(j=O)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||o.isBuffer(O)){if(p){var T=x?r:p(r,d.encoder,w,"key",b);if("comma"===i&&x){for(var C=c.call(String(O),","),z="",F=0;F<C.length;++F)z+=(0===F?"":",")+S(p(C[F],d.encoder,w,"value",b));return[S(T)+(a&&u(O)&&1===C.length?"[]":"")+"="+z]}return[S(T)+"="+S(p(O,d.encoder,w,"value",b))]}return[S(r)+"="+S(String(O))]}var L,R=[];if(void 0===O)return R;if("comma"===i&&u(O))L=[{value:O.length>0?O.join(",")||null:void 0}];else if(u(h))L=h;else{var N=Object.keys(O);L=m?N.sort(m):N}for(var D=a&&u(O)&&1===O.length?r+"[]":r,I=0;I<L.length;++I){var U=L[I],M="object"==typeof U&&void 0!==U.value?U.value:O[U];if(!l||null!==M){var B=u(O)?"function"==typeof i?i(D,U):D:D+(g?"."+U:"["+U+"]");A.set(e,_);var $=n();$.set(y,A),f(R,t(M,B,i,a,s,l,p,h,m,g,v,b,S,x,w,$))}}return R};t.exports=function(t,e){var r,o=t,c=function(t){if(!t)return d;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||d.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==t.format){if(!a.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=i.formatters[r],o=d.filter;return("function"==typeof t.filter||u(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===t.allowDots?d.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:d.charsetSentinel,delimiter:void 0===t.delimiter?d.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:d.encode,encoder:"function"==typeof t.encoder?t.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:d.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:d.strictNullHandling}}(e);"function"==typeof c.filter?o=(0,c.filter)("",o):u(c.filter)&&(r=c.filter);var l,p=[];if("object"!=typeof o||null===o)return"";l=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var h=s[l];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===h&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var g=n(),v=0;v<r.length;++v){var b=r[v];c.skipNulls&&null===o[b]||f(p,m(o[b],b,h,y,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var S=p.join(c.delimiter),x=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),S.length>0?x+S:""}},769:(t,e,r)=>{"use strict";var n=r(798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],a=o.obj[o.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:a,prop:c}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,o,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var a=e;return i(e)&&!i(r)&&(a=s(e,n)),i(e)&&i(r)?(r.forEach((function(r,i){if(o.call(e,i)){var a=e[i];a&&"object"==typeof a&&r&&"object"==typeof r?e[i]=t(a,r,n):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var a=r[i];return o.call(e,i)?e[i]=t(e[i],a,n):e[i]=a,e}),a)}}},478:(t,e,r)=>{"use strict";var n=r(210),o=r(924),i=r(631),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),y=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return d(e,n)}else if(r)return function(t,e){return!!y(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),h(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=y(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},654:()=>{}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{"use strict";var t=r(669);r(129),t.CancelToken;var e=r(208),n=r(884);r(818);const o={},i={};o.loadExternalScript=function(t){return i[t]?i[t]:i[t]=new Promise((function(e,r){if(!document)return delete i[t],r("document is undefined");var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.onload=function(){return console.log("Loaded external script",t),e(t)},n.src=t,document.head.appendChild(n)}))};const a={};o.loadExternalStyle=function(t){return new Promise((function(e,r){if(!document)return r("document is undefined");if(a[t])return e(t);a[t]=!0;var n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",t),n.onload=function(){return console.log("Loaded external stylesheet",t),e(t)},document.head.appendChild(n)}))},o.exists=function(t){var e;if(Array.isArray(t))return!0;if(0===t)return!0;switch(typeof t){case"undefined":case"null":e=!0;break;default:switch(String(t).toLowerCase()){case"":case"undefined":case"null":e=!0}}return!e},o.parseDate=function(t){if(t){if(t instanceof Date)return t;var e=new Date(t);return e instanceof Date&&!isNaN(e)?e:void 0}},o.parseURL=function(t){if(!t)return!1;if(t.startsWith("/"))return t;if(t.startsWith("://"))return t;if(t.startsWith("mailto:"))return t;if(t.startsWith("tel:"))return t;if(t.startsWith("sms:"))return t;var e=o.parseEmail(t);if(e&&e===t)return`mailto:${e}`;const r=t=>/^https?:\/\//i.test(t)?t:`http://${t}`;return t=(t=r(t)).replace(/\s/g,""),!!RegExp("(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*(\\?[;&a-z\\d%_.~+=-@]*)?(\\#[-a-z\\d_@]*)?$","i").test(t)&&r(t)},o.parseNumber=function(t,e){if(!t)return 0;if(t=Number(t),isNaN(t))return 0;if(e){var r=t.toFixed(e);t=o.parseNumber(r)}return t},o.isValidEmailAddress=function(t){if(!t)return!1;var e=t.split("@");if(2!==e.length)return!1;var r=e[0],n=e[1];return!(r.length>64||n.length>255||n.split(".").some((function(t){return t.length>63}))||!/^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/.test(t))},o.parseEmail=function(t){if(!t)return!1;var e=String(t).toLowerCase();return!!o.isValidEmailAddress(e)&&e},o.parseInt=function(t){return t?(t=parseInt(t),isNaN(t)?0:t):0},o.cleanValue=function(t,e,r){r||(r={});var n=o.exists(t);if(r.strict&&n&&"boolean"!=e)return t;switch(e){case"reference":return o.id(t,!0);case"boolean":return o.parseBoolean(t);case"url":return o.parseURL(t);case"key":return o.machineName(t);case"email":return o.parseEmail(t);case"date":var i=o.parseDate(t,r);return void 0===i?void 0:i;case"number":case"decimal":case"float":var a=o.parseNumber(t);return String(a)==String(Number(t))?a:void 0;case"integer":return a=o.parseInt(t),String(a)==String(parseInt(t))?a:void 0;case"group":return t;case"object":return"object"!=typeof t||null===t||Array.isArray(t)?void 0:t;case"string":if(o.exists(t)){var s=String(t);if("[object Object]"==s)return;return s}return;default:return String(t)}},o.isValidValue=function(t,e,r){var n="number"==typeof t,i=!1;if(!o.exists(t))return!1;switch(e){case"url":i=r?t.startsWith("/")||t.startsWith("://")||t.startsWith("http://")||t.startsWith("https://"):String(t)===o.parseURL(t);break;case"key":i=String(t)===o.machineName(t);break;case"date":return(!r||"object"==typeof t&&t instanceof Date)&&void 0!==o.parseDate(t);case"email":i=r?t===o.parseEmail(t):String(t).toLowerCase()===o.parseEmail(t);break;case"number":case"decimal":case"float":i=r?n&&Number(t)===o.parseNumber(t):Number(t)===o.parseNumber(t);break;case"integer":i=r?n&&Number(t)===o.parseInt(t):Number(t)===o.parseInt(t);break;case"boolean":var a=o.parseBoolean(t);r?!0!==t&&!1!==t||(i=t===a):i=!0===a||!1===a;break;case"reference":i=r?String(t)===o.id(t):!!o.id(t);break;case"string":var s=String(t);if(r&&"string"!=typeof t)return!1;if("[object Object]"==s)return!1;i=!0;break;case"object":i="object"==typeof t&&null!==t&&!Array.isArray(t);break;case"array":i=Array.isArray(t)}return i},o.parseBoolean=function(t){switch(String(t).toLowerCase()){case"true":case"y":case"yes":case"1":case"t":t=!0;break;case"false":case"n":case"no":case"0":case"f":case"undefined":case"null":case"":case"-1":t=!1}return!!t},o.clone=function(t){return JSON.parse(JSON.stringify(t))},o.getAllFields=function(t){const e="profile"===t.definesType||"profile"===t.key,r="submission"===t.definesType;var n=[...t.fields],i=t.definedFields||[];if(i.length)if(r){var a={title:"Form Data",minimum:1,maximum:1,key:"formData",asObject:!0,type:"group",fields:i};n.push(a);var s={title:"Data",minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:i.map((function(t){return"reference"===t.type&&delete(t=JSON.parse(JSON.stringify(t))).fields,t}))};n.push(s)}else s={title:`${t.title}`,minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:i},n.push(s);return e&&(n.push({title:"Age",key:"_age",minimum:1,maximum:1,type:"integer"}),n.push({title:"Date of birth",key:"_dob",minimum:1,maximum:1,type:"date"})),o.mapFields(n).filter((function(t){return!("group"==t.type&&t.asObject&&1==t.minimum&&1==t.maximum)})).map((function(t){return t.title=t.filterTitle||t.titles.filter(Boolean).join(" › "),t})).sort((function(t,e){return t.title<e.title?-1:1}))},o.mapFields=function(t,e){e||(e={});var r=[],n=[],i=[],a=1,s=e.depth,u=e.arrayDelimeter||"[]";return t.forEach((function t(c,l){var f=c.key,p="group"==c.type,h=c.minimum===c.maximum&&1===c.minimum,d=c.asObject,y=p&&!d,m=e.original?c:o.clone(c);m.trail=n.slice(),m.trail.push(f),m.path=m.trail.join("."),m.titles=i.slice(),m.titles.push(c.filterTitle||c.title||""),y&&!e.includeLayout||r.push(m);var g=s&&a>=s;if(c.fields&&c.fields.length)if(y)c.fields.forEach(t);else{if(g)return;a++;let r=f;e.includeArrayDelimeter&&(h||(r=`${f}${u}`)),n.push(r),i.push(c.filterTitle||c.title),c.fields.forEach(t),a--,n.pop(),i.pop()}})),r},o.mapParameters=function(t){t=t||{};var e=[];return Object.entries(t).forEach((function([t,r]){null!=r&&0!=r&&(Array.isArray(r)?r.forEach((function(r){e.push(`${t}=${encodeURIComponent(r)}`)})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)))})),e.join("&")},o.formatCurrency=function(t,e,r){return t&&!isNaN(t)||(t=0),r=r||2,`${o.currencySymbol(e)}${parseFloat(Number(t)/100).toFixed(r)}`},o.getTypeFromID=function(t){if(t=o.id(t))return{21:"organisation",23:"comment",24:"persona",25:"audio",26:"campaign",28:"smartlist",29:"cache",40:"application",41:"action",42:"billinginvoice",43:"componentsnapshot",44:"diff",45:"email",46:"submission",49:"import",53:"socket",54:"timetrigger",61:"article",63:"component",65:"event",66:"file",67:"tag",69:"image",70:"profile",72:"role",73:"scope",74:"transaction",75:"user",76:"video",77:"workflowcard",78:"variable","3c":"patoken","7b":"uatoken","7d":"urtoken","2d":"systemtask","3d":"export","5f":"systemflag","2b":"batch","3a":"log","2e":"stat","2f":"unsubscribe","6b":"intent","7c":"upload","2c":"systemtrigger","6e":"interface","4e":"interfacesnapshot","4f":"notification","2a":"definition","7e":"definitionsnapshot","5e":"integration","4c":"listener","6d":"topic","7a":"code","4d":"paymentmethod","6c":"sslcertificate"}[t.slice(8,10)]},o.currencySymbol=function(t){switch(t=String(t).toLowerCase(),String(t).toLowerCase()){case"gbp":return"£";case"eur":return"€";default:return"$"}},o.getAvailableCurrencies=function(t){var e=[];if(e.push({name:`USD (${o.currencySymbol("usd")})`,value:"usd",countryCode:{US:!0}}),e.push({name:`GBP (${o.currencySymbol("gbp")})`,value:"gbp",countryCode:{GB:!0,UK:!0}}),e.push({name:`CAD (${o.currencySymbol("cad")})`,value:"cad",countryCode:{CA:!0}}),e.push({name:`AUD (${o.currencySymbol("aud")})`,value:"aud",countryCode:{AU:!0}}),e.push({name:`NZD (${o.currencySymbol("nzd")})`,value:"nzd",countryCode:{NZ:!0}}),e.push({name:`SGD (${o.currencySymbol("sgd")})`,value:"sgd",countryCode:{SG:!0}}),t){var r=e.findIndex((function(e){return e.countryCode[t]}));const n=(t,e,r)=>{const n=[...t];return n.splice(r,0,...n.splice(e,1)),n};-1!=r&&(e=n(e,r,0))}return e},o.hash=function(t,r){return(t=Array.isArray(t)?t:[]).reduce((function(t,n){return t[r?e(n,r):n]=n,t}),{})},o.extractFromArray=function(t,r,n,o,i,a,s){s=s||{},n&&(s.sum=n),o&&(s.flatten=!0),i&&(s.unique=!0),a&&(s.excludeNull=!0);var u=t.reduce((function(t,n){var o=e(n,r),i=!o&&!1!==o&&0!==o;return s.excludeNull&&i||t.push(o),t}),[]);return s.flatten&&(u=u.flat()),s.unique&&(u=[...new Set(u)]),s.sum&&(u=u.reduce((function(t,e){return t+e}),0)),u},o.matchInArray=function(t,r,n,o){return t.filter((function(t){var i,a=e(t,r);switch(o){case"in":i=a.includes(n);break;case">=":i=a>=n;break;case"<=":i=a<=n;break;case"<":i=a<n;break;case">":i=a>n;break;default:i=void 0===n?a:a==n}return i}))},o.comma=function(t,r,n){return n&&(t=t.slice(0,n)),t.filter((function(t){return null!=t&&void 0!==t&&""!==t})).map((function(t){return r&&r.length?e(t,r):t})).join(", ")},o.id=function(t){var e;if(t&&(e=t._id?String(t._id):String(t),o.isValidID(e)))return e},o.ids=function(t){return t?Object.keys(t.reduce((function(t,e){if(!e)return t;var r=o.id(e);return r&&(t[r]=1),t}),{})):[]},o.isValidID=function(t){return new RegExp("^[0-9a-fA-F]{24}$").test(String(t))},o.errorMessage=function(t){var r;if(t)return Array.isArray(t)&&(t=t[0]),["response.data.message","response.data","message"].forEach((function(n){if(!r){var o=e(t,n);o&&(r=o)}})),Array.isArray(r)&&(r=r[0]),r=r||JSON.stringify(t)},o.guid=function(){var t=(new Date).getTime().toString(16)+Math.random().toString(16).substring(2)+"0".repeat(16);return t.substr(0,8)+"-"+t.substr(8,4)+"-4000-8"+t.substr(12,3)+"-"+t.substr(15,12)},o.machineName=function(t){if(t&&t.length){var e=String(t).replace(/[^a-zA-Z0-9-_]+/g," ").trim();return n(e)}};var s={};function u(t){return!(0===t||null!=t&&""!==String(t).trim()&&"undefined"!==t&&"null"!==t)}function c(t){return!u(t)}s.cleanKey=function(t){return"."==(t=String(t).split("|")[0])[0]&&(t=t.slice(1)),t},s.isValidFilter=function(t){if(!t)return!1;if(t.operator)return!(!t.filters||!t.filters.length)&&t.filters.some(s.isValidFilter);if(!s.cleanKey(t.key))return!1;switch(t.comparator){case"empty":case"notempty":case"datetoday":case"datenottoday":case"datebeforetoday":case"dateaftertoday":case"dateweektoday":case"datemonthtoday":case"datebeforenow":case"dateafternow":case"datethisweek":case"datethismonth":return!0}var e=(t.values||[]).filter(c);return!u(t.value)||!u(t.value2)||e.length},s.activeFilters=function(t){var e=[];return function t(e,r){e&&(s.isValidFilter(e)&&r.push(e),e.filters&&e.filters.length&&e.filters.forEach((function(e){t(e,r)})))}(t,e),e},s.activeFilterKeys=function(t,e){e=e||{};var r=s.activeFilters(t).filter((function(t){return!t.operator})).reduce((function(t,r){var n=s.cleanKey(r.key);return!1!==e.trimArrayDelimeters&&(n=n.split("[]").join("")),t[n]=!0,t}),{});return Object.keys(r)},s.activeFilterComparators=function(t){var e=s.activeFilters(t).filter((function(t){return!t.operator})).reduce((function(t,e){return t[e.comparator]=!0,t}),{});return Object.keys(e)},s.activeFilterOperators=function(t){var e=s.activeFilters(t).filter((function(t){return t.operator})).reduce((function(t,e){return t[e.operator]=!0,t}),{});return Object.keys(e)},s.activeFilterValues=function(t,e){function r(t){if(t)return t._id||t.id||t.title||t.name||t}return e=e||{},s.activeFilters(t).filter((function(t){return!t.operator})).reduce((function(t,e){return[...t,...(e.values||[]).map(r),r(e.value),r(e.value2)]}),[]).filter(c)},s.filterChangeString=function(t){var e=s.activeFilters(t);return JSON.stringify(e)},r(593),console.log("qik 0.1.191")})()})();
1
+ import P from "axios";
2
+ import _ from "qs";
3
+ import { Cache as K } from "axios-extensions";
4
+ import k from "lodash.get";
5
+ import D from "lodash.camelcase";
6
+ import "browser-or-node";
7
+ const B = "0.1.200", z = P.CancelToken;
8
+ var J = function(e) {
9
+ var a;
10
+ typeof window < "u" && (a = e.cache.get("api"));
11
+ const t = P.defaults.adapter;
12
+ function n(o) {
13
+ var u = [
14
+ o.method,
15
+ o.url,
16
+ o.headers?.Authorization,
17
+ o.headers.Accept,
18
+ JSON.stringify({
19
+ params: o.params,
20
+ data: o.data
21
+ })
22
+ ].filter(Boolean).join("-");
23
+ return u;
24
+ }
25
+ const r = {}, f = d(function(o) {
26
+ var u = n(o);
27
+ return r[u] || (r[u] = new Promise(function(i, s) {
28
+ var l, h;
29
+ switch (String(o.method).toLowerCase()) {
30
+ case "post":
31
+ case "patch":
32
+ case "put":
33
+ case "delete":
34
+ o.cache || (o.cache = !1);
35
+ break;
36
+ }
37
+ return o.cache === !1 || (l = o.cache || a, l && (h = l.get(u))), h ? i(h) : (Object.assign(o, { adapter: t }), P.request(o).then(
38
+ function(m) {
39
+ delete r[u], i(m);
40
+ },
41
+ function(m) {
42
+ delete r[u], s(m);
43
+ }
44
+ ));
45
+ })), r[u];
46
+ });
47
+ f.generateEndpointURL = function(o, u, i) {
48
+ i = i || {}, u = u || {};
49
+ var s;
50
+ const l = i.file && e.fileAPI || e.apiURL;
51
+ i.withoutToken || (delete u.access_token, s = e.auth.getCurrentToken()), o[0] == "/" && o.slice(1);
52
+ var h = e.utils.mapParameters(u);
53
+ s ? h = h ? `?access_token=${s}&${h}` : `?access_token=${s}` : h = h ? `?${h}` : "";
54
+ var m = `${l}${o}${h}`;
55
+ return m;
56
+ }, f.wasCancelled = function(o) {
57
+ return P.isCancel(o);
58
+ };
59
+ function d(o) {
60
+ var u = P.create({
61
+ paramsSerializer: (s) => _.stringify(s, { arrayFormat: "repeat" }),
62
+ adapter: o
63
+ });
64
+ u.defaults.baseURL = e.apiURL, u.defaults.headers.common.Accept = "application/json", u.interceptors.request.use(function(s) {
65
+ if (n(s), s.withoutToken)
66
+ return s;
67
+ if (s.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
68
+ const h = Intl.DateTimeFormat().resolvedOptions().timeZone;
69
+ h && (s.headers["qik-request-timezone"] = h);
70
+ }
71
+ s.headers["qik-api-version"] = B, e?.socket?.windowID && (s.headers["qik-socket-window"] = e.socket.windowID);
72
+ var l = e.auth.getCurrentToken();
73
+ return l && (s.headers.Authorization = `Bearer ${l}`, s.params && s.params.access_token && delete s.params.access_token), s;
74
+ });
75
+ let i = 0;
76
+ return u.interceptors.response.use(
77
+ function(s) {
78
+ var l = s.config, h = s.status;
79
+ switch (h) {
80
+ case 204:
81
+ if (i < 5)
82
+ return i++, new Promise(function(m, g) {
83
+ setTimeout(function() {
84
+ return u.request(l).then(m, g);
85
+ }, 800);
86
+ });
87
+ console.log("Failed after 5 retries"), i = 0;
88
+ break;
89
+ }
90
+ return s;
91
+ },
92
+ function(s) {
93
+ if (P.isCancel(s))
94
+ return Promise.reject(s);
95
+ var l = s?.response?.status || s.status;
96
+ switch (l) {
97
+ case 401:
98
+ break;
99
+ case 502:
100
+ case 504:
101
+ if (i < 5)
102
+ return i++, new Promise(function(h, m) {
103
+ setTimeout(function() {
104
+ return u.request(s.config).then(h, m);
105
+ }, 800);
106
+ });
107
+ console.log("Failed after 5 retries"), i = 0;
108
+ break;
109
+ }
110
+ return Promise.reject(s);
111
+ }
112
+ ), u;
113
+ }
114
+ return f.CancelToken = z, f.axios = P, f;
115
+ };
116
+ const A = {}, I = {};
117
+ A.loadExternalScript = function(e) {
118
+ if (I[e])
119
+ return I[e];
120
+ const a = I[e] = new Promise(t);
121
+ function t(n, r) {
122
+ if (!document)
123
+ return delete I[e], r("document is undefined");
124
+ var c = document.createElement("script");
125
+ c.type = "text/javascript", c.async = !0, c.onload = function() {
126
+ return console.log("Loaded external script", e), n(e);
127
+ }, c.src = e, document.head.appendChild(c);
128
+ }
129
+ return a;
130
+ };
131
+ const x = {};
132
+ A.loadExternalStyle = function(e) {
133
+ const a = new Promise(t);
134
+ function t(n, r) {
135
+ if (!document)
136
+ return r("document is undefined");
137
+ if (x[e])
138
+ return n(e);
139
+ x[e] = !0;
140
+ var c = document.createElement("link");
141
+ c.setAttribute("rel", "stylesheet"), c.setAttribute("type", "text/css"), c.setAttribute("href", e), c.onload = function() {
142
+ return console.log("Loaded external stylesheet", e), n(e);
143
+ }, document.head.appendChild(c);
144
+ }
145
+ return a;
146
+ };
147
+ A.exists = function(e) {
148
+ var a;
149
+ if (Array.isArray(e) || e === 0)
150
+ return !0;
151
+ switch (typeof e) {
152
+ case "undefined":
153
+ case "null":
154
+ a = !0;
155
+ break;
156
+ default:
157
+ var t = String(e).toLowerCase();
158
+ switch (t) {
159
+ case "":
160
+ case "undefined":
161
+ case "null":
162
+ a = !0;
163
+ break;
164
+ }
165
+ break;
166
+ }
167
+ return !a;
168
+ };
169
+ A.parseDate = function(e) {
170
+ if (e) {
171
+ if (e instanceof Date)
172
+ return e;
173
+ var a = new Date(e), t = a instanceof Date && !isNaN(a);
174
+ if (t)
175
+ return a;
176
+ }
177
+ };
178
+ A.parseURL = function(e) {
179
+ if (!e)
180
+ return !1;
181
+ if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
182
+ return e;
183
+ var t = A.parseEmail(e);
184
+ if (t && t === e)
185
+ return `mailto:${t}`;
186
+ const n = (c) => /^https?:\/\//i.test(c) ? c : `http://${c}`;
187
+ e = n(e), e = e.replace(/\s/g, "");
188
+ var r = RegExp(
189
+ "(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*(\\?[;&a-z\\d%_.~+=-@]*)?(\\#[-a-z\\d_@]*)?$",
190
+ "i"
191
+ ).test(e);
192
+ return r ? n(e) : !1;
193
+ };
194
+ A.parseNumber = function(e, a) {
195
+ if (!e || (e = Number(e), isNaN(e)))
196
+ return 0;
197
+ if (a) {
198
+ var t = e.toFixed(a);
199
+ e = A.parseNumber(t);
200
+ }
201
+ return e;
202
+ };
203
+ A.isValidEmailAddress = function(e) {
204
+ var a = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
205
+ if (!e) return !1;
206
+ var t = e.split("@");
207
+ if (t.length !== 2) return !1;
208
+ var n = t[0], r = t[1];
209
+ if (n.length > 64) return !1;
210
+ if (r.length > 255) return !1;
211
+ var c = r.split(".");
212
+ return !(c.some(function(f) {
213
+ return f.length > 63;
214
+ }) || !a.test(e));
215
+ };
216
+ A.parseEmail = function(e) {
217
+ if (!e)
218
+ return !1;
219
+ var a = String(e).toLowerCase(), t = A.isValidEmailAddress(a);
220
+ return t ? a : !1;
221
+ };
222
+ A.parseInt = function(e) {
223
+ return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
224
+ };
225
+ A.cleanValue = function(e, a, t) {
226
+ t || (t = {});
227
+ var n = A.exists(e);
228
+ if (t.strict && n && a != "boolean")
229
+ return e;
230
+ switch (a) {
231
+ case "reference":
232
+ return A.id(e, !0);
233
+ case "boolean":
234
+ return A.parseBoolean(e);
235
+ case "url":
236
+ return A.parseURL(e);
237
+ case "key":
238
+ return A.machineName(e);
239
+ case "email":
240
+ return A.parseEmail(e);
241
+ case "date":
242
+ var r = A.parseDate(e, t);
243
+ return r === void 0 ? void 0 : r;
244
+ case "number":
245
+ case "decimal":
246
+ case "float":
247
+ var c = A.parseNumber(e);
248
+ return String(c) == String(Number(e)) ? c : void 0;
249
+ case "integer":
250
+ var c = A.parseInt(e);
251
+ return String(c) == String(parseInt(e)) ? c : void 0;
252
+ case "group":
253
+ return e;
254
+ case "object":
255
+ return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
256
+ case "string":
257
+ if (A.exists(e)) {
258
+ var f = String(e);
259
+ return f == "[object Object]" ? void 0 : f;
260
+ } else
261
+ return;
262
+ // if(!data) {
263
+ // return '';
264
+ // }
265
+ // if(Array.isArray(data)) {
266
+ // return JSON.stringify(data);
267
+ // }
268
+ // if(Object.isObject(data)) {
269
+ // return JSON.stringify(data);
270
+ // }
271
+ // return String(data);
272
+ // break;
273
+ default:
274
+ return String(e);
275
+ }
276
+ };
277
+ A.isValidValue = function(e, a, t) {
278
+ var n = A.exists(e), r = typeof e == "number", c = !1;
279
+ if (!n)
280
+ return !1;
281
+ switch (a) {
282
+ case "url":
283
+ t ? c = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : c = String(e) === A.parseURL(e);
284
+ break;
285
+ case "key":
286
+ c = String(e) === A.machineName(e);
287
+ break;
288
+ case "date":
289
+ if (t && (typeof e != "object" || !(e instanceof Date)))
290
+ return !1;
291
+ var f = A.parseDate(e);
292
+ return f !== void 0;
293
+ case "email":
294
+ t ? c = e === A.parseEmail(e) : c = String(e).toLowerCase() === A.parseEmail(e);
295
+ break;
296
+ case "number":
297
+ case "decimal":
298
+ case "float":
299
+ t ? c = r && Number(e) === A.parseNumber(e) : c = Number(e) === A.parseNumber(e);
300
+ break;
301
+ case "integer":
302
+ t ? c = r && Number(e) === A.parseInt(e) : c = Number(e) === A.parseInt(e);
303
+ break;
304
+ case "boolean":
305
+ var f = A.parseBoolean(e);
306
+ t ? (e === !0 || e === !1) && (c = e === f) : c = f === !0 || f === !1;
307
+ break;
308
+ case "reference":
309
+ t ? c = String(e) === A.id(e) : c = !!A.id(e);
310
+ break;
311
+ case "string":
312
+ var d = String(e);
313
+ if (t && typeof e != "string" || d == "[object Object]")
314
+ return !1;
315
+ c = !0;
316
+ break;
317
+ // case 'group':
318
+ // isValidEntry = _isObject(value);
319
+ // break;
320
+ case "object":
321
+ c = typeof e == "object" && e !== null && !Array.isArray(e);
322
+ break;
323
+ case "array":
324
+ c = Array.isArray(e);
325
+ break;
326
+ }
327
+ return c;
328
+ };
329
+ A.parseBoolean = function(e) {
330
+ switch (String(e).toLowerCase()) {
331
+ case "true":
332
+ case "y":
333
+ case "yes":
334
+ case "1":
335
+ case "t":
336
+ e = !0;
337
+ break;
338
+ case "false":
339
+ case "n":
340
+ case "no":
341
+ case "0":
342
+ case "f":
343
+ case "undefined":
344
+ case "null":
345
+ case "":
346
+ case "-1":
347
+ e = !1;
348
+ break;
349
+ }
350
+ return !!e;
351
+ };
352
+ A.clone = function(e) {
353
+ return JSON.parse(JSON.stringify(e));
354
+ };
355
+ A.getAllFields = function(e) {
356
+ const a = e.definesType === "profile" || e.key === "profile", t = e.definesType === "submission";
357
+ var n = [...e.fields], r = e.definedFields || [];
358
+ if (r.length)
359
+ if (t) {
360
+ var c = {
361
+ title: "Form Data",
362
+ minimum: 1,
363
+ maximum: 1,
364
+ key: "formData",
365
+ asObject: !0,
366
+ type: "group",
367
+ fields: r
368
+ };
369
+ n.push(c);
370
+ var f = {
371
+ title: "Data",
372
+ minimum: 1,
373
+ maximum: 1,
374
+ key: "data",
375
+ asObject: !0,
376
+ type: "group",
377
+ fields: r.map(function(u) {
378
+ return u.type === "reference" && (u = JSON.parse(JSON.stringify(u)), delete u.fields), u;
379
+ })
380
+ };
381
+ n.push(f);
382
+ } else {
383
+ var f = {
384
+ title: `${e.title}`,
385
+ minimum: 1,
386
+ maximum: 1,
387
+ key: "data",
388
+ asObject: !0,
389
+ type: "group",
390
+ fields: r
391
+ };
392
+ n.push(f);
393
+ }
394
+ a && (n.push({
395
+ title: "Age",
396
+ key: "_age",
397
+ minimum: 1,
398
+ maximum: 1,
399
+ type: "integer"
400
+ }), n.push({
401
+ title: "Date of birth",
402
+ key: "_dob",
403
+ minimum: 1,
404
+ maximum: 1,
405
+ type: "date"
406
+ }));
407
+ var d = A.mapFields(n).filter(function(o) {
408
+ var u = o.type == "group" && o.asObject && o.minimum == 1 && o.maximum == 1;
409
+ return !u;
410
+ }).map(function(o) {
411
+ return o.title = o.filterTitle || o.titles.filter(Boolean).join(" › "), o;
412
+ }).sort(function(o, u) {
413
+ return o.title < u.title ? -1 : 1;
414
+ });
415
+ return d;
416
+ };
417
+ A.mapFields = function(e, a) {
418
+ a || (a = {});
419
+ var t = [], n = [], r = [], c = 1, f = a.depth, d = a.arrayDelimeter || "[]";
420
+ e.forEach(o);
421
+ function o(u, i) {
422
+ var s = u.key, l = u.type == "group", h = u.minimum === u.maximum && u.minimum === 1, m = u.asObject, g = l && !m, p = a.original ? u : A.clone(u);
423
+ p.trail = n.slice(), p.trail.push(s), p.path = p.trail.join("."), p.titles = r.slice(), p.titles.push(u.filterTitle || u.title || ""), (!g || a.includeLayout) && t.push(p);
424
+ var E = f && c >= f;
425
+ if (u.fields && u.fields.length)
426
+ if (g)
427
+ u.fields.forEach(o);
428
+ else {
429
+ if (E)
430
+ return;
431
+ c++;
432
+ let y = s;
433
+ a.includeArrayDelimeter && (h || (y = `${s}${d}`)), n.push(y), r.push(u.filterTitle || u.title), u.fields.forEach(o), c--, n.pop(), r.pop();
434
+ }
435
+ }
436
+ return t;
437
+ };
438
+ A.mapParameters = function(e) {
439
+ e = e || {};
440
+ var a = [];
441
+ return Object.entries(e).forEach(function([t, n]) {
442
+ n == null || n == !1 || (Array.isArray(n) ? n.forEach(function(r) {
443
+ a.push(`${t}=${encodeURIComponent(r)}`);
444
+ }) : a.push(encodeURIComponent(t) + "=" + encodeURIComponent(n)));
445
+ }), a.join("&");
446
+ };
447
+ A.formatCurrency = function(e, a, t) {
448
+ (!e || isNaN(e)) && (e = 0), t = t || 2;
449
+ var n = A.currencySymbol(a);
450
+ return `${n}${parseFloat(Number(e) / 100).toFixed(t)}`;
451
+ };
452
+ A.getTypeFromID = function(e) {
453
+ if (e = A.id(e), !e)
454
+ return;
455
+ const a = {
456
+ 21: "organisation",
457
+ 23: "comment",
458
+ 24: "persona",
459
+ 25: "audio",
460
+ 26: "campaign",
461
+ 28: "smartlist",
462
+ 29: "cache",
463
+ 40: "application",
464
+ 41: "action",
465
+ 42: "billinginvoice",
466
+ 43: "componentsnapshot",
467
+ 44: "diff",
468
+ 45: "email",
469
+ 46: "submission",
470
+ 49: "import",
471
+ 53: "socket",
472
+ 54: "timetrigger",
473
+ 61: "article",
474
+ 63: "component",
475
+ 65: "event",
476
+ 66: "file",
477
+ 67: "tag",
478
+ 69: "image",
479
+ 70: "profile",
480
+ 72: "role",
481
+ 73: "scope",
482
+ 74: "transaction",
483
+ 75: "user",
484
+ 76: "video",
485
+ 77: "workflowcard",
486
+ 78: "variable",
487
+ "3c": "patoken",
488
+ "7b": "uatoken",
489
+ "7d": "urtoken",
490
+ "2d": "systemtask",
491
+ "3d": "export",
492
+ "5f": "systemflag",
493
+ "2b": "batch",
494
+ "3a": "log",
495
+ "2e": "stat",
496
+ "2f": "unsubscribe",
497
+ "6b": "intent",
498
+ "7c": "upload",
499
+ "2c": "systemtrigger",
500
+ "6e": "interface",
501
+ "4e": "interfacesnapshot",
502
+ "4f": "notification",
503
+ "2a": "definition",
504
+ "7e": "definitionsnapshot",
505
+ "5e": "integration",
506
+ "4c": "listener",
507
+ "6d": "topic",
508
+ "7a": "code",
509
+ "4d": "paymentmethod",
510
+ "6c": "sslcertificate"
511
+ };
512
+ var t = e.slice(8, 10);
513
+ return a[t];
514
+ };
515
+ A.currencySymbol = function(e) {
516
+ switch (e = String(e).toLowerCase(), String(e).toLowerCase()) {
517
+ case "gbp":
518
+ return "£";
519
+ case "eur":
520
+ return "€";
521
+ default:
522
+ return "$";
523
+ }
524
+ };
525
+ A.getAvailableCurrencies = function(e) {
526
+ var a = [];
527
+ if (a.push({
528
+ name: `USD (${A.currencySymbol("usd")})`,
529
+ value: "usd",
530
+ countryCode: { US: !0 }
531
+ }), a.push({
532
+ name: `GBP (${A.currencySymbol("gbp")})`,
533
+ value: "gbp",
534
+ countryCode: { GB: !0, UK: !0 }
535
+ }), a.push({
536
+ name: `CAD (${A.currencySymbol("cad")})`,
537
+ value: "cad",
538
+ countryCode: { CA: !0 }
539
+ }), a.push({
540
+ name: `AUD (${A.currencySymbol("aud")})`,
541
+ value: "aud",
542
+ countryCode: { AU: !0 }
543
+ }), a.push({
544
+ name: `NZD (${A.currencySymbol("nzd")})`,
545
+ value: "nzd",
546
+ countryCode: { NZ: !0 }
547
+ }), a.push({
548
+ name: `SGD (${A.currencySymbol("sgd")})`,
549
+ value: "sgd",
550
+ countryCode: { SG: !0 }
551
+ }), e) {
552
+ var t = a.findIndex(function(r) {
553
+ return r.countryCode[e];
554
+ });
555
+ const n = (r, c, f) => {
556
+ const d = [...r];
557
+ return d.splice(f, 0, ...d.splice(c, 1)), d;
558
+ };
559
+ t != -1 && (a = n(a, t, 0));
560
+ }
561
+ return a;
562
+ };
563
+ A.hash = function(e, a) {
564
+ return e = Array.isArray(e) ? e : [], e.reduce(function(t, n) {
565
+ const r = a ? k(n, a) : n;
566
+ return t[r] = n, t;
567
+ }, {});
568
+ };
569
+ A.extractFromArray = function(e, a, t, n, r, c, f) {
570
+ f = f || {}, t && (f.sum = t), n && (f.flatten = !0), r && (f.unique = !0), c && (f.excludeNull = !0);
571
+ var d = e.reduce(function(o, u) {
572
+ var i = k(u, a), s = !i && i !== !1 && i !== 0;
573
+ return f.excludeNull && s || o.push(i), o;
574
+ }, []);
575
+ return f.flatten && (d = d.flat()), f.unique && (d = [...new Set(d)]), f.sum && (d = d.reduce(function(o, u) {
576
+ return o + u;
577
+ }, 0)), d;
578
+ };
579
+ A.matchInArray = function(e, a, t, n) {
580
+ var r = e.filter(function(c) {
581
+ var f = k(c, a), d;
582
+ switch (n) {
583
+ case "in":
584
+ d = f.includes(t);
585
+ break;
586
+ case ">=":
587
+ d = f >= t;
588
+ break;
589
+ case "<=":
590
+ d = f <= t;
591
+ break;
592
+ case "<":
593
+ d = f < t;
594
+ break;
595
+ case ">":
596
+ d = f > t;
597
+ break;
598
+ case "==":
599
+ default:
600
+ t === void 0 ? d = f : d = f == t;
601
+ break;
602
+ }
603
+ return d;
604
+ });
605
+ return r;
606
+ };
607
+ A.comma = function(e, a, t) {
608
+ return t && (e = e.slice(0, t)), e.filter(function(n) {
609
+ return n != null && n !== void 0 && n !== "";
610
+ }).map(function(n) {
611
+ return a && a.length ? k(n, a) : n;
612
+ }).join(", ");
613
+ };
614
+ A.id = function(e) {
615
+ if (e) {
616
+ var a;
617
+ e._id ? a = String(e._id) : a = String(e);
618
+ var t = A.isValidID(a);
619
+ if (t)
620
+ return a;
621
+ }
622
+ };
623
+ A.ids = function(e) {
624
+ if (!e)
625
+ return [];
626
+ var a = Object.keys(
627
+ e.reduce(function(t, n) {
628
+ if (!n)
629
+ return t;
630
+ var r = A.id(n);
631
+ return r && (t[r] = 1), t;
632
+ }, {})
633
+ );
634
+ return a;
635
+ };
636
+ A.isValidID = function(e) {
637
+ var a = new RegExp("^[0-9a-fA-F]{24}$");
638
+ return a.test(String(e));
639
+ };
640
+ A.errorMessage = function(e) {
641
+ if (e) {
642
+ Array.isArray(e) && (e = e[0]);
643
+ var a = ["response.data.message", "response.data", "message"], t;
644
+ return a.forEach(function(n) {
645
+ if (!t) {
646
+ var r = k(e, n);
647
+ r && (t = r);
648
+ }
649
+ }), Array.isArray(t) && (t = t[0]), t = t || JSON.stringify(e), t;
650
+ }
651
+ };
652
+ A.guid = function() {
653
+ var e = (/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2) + "0".repeat(16);
654
+ return e.substr(0, 8) + "-" + e.substr(8, 4) + "-4000-8" + e.substr(12, 3) + "-" + e.substr(15, 12);
655
+ };
656
+ A.machineName = function(e) {
657
+ if (!(!e || !e.length)) {
658
+ var a = /[^a-zA-Z0-9-_]+/g, t = String(e).replace(a, " ").trim();
659
+ return D(t);
660
+ }
661
+ };
662
+ function L() {
663
+ var e = {}, a = {};
664
+ return a.removeAllListeners = function() {
665
+ e = {};
666
+ }, a.dispatch = function(t, n) {
667
+ e[t] && e[t].forEach(function(r) {
668
+ return r(n);
669
+ });
670
+ }, a.addEventListener = function(t, n) {
671
+ e[t] || (e[t] = []);
672
+ const r = typeof n;
673
+ if (r !== "function")
674
+ throw new Error(
675
+ `addEventListener() requires a function but ${r} was added`
676
+ );
677
+ e[t].indexOf(n) == -1 && e[t].push(n);
678
+ }, a.removeEventListener = function(t, n) {
679
+ e[t] || (e[t] = []);
680
+ var r = e[t].indexOf(n);
681
+ r != -1 && e[t].splice(r, 1);
682
+ }, a.bootstrap = function(t) {
683
+ t && (t.dispatch = a.dispatch, t.addEventListener = a.addEventListener, t.removeEventListener = a.removeEventListener, t.removeAllListeners = a.removeAllListeners);
684
+ }, a;
685
+ }
686
+ var H = function(e) {
687
+ if (!e.api)
688
+ throw new Error("Please ensure that QikAPI exists before QikAuth");
689
+ var a = {}, t = a;
690
+ const n = 10, r = {
691
+ debug: !1
692
+ };
693
+ Object.defineProperty(r, "store", {
694
+ value: t,
695
+ writable: !1
696
+ });
697
+ const c = new L();
698
+ c.bootstrap(r);
699
+ function f(o) {
700
+ var u = t.user;
701
+ r.onChange && r.onChange(u), c.dispatch("change", u, o);
702
+ }
703
+ r.set = function(o, u, i) {
704
+ if (JSON.stringify(t.user) != JSON.stringify(o) && (t.user = o, !i))
705
+ return f(u);
706
+ }, r.logout = function() {
707
+ return delete t.user, e.cache.reset(), f();
708
+ }, r.changeOrganisation = function(o, u) {
709
+ o = e.utils.id(o), u || (u = {});
710
+ var i = !0;
711
+ return u.disableAutoAuthentication && (i = !1), new Promise(function(s, l) {
712
+ e.api.post(`/user/switch/${o}`).then(function(h) {
713
+ i && (e.cache.reset(), r.set(h.data)), s(h.data);
714
+ }).catch(l);
715
+ });
716
+ }, r.impersonate = function(o, u) {
717
+ o = e.utils.id(o), u || (u = {});
718
+ var i = !0;
719
+ u.disableAutoAuthentication && (i = !1);
720
+ var s = e.api.post(`/user/impersonate/${o}`);
721
+ return s.then(function(l) {
722
+ i && (e.cache.reset(), r.set(l.data));
723
+ }, function(l) {
724
+ }), s;
725
+ }, r.login = async function(o, u) {
726
+ u || (u = {});
727
+ var i = !0;
728
+ u.disableAutoAuthentication && (i = !1);
729
+ var s = new Promise(l);
730
+ function l(h, m) {
731
+ if (!o)
732
+ return m({
733
+ message: "Missing credentials!"
734
+ });
735
+ if (!o.email || !o.email.length)
736
+ return m({
737
+ message: "Username was not provided"
738
+ });
739
+ if (!o.password || !o.password.length)
740
+ return m({
741
+ message: "Password was not provided"
742
+ });
743
+ var g = {
744
+ bypassInterceptor: !0
745
+ }, p = `${e.apiURL}/user/login`;
746
+ u.url && (p = u.url), e.api.post(p, o, g).then(function(v) {
747
+ i && r.set(v.data), h(v);
748
+ }, m);
749
+ }
750
+ return s;
751
+ }, r.signup = async function(o, u) {
752
+ u || (u = {});
753
+ var i = !0;
754
+ u.disableAutoAuthentication && (i = !1);
755
+ var s = new Promise(l);
756
+ function l(h, m) {
757
+ if (!o)
758
+ return m({
759
+ message: "No details provided"
760
+ });
761
+ if (!o.firstName || !o.firstName.length)
762
+ return m({
763
+ message: "First Name was not provided"
764
+ });
765
+ if (!o.lastName || !o.lastName.length)
766
+ return m({
767
+ message: "Last Name was not provided"
768
+ });
769
+ if (!o.email || !o.email.length)
770
+ return m({
771
+ message: "Email/Username was not provided"
772
+ });
773
+ if (!o.password || !o.password.length)
774
+ return m({
775
+ message: "Password was not provided"
776
+ });
777
+ if (!o.confirmPassword || !o.confirmPassword.length)
778
+ return m({
779
+ message: "Confirm Password was not provided"
780
+ });
781
+ if (o.confirmPassword != o.password)
782
+ return m({
783
+ message: "Your passwords do not match"
784
+ });
785
+ var g = {
786
+ bypassInterceptor: !0
787
+ }, p = `${e.apiURL}/user/signup`;
788
+ u.application && (p = `${e.domain || ""}/qik/application/signup`), u.url && (p = u.url), e.api.post(p, o, g).then(function(v) {
789
+ i && r.set(v.data), h(v);
790
+ }, m);
791
+ }
792
+ return s;
793
+ }, r.retrieveUserFromResetToken = async function(o, u) {
794
+ u || (u = {});
795
+ var i = {
796
+ bypassInterceptor: !0
797
+ };
798
+ return new Promise(function(s, l) {
799
+ e.api.get(u.url || `${e.apiURL}/user/reset/${o}`, i).then(function(h) {
800
+ return s(h.data);
801
+ }, l);
802
+ });
803
+ }, r.updateUserWithToken = async function(o, u, i) {
804
+ i || (i = {});
805
+ var s = !0;
806
+ return i.disableAutoAuthentication && (s = !1), new Promise(function(l, h) {
807
+ var m = {
808
+ bypassInterceptor: !0
809
+ };
810
+ e.api.post(i.url || `${e.apiURL}/user/reset/${o}`, u, m).then(function(g) {
811
+ return s && (e.cache.reset(), r.set(g.data)), l(g.data);
812
+ }, h);
813
+ });
814
+ }, r.sendResetPasswordRequest = function(o, u) {
815
+ return u || (u = {}), o ? !o.email || !o.email.length ? Promise.reject({
816
+ message: "Email is required but was not provided"
817
+ }) : new Promise(function(i, s) {
818
+ var l = {
819
+ bypassInterceptor: !0
820
+ };
821
+ e.api.post(u.url || `${e.apiURL}/user/forgot`, o, l).then(i, s);
822
+ }) : Promise.reject({
823
+ message: "No details were provided for password reset request"
824
+ });
825
+ }, r.ensureValidToken = async function(o) {
826
+ var u = r.getCurrentUser();
827
+ if (!u)
828
+ return Promise.reject("No user");
829
+ var { token: i } = u;
830
+ if (!i)
831
+ return Promise.reject("No token");
832
+ var s = /* @__PURE__ */ new Date();
833
+ s.setSeconds(s.getSeconds() + n);
834
+ var l = new Date(i.expires);
835
+ return o ? (console.log("force refresh valid token", i.refreshToken), await r.refreshAccessToken(i.refreshToken)) : s < l ? i : await r.refreshAccessToken(i.refreshToken);
836
+ };
837
+ const d = {};
838
+ return r.refreshAccessToken = async function(o) {
839
+ return d.inflightRefreshRequest || (d.inflightRefreshRequest = new Promise(function(u, i) {
840
+ e.api.post("/user/refresh", {
841
+ refreshToken: o
842
+ }, {
843
+ bypassInterceptor: !0,
844
+ withoutToken: !0
845
+ }).then(function(l) {
846
+ if (l)
847
+ r.set(l.data), f();
848
+ else
849
+ return d.inflightRefreshRequest = null, i();
850
+ u(l.data.token), setTimeout(function() {
851
+ d.inflightRefreshRequest = null;
852
+ });
853
+ }).catch(function(s) {
854
+ setTimeout(function() {
855
+ d.inflightRefreshRequest = null;
856
+ }), i(s);
857
+ });
858
+ })), d.inflightRefreshRequest;
859
+ }, r.sync = function() {
860
+ return e.api.get("/user").then(function(o) {
861
+ o.data ? t.user && Object.assign(t.user.session, o.data) : r.set(null), f();
862
+ }).catch(function(o) {
863
+ r.set(null), f();
864
+ });
865
+ }, r.getCurrentUser = function() {
866
+ return t.user;
867
+ }, r.getCurrentToken = function() {
868
+ var o = r.getCurrentUser();
869
+ if (!o)
870
+ return e.applicationToken ? e.applicationToken : void 0;
871
+ var { token: u } = o;
872
+ if (u)
873
+ return u.accessToken;
874
+ }, e.api.interceptors.request.use(
875
+ async function(o) {
876
+ if (o.bypassInterceptor)
877
+ return o;
878
+ var u = o, i = await r.getCurrentUser(), s, l, h;
879
+ if (i) {
880
+ var { token: m } = i;
881
+ m && (s = m.accessToken, l = m.refreshToken, h = m.expires);
882
+ }
883
+ if (s)
884
+ u.headers.Authorization = `Bearer ${s}`;
885
+ else
886
+ return u;
887
+ if (!l)
888
+ return u;
889
+ var g = /* @__PURE__ */ new Date();
890
+ g.setSeconds(g.getSeconds() + n);
891
+ var p = new Date(h);
892
+ return g < p ? u : new Promise(async function(v, E) {
893
+ await r.refreshAccessToken(l).then(function(y) {
894
+ return u.headers.Authorization = `Bearer ${y}`, v(u);
895
+ }).catch(function(y) {
896
+ return E(y);
897
+ });
898
+ });
899
+ },
900
+ function(o) {
901
+ return Promise.reject(o);
902
+ }
903
+ ), e.api.interceptors.response.use(function(o) {
904
+ return o;
905
+ }, function(o) {
906
+ var u = o && o.response && o.response.status || o.status;
907
+ switch (u) {
908
+ case 401:
909
+ r.logout();
910
+ break;
911
+ }
912
+ return Promise.reject(o);
913
+ }), r;
914
+ }, b = {};
915
+ function G(e) {
916
+ if (e === 0)
917
+ return !1;
918
+ var a = typeof e > "u" || e === null || String(e).trim() === "";
919
+ return !!(a || e === "undefined" || e === "null");
920
+ }
921
+ function U(e) {
922
+ return !G(e);
923
+ }
924
+ b.cleanKey = function(e) {
925
+ return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
926
+ };
927
+ b.isValidFilter = function(e) {
928
+ if (!e)
929
+ return !1;
930
+ if (e.operator)
931
+ return !e.filters || !e.filters.length ? !1 : e.filters.some(b.isValidFilter);
932
+ var a = b.cleanKey(e.key);
933
+ if (!a)
934
+ return !1;
935
+ switch (e.comparator) {
936
+ case "empty":
937
+ case "notempty":
938
+ case "datetoday":
939
+ case "datenottoday":
940
+ case "datebeforetoday":
941
+ case "dateaftertoday":
942
+ case "dateweektoday":
943
+ case "datemonthtoday":
944
+ case "datebeforenow":
945
+ case "dateafternow":
946
+ case "datethisweek":
947
+ case "datethismonth":
948
+ return !0;
949
+ }
950
+ var t = (e.values || []).filter(U);
951
+ return !G(e.value) || !G(e.value2) || t.length;
952
+ };
953
+ b.activeFilters = function(e) {
954
+ var a = [];
955
+ return t(e, a), a;
956
+ function t(n, r) {
957
+ if (n) {
958
+ var c = b.isValidFilter(n);
959
+ c && r.push(n), n.filters && n.filters.length && n.filters.forEach(function(f) {
960
+ t(f, r);
961
+ });
962
+ }
963
+ }
964
+ };
965
+ b.activeFilterKeys = function(e, a) {
966
+ a = a || {};
967
+ var t = b.activeFilters(e), n = t.filter(function(c) {
968
+ return !c.operator;
969
+ }).reduce(function(c, f) {
970
+ var d = b.cleanKey(f.key);
971
+ return a.trimArrayDelimeters !== !1 && (d = d.split("[]").join("")), c[d] = !0, c;
972
+ }, {}), r = Object.keys(n);
973
+ return r;
974
+ };
975
+ b.activeFilterComparators = function(e) {
976
+ var a = b.activeFilters(e).filter(function(t) {
977
+ return !t.operator;
978
+ }).reduce(function(t, n) {
979
+ return t[n.comparator] = !0, t;
980
+ }, {});
981
+ return Object.keys(a);
982
+ };
983
+ b.activeFilterOperators = function(e) {
984
+ var a = b.activeFilters(e).filter(function(t) {
985
+ return t.operator;
986
+ }).reduce(function(t, n) {
987
+ return t[n.operator] = !0, t;
988
+ }, {});
989
+ return Object.keys(a);
990
+ };
991
+ b.activeFilterValues = function(e, a) {
992
+ var t = b.activeFilters(e);
993
+ function n(c) {
994
+ if (c)
995
+ return c._id || c.id || c.title || c.name || c;
996
+ }
997
+ var r = t.filter(function(c) {
998
+ return !c.operator;
999
+ }).reduce(function(c, f) {
1000
+ return c = [...c, ...(f.values || []).map(n), n(f.value), n(f.value2)], c;
1001
+ }, []).filter(U);
1002
+ return r;
1003
+ };
1004
+ b.filterChangeString = function(e) {
1005
+ var a = b.activeFilters(e);
1006
+ return JSON.stringify(a);
1007
+ };
1008
+ function W(e) {
1009
+ var a = {};
1010
+ return a.downloadUrl = function(t, n, r, c) {
1011
+ return c = c || {}, r = r || {}, r.download = !0, n = e.utils.id(n), e.api.generateEndpointURL(`/${t}/${n}`, r, c);
1012
+ }, a.duration = function(t) {
1013
+ const n = Math.round(t), r = Math.floor(n / 3600), c = Math.floor(n % 3600 / 60), f = n % 60;
1014
+ return r > 0 ? `${r}:${c.toString().padStart(2, "0")}:${f.toString().padStart(2, "0")}` : `${c}:${f.toString().padStart(2, "0")}`;
1015
+ }, a.mediaUrl = function(t, n, r, c) {
1016
+ c = c || {}, r = r || {}, n = e.utils.id(n);
1017
+ let f = `/${t}/${n}`;
1018
+ return c.extension?.length && (c.extension.includes(".") ? f = `${f}/${c.extension}` : f = `${f}/${t}.${c.extension}`), e.api.generateEndpointURL(f, r, c);
1019
+ }, a.filesize = function(t, n) {
1020
+ if (t == 0) return "0 Bytes";
1021
+ var r = 1024, c = n || 2, f = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = Math.floor(Math.log(t) / Math.log(r));
1022
+ return parseFloat((t / Math.pow(r, d)).toFixed(c)) + " " + f[d];
1023
+ }, a.getBinaryTypeFromMime = function(t) {
1024
+ if (!t)
1025
+ return "file";
1026
+ switch (t) {
1027
+ case "image/jpeg":
1028
+ case "image/png":
1029
+ case "image/gif":
1030
+ case "image/bmp":
1031
+ case "image/tiff":
1032
+ case "image/svg+xml":
1033
+ return "image";
1034
+ case "video/mp4":
1035
+ case "video/quicktime":
1036
+ case "video/ogg":
1037
+ case "video/webm":
1038
+ return "video";
1039
+ case "audio/aac":
1040
+ case "audio/aiff":
1041
+ case "audio/mp3":
1042
+ case "audio/x-m4a":
1043
+ case "audio/mpeg":
1044
+ case "audio/ogg":
1045
+ case "audio/wav":
1046
+ case "audio/webm":
1047
+ return "audio";
1048
+ default:
1049
+ var n = t.split("/")[0];
1050
+ switch (n) {
1051
+ case "image":
1052
+ case "video":
1053
+ case "audio":
1054
+ return n;
1055
+ default:
1056
+ return "file";
1057
+ }
1058
+ break;
1059
+ }
1060
+ }, a;
1061
+ }
1062
+ var C = {}, Z = {
1063
+ ///////////////////////////////////////////////////
1064
+ /**
1065
+ * A helper function to reset all caches, useful if changing organisation or logging in or out as another user
1066
+ * @alias cache.reset
1067
+ */
1068
+ reset() {
1069
+ Object.entries(C).forEach(([e, a]) => {
1070
+ a.clear ? a.clear() : a.reset && a.reset();
1071
+ });
1072
+ },
1073
+ ///////////////////////////////////////////////////
1074
+ /**
1075
+ * A helper function to retrieve a specific cache
1076
+ * @alias cache.get
1077
+ * @param {string} key The key for the cache you want to retrieve
1078
+ * @return {LRUCache} The cache store for the specified key
1079
+ */
1080
+ get(e, a) {
1081
+ return a = a || { max: 5 }, C[e] || (C[e] = new K(a)), C[e];
1082
+ }
1083
+ }, Y = function(e) {
1084
+ if (!e.auth)
1085
+ throw new Error(
1086
+ "Can't Instantiate QikAccess before QikAccess has been initialized"
1087
+ );
1088
+ if (!e.utils)
1089
+ throw new Error(
1090
+ "Can't Instantiate QikAccess before QikCore.utils has been initialized"
1091
+ );
1092
+ var a = {};
1093
+ return a.featureFlags = {
1094
+ all: 1,
1095
+ impersonation: 2,
1096
+ products: 4,
1097
+ checkin: 8,
1098
+ events: 16,
1099
+ ticketing: 32,
1100
+ emails: 64,
1101
+ sms: 128,
1102
+ images: 256,
1103
+ actions: 512,
1104
+ timers: 1024,
1105
+ listenertriggers: 2048,
1106
+ builder: 4096,
1107
+ scopes: 8192,
1108
+ components: 16384,
1109
+ video: 32768,
1110
+ audio: 65536,
1111
+ files: 131072,
1112
+ developer: 262144,
1113
+ notifications: 524288,
1114
+ payments: 1048576,
1115
+ comments: 2097152,
1116
+ workflows: 4194304,
1117
+ forms: 8388608
1118
+ }, a.featureIsIncludedInByteflag = function(t, n) {
1119
+ return (t & a.featureFlags[n]) === a.featureFlags[n];
1120
+ }, a.hasFeature = function(t, n) {
1121
+ const r = t?.organisation || {}, c = r.features || {};
1122
+ if (c.all || c[n])
1123
+ return !0;
1124
+ const f = r.ff;
1125
+ return a.featureIsIncludedInByteflag(f, "all") ? !0 : a.featureIsIncludedInByteflag(f, n);
1126
+ }, a.isAdministrator = function(t) {
1127
+ return t && t?.userType == "administrator";
1128
+ }, a.getAllDescendants = function(t) {
1129
+ var n = [];
1130
+ r(t);
1131
+ function r(c) {
1132
+ var f = e.utils.id(c);
1133
+ n.push(f), (c.children || []).forEach(function(d) {
1134
+ r(d);
1135
+ });
1136
+ }
1137
+ return n;
1138
+ }, a.hashPermissions = function(t) {
1139
+ var n = {};
1140
+ for (var r in t?.permissions || {}) {
1141
+ var c = t?.permissions[r], f = a.getAllDescendants(c);
1142
+ (c.permissions || []).forEach(function(d) {
1143
+ n[d] || (n[d] = []), n[d] = [
1144
+ ...new Set(n[d].concat(f))
1145
+ ];
1146
+ });
1147
+ }
1148
+ return n;
1149
+ }, a.allUserScopes = function(t) {
1150
+ var n = {}, r = t?.permissions || {};
1151
+ function c(d) {
1152
+ if (d) {
1153
+ var o = e.utils.id(d);
1154
+ o && (n[o] = 1, d.children && d.children.length && d.children.forEach(function(u) {
1155
+ c(u);
1156
+ }));
1157
+ }
1158
+ }
1159
+ for (var f in r)
1160
+ c(r[f]);
1161
+ return Object.keys(n);
1162
+ }, a.actionableScopes = function(t, n, r, c, f) {
1163
+ f = f || {};
1164
+ var d = [];
1165
+ if (t?.userType == "administrator")
1166
+ d = a.allUserScopes(t, f);
1167
+ else {
1168
+ var o = a.hashPermissions(t), u = r || c;
1169
+ if (!u)
1170
+ return d;
1171
+ let i = r ? o[`${r}.${n}`] || [] : [], s = c ? o[`${c}.${n}`] || [] : [];
1172
+ d = [...i, ...s];
1173
+ }
1174
+ return d || [];
1175
+ }, a.isOwner = function(t, n) {
1176
+ var r = e.utils.id(t), c = e.utils.id(t?.persona), f = n.meta;
1177
+ if (!f)
1178
+ return !1;
1179
+ var d = f.userOwners || [], o = e.utils.ids([...d, f.userAuthor]), u = e.utils.hash(o);
1180
+ if (u[r])
1181
+ return !0;
1182
+ var i = f.personaOwners || [], s = e.utils.ids([
1183
+ ...i,
1184
+ f.personaAuthor
1185
+ ]), l = e.utils.hash(s);
1186
+ return l[c] ? !0 : a.isAssignee(t, n);
1187
+ }, a.isAssignee = function(t, n) {
1188
+ const r = e.utils.ids(t?.profiles);
1189
+ if (!r.length)
1190
+ return !1;
1191
+ const c = e.utils.ids(n.assignees);
1192
+ if (!c.length)
1193
+ return !1;
1194
+ const f = new Set(c);
1195
+ return !!r.filter((u) => f.has(u)).length;
1196
+ }, a.allPermissions = function(t) {
1197
+ var n = Object.values(t?.permissions || {}).map(function(r) {
1198
+ return r.permissions;
1199
+ }).flat();
1200
+ return n;
1201
+ }, a.allPermissionTypes = function(t, n) {
1202
+ return n ? a.allPermissions(t).reduce(function(r, c) {
1203
+ var f = c.split(".")[0];
1204
+ return r[f] = !0, r;
1205
+ }, {}) : a.allPermissions(t).map(function(r) {
1206
+ return r.split(".")[0];
1207
+ });
1208
+ }, a.canKnowOf = function(t, n, r) {
1209
+ return r = r || {}, r.cache = r.cache || {}, a.allPermissionTypes(t, !0)[n];
1210
+ }, a.checkActionAccess = function(t, n, r, c, f) {
1211
+ if (f = f || {}, f.cache = f.cache || {}, a.isAdministrator(t))
1212
+ return !0;
1213
+ var d = n.meta?.type, o = n.meta?.definition || d;
1214
+ if (!o)
1215
+ return !1;
1216
+ var u = e.utils.ids(n.meta.scopes || []), i, s = `access-${t?.cacheKey}-${r}-${o}-${d}`;
1217
+ if (f.cache[s])
1218
+ i = f.cache[s];
1219
+ else {
1220
+ var l = e.utils.ids(
1221
+ a.actionableScopes(t, r, o, d, f)
1222
+ );
1223
+ i = e.utils.hash(l), f.cache[s] = i;
1224
+ }
1225
+ if (i) {
1226
+ var h = u.some(function(y) {
1227
+ return i[y];
1228
+ });
1229
+ if (h)
1230
+ return !0;
1231
+ }
1232
+ var m = a.isOwner(t, n);
1233
+ if (m) {
1234
+ var g, p = `access-${t?.cacheKey}-${c}-${o}-${d}`;
1235
+ if (f.cache[p])
1236
+ g = f.cache[p];
1237
+ else {
1238
+ var v = e.utils.ids(
1239
+ a.actionableScopes(t, c, o, d, f)
1240
+ );
1241
+ g = e.utils.hash(v), f.cache[p] = g;
1242
+ }
1243
+ if (g) {
1244
+ var E = u.some(function(y) {
1245
+ return g[y];
1246
+ });
1247
+ if (E)
1248
+ return !0;
1249
+ }
1250
+ }
1251
+ return !1;
1252
+ }, a.has = function(t, n) {
1253
+ if (a.isAdministrator(t))
1254
+ return !0;
1255
+ var r = a.hashPermissions(t);
1256
+ return r[n];
1257
+ }, a.canCreate = function(t, n, r, c) {
1258
+ if (c = c || {}, c.cache = c.cache || {}, a.isAdministrator(t))
1259
+ return !0;
1260
+ var f = a.actionableScopes(
1261
+ t,
1262
+ "create",
1263
+ n,
1264
+ r
1265
+ );
1266
+ return f.length;
1267
+ }, a.canListItem = function(t, n, r) {
1268
+ r = r || {}, r.cache = r.cache || {};
1269
+ var c = a.checkActionAccess(
1270
+ t,
1271
+ n,
1272
+ "listany",
1273
+ "listown",
1274
+ r
1275
+ );
1276
+ if (c)
1277
+ return !0;
1278
+ var f = a.canViewItem(t, n, r);
1279
+ return !!f;
1280
+ }, a.canViewItem = function(t, n, r) {
1281
+ r = r || {}, r.cache = r.cache || {};
1282
+ var c = a.checkActionAccess(
1283
+ t,
1284
+ n,
1285
+ "viewany",
1286
+ "viewOwn",
1287
+ r
1288
+ );
1289
+ if (c)
1290
+ return !0;
1291
+ var f = a.canEditItem(t, n, r);
1292
+ return !!f;
1293
+ }, a.canEditItem = function(t, n, r) {
1294
+ r = r || {}, r.cache = r.cache || {};
1295
+ var c = a.checkActionAccess(
1296
+ t,
1297
+ n,
1298
+ "editany",
1299
+ "editown",
1300
+ r
1301
+ );
1302
+ return c;
1303
+ }, a.canDeleteItem = function(t, n, r) {
1304
+ return r = r || {}, r.cache = r.cache || {}, a.checkActionAccess(
1305
+ t,
1306
+ n,
1307
+ "deleteany",
1308
+ "deleteown",
1309
+ r
1310
+ );
1311
+ }, a.canRestoreItem = function(t, n, r) {
1312
+ return r = r || {}, r.cache = r.cache || {}, a.checkActionAccess(
1313
+ t,
1314
+ n,
1315
+ "restoreany",
1316
+ "restoreown",
1317
+ r
1318
+ );
1319
+ }, a.canEraseItem = function(t, n, r) {
1320
+ return r = r || {}, r.cache = r.cache || {}, a.checkActionAccess(
1321
+ t,
1322
+ n,
1323
+ "eraseany",
1324
+ "eraseown",
1325
+ r
1326
+ );
1327
+ }, a;
1328
+ };
1329
+ function Q(e) {
1330
+ if (!e.api)
1331
+ throw new Error("Can't Instantiate QikContent before QikAPI exists");
1332
+ var a = {
1333
+ debug: !1,
1334
+ loadingGlossary: !1
1335
+ };
1336
+ const t = {};
1337
+ let n;
1338
+ a.variables = async function(i, s) {
1339
+ s = s || {}, i = i || [];
1340
+ var l = s.refresh || s.reload || !t.data;
1341
+ if (l) {
1342
+ if (!n) {
1343
+ let m = function() {
1344
+ n = null;
1345
+ };
1346
+ n = e.api.post("/variables", { keys: i }), n.then(m, m);
1347
+ }
1348
+ const { data: h } = await n;
1349
+ t.data = h, e.dispatch("variables", h);
1350
+ }
1351
+ return t.data;
1352
+ };
1353
+ const r = e.cache.get("user:glossary");
1354
+ let c;
1355
+ a.glossary = async function(i) {
1356
+ i = i || {};
1357
+ let s = r.get("glossary");
1358
+ var l = i.refresh || i.reload || !s;
1359
+ if (l) {
1360
+ if (!c) {
1361
+ let g = function() {
1362
+ c = null, a.loadingGlossary = !1;
1363
+ };
1364
+ a.loadingGlossary = !0, c = e.api.get("/glossary", { cache: !1 }), c.then(g, g);
1365
+ }
1366
+ const { data: m } = await c;
1367
+ r.set("glossary", m), s = m, e.dispatch("glossary", m);
1368
+ }
1369
+ if (i.hash) {
1370
+ var h = e.utils.hash(s, "key");
1371
+ return h;
1372
+ }
1373
+ if (i.hex) {
1374
+ var h = e.utils.hash(s, "hex");
1375
+ return h;
1376
+ }
1377
+ return s;
1378
+ };
1379
+ const f = {};
1380
+ let d;
1381
+ a.scopeGlossary = async function(i) {
1382
+ i = i || {};
1383
+ var s = i.refresh || i.reload || !f.data;
1384
+ if (s) {
1385
+ if (!d) {
1386
+ let m = function() {
1387
+ d = null;
1388
+ };
1389
+ d = e.api.get("/scope/glossary", {
1390
+ cache: !1
1391
+ }), d.then(m, m);
1392
+ }
1393
+ const { data: h } = await d;
1394
+ f.data = h;
1395
+ }
1396
+ if (i.hash) {
1397
+ var l = e.utils.hash(f.data, "_id");
1398
+ return l;
1399
+ }
1400
+ return f.data;
1401
+ };
1402
+ const o = {};
1403
+ a.comparators = async function(i) {
1404
+ i = i || {};
1405
+ var s = i.reload || i.refresh || !o.data;
1406
+ if (s) {
1407
+ const { data: l } = await e.api.get("/system/comparators");
1408
+ l.available = {}, Object.entries(l.types).forEach(([h, m]) => {
1409
+ l.available[h] = m.map(function(g) {
1410
+ return l.hash[g];
1411
+ });
1412
+ }), o.data = l;
1413
+ }
1414
+ return o.data;
1415
+ };
1416
+ function u(i) {
1417
+ var { minimum: s, maximum: l } = i;
1418
+ return s = e.utils.parseInt(s), s = Math.max(s, 0), l = e.utils.parseInt(l), l = Math.max(l, 0), l == 0 || (l = Math.max(l, s)), { minimum: s, maximum: l };
1419
+ }
1420
+ return a.meetsValidationRequirements = function(i, s, l) {
1421
+ if (l.minLength) {
1422
+ var h = String(i).length;
1423
+ if (h < l.minLength)
1424
+ return `Must be at least ${l.minLength} characters`;
1425
+ }
1426
+ if (l.maxLength) {
1427
+ var h = String(i).length;
1428
+ if (h > l.maxLength)
1429
+ return `Can be no more than ${l.maxLength} characters`;
1430
+ }
1431
+ if (l.minValue && i !== void 0) {
1432
+ var m = Number(i);
1433
+ if (m < l.minValue)
1434
+ return `Must be at least ${l.minValue}`;
1435
+ }
1436
+ if (l.maxValue && i !== void 0) {
1437
+ var m = Number(i);
1438
+ if (m > l.maxValue)
1439
+ return `Can be no greater than ${l.maxValue}`;
1440
+ }
1441
+ }, a.validateField = function(i, s, l) {
1442
+ l = l || {};
1443
+ var h = s.type || "string", { minimum: m, maximum: g } = u(s), p = s.type == "group" && s.asObject, v = p ? m === g && g === 1 : g === 1, E = !v, y = e.utils.exists(i);
1444
+ if (m) {
1445
+ if (!y)
1446
+ return {
1447
+ valid: !1,
1448
+ message: `${s.title} is a required field`,
1449
+ status: 400
1450
+ };
1451
+ } else if (!y)
1452
+ return {
1453
+ valid: !0
1454
+ };
1455
+ if (E) {
1456
+ if (!Array.isArray(i))
1457
+ return m ? {
1458
+ valid: !1,
1459
+ message: `${s.title} requires at least ${m} values`,
1460
+ status: 400
1461
+ } : (console.log("NOT PROVIDED AS ARRAY", s.title, i), {
1462
+ valid: !1,
1463
+ message: `${s.title} must be provided as an array`,
1464
+ status: 400
1465
+ });
1466
+ var T = i;
1467
+ if (T = T.filter(function(w) {
1468
+ var S = w == null || w === "";
1469
+ return !S;
1470
+ }), m == g && m && T.length != m)
1471
+ return {
1472
+ valid: !1,
1473
+ message: `${s.title} requires exactly ${g} values`,
1474
+ status: 400
1475
+ };
1476
+ if (g && T.length > g)
1477
+ return {
1478
+ valid: !1,
1479
+ message: `${s.title} requires less than ${g + 1} values`,
1480
+ status: 400
1481
+ };
1482
+ if (T.length < m)
1483
+ return {
1484
+ valid: !1,
1485
+ message: `${s.title} requires at least ${m} values`,
1486
+ status: 400
1487
+ };
1488
+ var R;
1489
+ if (T.find(function(w) {
1490
+ var S = h;
1491
+ s.type === "group" && (S = "object"), s.type === "reference" && s.widget === "form" && (S = "object");
1492
+ var N = e.utils.isValidValue(
1493
+ w,
1494
+ S,
1495
+ l.strict
1496
+ );
1497
+ if (!N)
1498
+ return R = !0, !0;
1499
+ if (s.validation) {
1500
+ var j = a.meetsValidationRequirements(
1501
+ w,
1502
+ h,
1503
+ s.validation
1504
+ );
1505
+ if (j)
1506
+ return R = !0, !0;
1507
+ }
1508
+ }), R)
1509
+ return {
1510
+ valid: !1,
1511
+ message: `Invalid input for ${s.title}`,
1512
+ status: 400
1513
+ };
1514
+ } else {
1515
+ var M = h, V = s.widget;
1516
+ M === "group" && (M = "object"), M === "reference" && V === "form" && (M = "object");
1517
+ var $ = a.getCleanedValue(i, M, l), O = e.utils.isValidValue(
1518
+ $,
1519
+ M,
1520
+ l.strict
1521
+ );
1522
+ if (!O)
1523
+ return {
1524
+ valid: !1,
1525
+ message: `Single value '${i}' is not a valid ${M} for ${s.title}`,
1526
+ criteria: {
1527
+ isValidValue: O,
1528
+ cleanedValue: $,
1529
+ fieldType: h,
1530
+ options: l
1531
+ },
1532
+ status: 400
1533
+ };
1534
+ let w = !1;
1535
+ const S = {};
1536
+ if (String(s.minValue) && (S.minValue = parseInt(s.minValue), w = !0), String(s.maxValue) && (S.maxValue = parseInt(s.maxValue), w = !0), String(s.minLength) && (S.minLength = parseInt(s.minLength), w = !0), String(s.maxLength) && (S.maxLength = parseInt(s.maxLength), w = !0), w) {
1537
+ const N = Object.assign(
1538
+ {},
1539
+ S,
1540
+ s.validation || {}
1541
+ );
1542
+ var F = a.meetsValidationRequirements(
1543
+ i,
1544
+ h,
1545
+ N
1546
+ );
1547
+ if (F)
1548
+ return {
1549
+ valid: !1,
1550
+ message: F,
1551
+ status: 400
1552
+ };
1553
+ }
1554
+ }
1555
+ return {
1556
+ valid: !0
1557
+ };
1558
+ }, a.getCleanedValue = function(i, s, l) {
1559
+ switch (s) {
1560
+ case "number":
1561
+ case "float":
1562
+ case "decimal":
1563
+ return e.utils.exists(i) ? Number(i) : void 0;
1564
+ case "integer":
1565
+ return e.utils.exists(i) ? parseInt(i) : void 0;
1566
+ case "boolean":
1567
+ return e.utils.exists(i) ? e.utils.parseBoolean(i) : void 0;
1568
+ case "email":
1569
+ return l.strict ? i : String(i).toLowerCase();
1570
+ case "reference":
1571
+ return l.strict ? i : e.utils.id(i);
1572
+ default:
1573
+ return l.strict ? i : e.utils.cleanValue(i, s, l);
1574
+ }
1575
+ return i;
1576
+ }, a.list = async function(i, s, l) {
1577
+ l || (l = {});
1578
+ const h = l.remoteURL || `/content/${i}/list`;
1579
+ if (l.cancellable) {
1580
+ l.config || (l.config = {});
1581
+ const g = e.api.CancelToken.source();
1582
+ return l.config.cancelToken = g.token, {
1583
+ promise: e.api.post(h, s, l.config),
1584
+ cancel(v) {
1585
+ g.cancel(v || "Operation canceled by the user.");
1586
+ }
1587
+ };
1588
+ } else {
1589
+ const { data: m } = await e.api.post(h, s, l.config);
1590
+ return m;
1591
+ }
1592
+ }, a.create = async function(i, s) {
1593
+ const l = { ...s };
1594
+ l.meta?.scopes && (l.meta.scopes = e.utils.ids(l.meta.scopes));
1595
+ const { data: h } = await e.api.post(`/content/${i}/create`, l);
1596
+ return h;
1597
+ }, a.update = async function(i, s) {
1598
+ i = e.utils.id(i);
1599
+ const l = { ...s };
1600
+ l.meta?.scopes && (l.meta.scopes = e.utils.ids(l.meta.scopes));
1601
+ const { data: h } = await e.api.put(`/content/${i}`, l);
1602
+ return h;
1603
+ }, a.patch = async function(i, s) {
1604
+ i = e.utils.id(i);
1605
+ const l = { ...s };
1606
+ l.meta?.scopes && (l.meta.scopes = e.utils.ids(l.meta.scopes));
1607
+ const { data: h } = await e.api.patch(`/content/${i}`, l);
1608
+ return h;
1609
+ }, a.get = async function(i, s) {
1610
+ i = e.utils.id(i), s = s || {};
1611
+ const { data: l } = await e.api.get(`/content/${i}`, s);
1612
+ return l;
1613
+ }, a.getFromID = async function(i) {
1614
+ return a.get(i);
1615
+ }, a.delete = async function(i, s) {
1616
+ i = e.utils.id(i);
1617
+ const { data: l } = await e.api.delete(`/content/${i}`, s);
1618
+ return l;
1619
+ }, a.restore = async function(i, s) {
1620
+ i = e.utils.id(i);
1621
+ const { data: l } = await e.api.get(`/content/${i}/restore`, s);
1622
+ return l;
1623
+ }, a.getFromSlug = async function(i) {
1624
+ const { data: s } = await e.api.get(`/content/slug/${i}`);
1625
+ return s;
1626
+ }, a;
1627
+ }
1628
+ function X(e) {
1629
+ var a = {}, t;
1630
+ return a.countries = async function() {
1631
+ return t || (t = new Promise(async function(n, r) {
1632
+ e.api.get("/system/countries").then(function(c) {
1633
+ return n(c.data);
1634
+ }).catch(r);
1635
+ })), t;
1636
+ }, a;
1637
+ }
1638
+ function q(e) {
1639
+ var a = {};
1640
+ function t() {
1641
+ return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
1642
+ }
1643
+ return a.distance = function({ lat: n, lon: r }, { lat: c, lon: f }) {
1644
+ function d(m) {
1645
+ return m * (Math.PI / 180);
1646
+ }
1647
+ var o = 6371e3, u = d(c - n), i = d(f - r), s = Math.sin(u / 2) * Math.sin(u / 2) + Math.cos(d(n)) * Math.cos(d(c)) * Math.sin(i / 2) * Math.sin(i / 2), l = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s)), h = o * l;
1648
+ return h;
1649
+ }, a.getPosition = async function() {
1650
+ return t() ? (console.log("qik:geo: getting location"), new Promise(function(n, r) {
1651
+ navigator.geolocation.getCurrentPosition(n, r);
1652
+ })) : Promise.reject({ message: "Geolocation is not enabled" });
1653
+ }, a.watchPosition = async function(n) {
1654
+ return t() ? (console.log("qik:geo: watching location"), new Promise(function(r, c) {
1655
+ const f = navigator.geolocation.watchPosition(n, c);
1656
+ r({
1657
+ id: f
1658
+ });
1659
+ })) : Promise.reject({ message: "Geolocation is not enabled" });
1660
+ }, a.stopWatchPosition = async function(n) {
1661
+ return t() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(this.watchID), !0) : Promise.reject({ message: "Geolocation is not enabled" });
1662
+ }, a.getDefaultTimezone = function() {
1663
+ const { session: n } = e.auth.getCurrentUser();
1664
+ if (n) {
1665
+ const r = n?.organisation?.timezone;
1666
+ if (r)
1667
+ return r;
1668
+ }
1669
+ if (!(typeof window > "u") && window.Intl)
1670
+ return window.Intl.DateTimeFormat().resolvedOptions().timeZone;
1671
+ }, a.countryLookup = {
1672
+ AC: "Ascension Island",
1673
+ AD: "Andorra",
1674
+ AE: "United Arab Emirates",
1675
+ AF: "Afghanistan",
1676
+ AG: "Antigua And Barbuda",
1677
+ AI: "Anguilla",
1678
+ AL: "Albania",
1679
+ AM: "Armenia",
1680
+ AO: "Angola",
1681
+ AQ: "Antarctica",
1682
+ AR: "Argentina",
1683
+ AS: "American Samoa",
1684
+ AT: "Austria",
1685
+ AU: "Australia",
1686
+ AW: "Aruba",
1687
+ AX: "Åland Islands",
1688
+ AZ: "Azerbaijan",
1689
+ BA: "Bosnia & Herzegovina",
1690
+ BB: "Barbados",
1691
+ BD: "Bangladesh",
1692
+ BE: "Belgium",
1693
+ BF: "Burkina Faso",
1694
+ BG: "Bulgaria",
1695
+ BH: "Bahrain",
1696
+ BI: "Burundi",
1697
+ BJ: "Benin",
1698
+ BL: "Saint Barthélemy",
1699
+ BM: "Bermuda",
1700
+ BN: "Brunei Darussalam",
1701
+ BO: "Bolivia, Plurinational State Of",
1702
+ BQ: "Bonaire, Saint Eustatius And Saba",
1703
+ BR: "Brazil",
1704
+ BS: "Bahamas",
1705
+ BT: "Bhutan",
1706
+ BV: "Bouvet Island",
1707
+ BW: "Botswana",
1708
+ BY: "Belarus",
1709
+ BZ: "Belize",
1710
+ CA: "Canada",
1711
+ CC: "Cocos (Keeling) Islands",
1712
+ CD: "Democratic Republic Of Congo",
1713
+ CF: "Central African Republic",
1714
+ CG: "Republic Of Congo",
1715
+ CH: "Switzerland",
1716
+ CI: "Côte d'Ivoire",
1717
+ CK: "Cook Islands",
1718
+ CL: "Chile",
1719
+ CM: "Cameroon",
1720
+ CN: "China",
1721
+ CO: "Colombia",
1722
+ CP: "Clipperton Island",
1723
+ CR: "Costa Rica",
1724
+ CU: "Cuba",
1725
+ CV: "Cabo Verde",
1726
+ CW: "Curacao",
1727
+ CX: "Christmas Island",
1728
+ CY: "Cyprus",
1729
+ CZ: "Czech Republic",
1730
+ DE: "Germany",
1731
+ DG: "Diego Garcia",
1732
+ DJ: "Djibouti",
1733
+ DK: "Denmark",
1734
+ DM: "Dominica",
1735
+ DO: "Dominican Republic",
1736
+ DZ: "Algeria",
1737
+ EA: "Ceuta, Mulilla",
1738
+ EC: "Ecuador",
1739
+ EE: "Estonia",
1740
+ EG: "Egypt",
1741
+ EH: "Western Sahara",
1742
+ ER: "Eritrea",
1743
+ ES: "Spain",
1744
+ ET: "Ethiopia",
1745
+ EU: "European Union",
1746
+ FI: "Finland",
1747
+ FJ: "Fiji",
1748
+ FK: "Falkland Islands",
1749
+ FM: "Micronesia, Federated States Of",
1750
+ FO: "Faroe Islands",
1751
+ TF: "French Southern Territories",
1752
+ FR: "France",
1753
+ FX: "France, Metropolitan",
1754
+ GA: "Gabon",
1755
+ GB: "United Kingdom",
1756
+ GD: "Grenada",
1757
+ GE: "Georgia",
1758
+ GF: "French Guiana",
1759
+ GG: "Guernsey",
1760
+ GH: "Ghana",
1761
+ GI: "Gibraltar",
1762
+ GL: "Greenland",
1763
+ GM: "Gambia",
1764
+ GN: "Guinea",
1765
+ GP: "Guadeloupe",
1766
+ GQ: "Equatorial Guinea",
1767
+ GR: "Greece",
1768
+ GS: "South Georgia And The South Sandwich Islands",
1769
+ GT: "Guatemala",
1770
+ GU: "Guam",
1771
+ GW: "Guinea-bissau",
1772
+ GY: "Guyana",
1773
+ HK: "Hong Kong",
1774
+ HM: "Heard Island And McDonald Islands",
1775
+ HN: "Honduras",
1776
+ HR: "Croatia",
1777
+ HT: "Haiti",
1778
+ HU: "Hungary",
1779
+ IC: "Canary Islands",
1780
+ ID: "Indonesia",
1781
+ IE: "Ireland",
1782
+ IL: "Israel",
1783
+ IM: "Isle Of Man",
1784
+ IN: "India",
1785
+ IO: "British Indian Ocean Territory",
1786
+ IQ: "Iraq",
1787
+ IR: "Iran, Islamic Republic Of",
1788
+ IS: "Iceland",
1789
+ IT: "Italy",
1790
+ JE: "Jersey",
1791
+ JM: "Jamaica",
1792
+ JO: "Jordan",
1793
+ JP: "Japan",
1794
+ KE: "Kenya",
1795
+ KG: "Kyrgyzstan",
1796
+ KH: "Cambodia",
1797
+ KI: "Kiribati",
1798
+ KM: "Comoros",
1799
+ KN: "Saint Kitts And Nevis",
1800
+ KP: "Korea, Democratic People's Republic Of",
1801
+ KR: "Korea, Republic Of",
1802
+ KW: "Kuwait",
1803
+ KY: "Cayman Islands",
1804
+ KZ: "Kazakhstan",
1805
+ LA: "Lao People's Democratic Republic",
1806
+ LB: "Lebanon",
1807
+ LC: "Saint Lucia",
1808
+ LI: "Liechtenstein",
1809
+ LK: "Sri Lanka",
1810
+ LR: "Liberia",
1811
+ LS: "Lesotho",
1812
+ LT: "Lithuania",
1813
+ LU: "Luxembourg",
1814
+ LV: "Latvia",
1815
+ LY: "Libya",
1816
+ MA: "Morocco",
1817
+ MC: "Monaco",
1818
+ MD: "Moldova",
1819
+ ME: "Montenegro",
1820
+ MF: "Saint Martin",
1821
+ MG: "Madagascar",
1822
+ MH: "Marshall Islands",
1823
+ MK: "Macedonia, The Former Yugoslav Republic Of",
1824
+ ML: "Mali",
1825
+ MM: "Myanmar",
1826
+ MN: "Mongolia",
1827
+ MO: "Macao",
1828
+ MP: "Northern Mariana Islands",
1829
+ MQ: "Martinique",
1830
+ MR: "Mauritania",
1831
+ MS: "Montserrat",
1832
+ MT: "Malta",
1833
+ MU: "Mauritius",
1834
+ MV: "Maldives",
1835
+ MW: "Malawi",
1836
+ MX: "Mexico",
1837
+ MY: "Malaysia",
1838
+ MZ: "Mozambique",
1839
+ NA: "Namibia",
1840
+ NC: "New Caledonia",
1841
+ NE: "Niger",
1842
+ NF: "Norfolk Island",
1843
+ NG: "Nigeria",
1844
+ NI: "Nicaragua",
1845
+ NL: "Netherlands",
1846
+ NO: "Norway",
1847
+ NP: "Nepal",
1848
+ NR: "Nauru",
1849
+ NU: "Niue",
1850
+ NZ: "New Zealand",
1851
+ OM: "Oman",
1852
+ PA: "Panama",
1853
+ PE: "Peru",
1854
+ PF: "French Polynesia",
1855
+ PG: "Papua New Guinea",
1856
+ PH: "Philippines",
1857
+ PK: "Pakistan",
1858
+ PL: "Poland",
1859
+ PM: "Saint Pierre And Miquelon",
1860
+ PN: "Pitcairn",
1861
+ PR: "Puerto Rico",
1862
+ PS: "Palestinian Territory, Occupied",
1863
+ PT: "Portugal",
1864
+ PW: "Palau",
1865
+ PY: "Paraguay",
1866
+ QA: "Qatar",
1867
+ RE: "Reunion",
1868
+ RO: "Romania",
1869
+ RS: "Serbia",
1870
+ RU: "Russian Federation",
1871
+ RW: "Rwanda",
1872
+ SA: "Saudi Arabia",
1873
+ SB: "Solomon Islands",
1874
+ SC: "Seychelles",
1875
+ SD: "Sudan",
1876
+ SE: "Sweden",
1877
+ SG: "Singapore",
1878
+ SH: "Saint Helena, Ascension And Tristan Da Cunha",
1879
+ SI: "Slovenia",
1880
+ SJ: "Svalbard And Jan Mayen",
1881
+ SK: "Slovakia",
1882
+ SL: "Sierra Leone",
1883
+ SM: "San Marino",
1884
+ SN: "Senegal",
1885
+ SO: "Somalia",
1886
+ SR: "Suriname",
1887
+ SS: "South Sudan",
1888
+ ST: "Sao Tome and Principe",
1889
+ SU: "USSR",
1890
+ SV: "El Salvador",
1891
+ SX: "Sint Maarten",
1892
+ SY: "Syrian Arab Republic",
1893
+ SZ: "Swaziland",
1894
+ TA: "Tristan de Cunha",
1895
+ TC: "Turks And Caicos Islands",
1896
+ TD: "Chad",
1897
+ TG: "Togo",
1898
+ TH: "Thailand",
1899
+ TJ: "Tajikistan",
1900
+ TK: "Tokelau",
1901
+ TL: "Timor-Leste, Democratic Republic of",
1902
+ TM: "Turkmenistan",
1903
+ TN: "Tunisia",
1904
+ TO: "Tonga",
1905
+ TR: "Turkey",
1906
+ TT: "Trinidad And Tobago",
1907
+ TV: "Tuvalu",
1908
+ TW: "Taiwan",
1909
+ TZ: "Tanzania, United Republic Of",
1910
+ UA: "Ukraine",
1911
+ UG: "Uganda",
1912
+ UK: "United Kingdom",
1913
+ UM: "United States Minor Outlying Islands",
1914
+ US: "United States",
1915
+ UY: "Uruguay",
1916
+ UZ: "Uzbekistan",
1917
+ VA: "Vatican City State",
1918
+ VC: "Saint Vincent And The Grenadines",
1919
+ VE: "Venezuela, Bolivarian Republic Of",
1920
+ VG: "Virgin Islands (British)",
1921
+ VI: "Virgin Islands (US)",
1922
+ VN: "Viet Nam",
1923
+ VU: "Vanuatu",
1924
+ WF: "Wallis And Futuna",
1925
+ WS: "Samoa",
1926
+ XK: "Kosovo",
1927
+ YE: "Yemen",
1928
+ YT: "Mayotte",
1929
+ ZA: "South Africa",
1930
+ ZM: "Zambia",
1931
+ ZW: "Zimbabwe"
1932
+ }, a.countryNames = Object.values(a.countryLookup), a.timezones = [
1933
+ "Africa/Abidjan",
1934
+ "Africa/Accra",
1935
+ "Africa/Addis_Ababa",
1936
+ "Africa/Algiers",
1937
+ "Africa/Asmera",
1938
+ "Africa/Bamako",
1939
+ "Africa/Bangui",
1940
+ "Africa/Banjul",
1941
+ "Africa/Bissau",
1942
+ "Africa/Blantyre",
1943
+ "Africa/Brazzaville",
1944
+ "Africa/Bujumbura",
1945
+ "Africa/Cairo",
1946
+ "Africa/Casablanca",
1947
+ "Africa/Ceuta",
1948
+ "Africa/Conakry",
1949
+ "Africa/Dakar",
1950
+ "Africa/Dar_es_Salaam",
1951
+ "Africa/Djibouti",
1952
+ "Africa/Douala",
1953
+ "Africa/El_Aaiun",
1954
+ "Africa/Freetown",
1955
+ "Africa/Gaborone",
1956
+ "Africa/Harare",
1957
+ "Africa/Johannesburg",
1958
+ "Africa/Juba",
1959
+ "Africa/Kampala",
1960
+ "Africa/Khartoum",
1961
+ "Africa/Kigali",
1962
+ "Africa/Kinshasa",
1963
+ "Africa/Lagos",
1964
+ "Africa/Libreville",
1965
+ "Africa/Lome",
1966
+ "Africa/Luanda",
1967
+ "Africa/Lubumbashi",
1968
+ "Africa/Lusaka",
1969
+ "Africa/Malabo",
1970
+ "Africa/Maputo",
1971
+ "Africa/Maseru",
1972
+ "Africa/Mbabane",
1973
+ "Africa/Mogadishu",
1974
+ "Africa/Monrovia",
1975
+ "Africa/Nairobi",
1976
+ "Africa/Ndjamena",
1977
+ "Africa/Niamey",
1978
+ "Africa/Nouakchott",
1979
+ "Africa/Ouagadougou",
1980
+ "Africa/Porto-Novo",
1981
+ "Africa/Sao_Tome",
1982
+ "Africa/Tripoli",
1983
+ "Africa/Tunis",
1984
+ "Africa/Windhoek",
1985
+ "America/Anchorage",
1986
+ "America/Anguilla",
1987
+ "America/Antigua",
1988
+ "America/Araguaina",
1989
+ "America/Argentina/La_Rioja",
1990
+ "America/Argentina/Rio_Gallegos",
1991
+ "America/Argentina/Salta",
1992
+ "America/Argentina/San_Juan",
1993
+ "America/Argentina/San_Luis",
1994
+ "America/Argentina/Tucuman",
1995
+ "America/Argentina/Ushuaia",
1996
+ "America/Aruba",
1997
+ "America/Asuncion",
1998
+ "America/Bahia",
1999
+ "America/Bahia_Banderas",
2000
+ "America/Barbados",
2001
+ "America/Belem",
2002
+ "America/Belize",
2003
+ "America/Blanc-Sablon",
2004
+ "America/Boa_Vista",
2005
+ "America/Bogota",
2006
+ "America/Boise",
2007
+ "America/Buenos_Aires",
2008
+ "America/Cambridge_Bay",
2009
+ "America/Campo_Grande",
2010
+ "America/Cancun",
2011
+ "America/Caracas",
2012
+ "America/Catamarca",
2013
+ "America/Cayenne",
2014
+ "America/Cayman",
2015
+ "America/Chicago",
2016
+ "America/Chihuahua",
2017
+ "America/Coral_Harbour",
2018
+ "America/Cordoba",
2019
+ "America/Costa_Rica",
2020
+ "America/Creston",
2021
+ "America/Cuiaba",
2022
+ "America/Curacao",
2023
+ "America/Danmarkshavn",
2024
+ "America/Dawson",
2025
+ "America/Dawson_Creek",
2026
+ "America/Denver",
2027
+ "America/Detroit",
2028
+ "America/Dominica",
2029
+ "America/Edmonton",
2030
+ "America/Eirunepe",
2031
+ "America/El_Salvador",
2032
+ "America/Fortaleza",
2033
+ "America/Glace_Bay",
2034
+ "America/Godthab",
2035
+ "America/Goose_Bay",
2036
+ "America/Grand_Turk",
2037
+ "America/Grenada",
2038
+ "America/Guadeloupe",
2039
+ "America/Guatemala",
2040
+ "America/Guayaquil",
2041
+ "America/Guyana",
2042
+ "America/Halifax",
2043
+ "America/Havana",
2044
+ "America/Hermosillo",
2045
+ "America/Indiana/Knox",
2046
+ "America/Indiana/Marengo",
2047
+ "America/Indiana/Petersburg",
2048
+ "America/Indiana/Tell_City",
2049
+ "America/Indiana/Vevay",
2050
+ "America/Indiana/Vincennes",
2051
+ "America/Indiana/Winamac",
2052
+ "America/Indianapolis",
2053
+ "America/Inuvik",
2054
+ "America/Iqaluit",
2055
+ "America/Jamaica",
2056
+ "America/Jujuy",
2057
+ "America/Juneau",
2058
+ "America/Kentucky/Monticello",
2059
+ "America/Kralendijk",
2060
+ "America/La_Paz",
2061
+ "America/Lima",
2062
+ "America/Los_Angeles",
2063
+ "America/Louisville",
2064
+ "America/Lower_Princes",
2065
+ "America/Maceio",
2066
+ "America/Managua",
2067
+ "America/Manaus",
2068
+ "America/Marigot",
2069
+ "America/Martinique",
2070
+ "America/Matamoros",
2071
+ "America/Mazatlan",
2072
+ "America/Mendoza",
2073
+ "America/Menominee",
2074
+ "America/Merida",
2075
+ "America/Mexico_City",
2076
+ "America/Moncton",
2077
+ "America/Monterrey",
2078
+ "America/Montevideo",
2079
+ "America/Montreal",
2080
+ "America/Montserrat",
2081
+ "America/Nassau",
2082
+ "America/New_York",
2083
+ "America/Nipigon",
2084
+ "America/Nome",
2085
+ "America/Noronha",
2086
+ "America/North_Dakota/Beulah",
2087
+ "America/North_Dakota/Center",
2088
+ "America/North_Dakota/New_Salem",
2089
+ "America/Ojinaga",
2090
+ "America/Panama",
2091
+ "America/Pangnirtung",
2092
+ "America/Paramaribo",
2093
+ "America/Phoenix",
2094
+ "America/Port-au-Prince",
2095
+ "America/Port_of_Spain",
2096
+ "America/Porto_Velho",
2097
+ "America/Puerto_Rico",
2098
+ "America/Rainy_River",
2099
+ "America/Rankin_Inlet",
2100
+ "America/Recife",
2101
+ "America/Regina",
2102
+ "America/Resolute",
2103
+ "America/Rio_Branco",
2104
+ "America/Santa_Isabel",
2105
+ "America/Santarem",
2106
+ "America/Santiago",
2107
+ "America/Santo_Domingo",
2108
+ "America/Sao_Paulo",
2109
+ "America/Scoresbysund",
2110
+ "America/Sitka",
2111
+ "America/St_Barthelemy",
2112
+ "America/St_Johns",
2113
+ "America/St_Kitts",
2114
+ "America/St_Lucia",
2115
+ "America/St_Thomas",
2116
+ "America/St_Vincent",
2117
+ "America/Swift_Current",
2118
+ "America/Tegucigalpa",
2119
+ "America/Thule",
2120
+ "America/Thunder_Bay",
2121
+ "America/Tijuana",
2122
+ "America/Toronto",
2123
+ "America/Tortola",
2124
+ "America/Vancouver",
2125
+ "America/Whitehorse",
2126
+ "America/Winnipeg",
2127
+ "America/Yakutat",
2128
+ "America/Yellowknife",
2129
+ "Antarctica/Casey",
2130
+ "Antarctica/Davis",
2131
+ "Antarctica/DumontDUrville",
2132
+ "Antarctica/Macquarie",
2133
+ "Antarctica/Mawson",
2134
+ "Antarctica/McMurdo",
2135
+ "Antarctica/Palmer",
2136
+ "Antarctica/Rothera",
2137
+ "Antarctica/Syowa",
2138
+ "Antarctica/Vostok",
2139
+ "Arctic/Longyearbyen",
2140
+ "Asia/Aden",
2141
+ "Asia/Almaty",
2142
+ "Asia/Amman",
2143
+ "Asia/Anadyr",
2144
+ "Asia/Aqtau",
2145
+ "Asia/Aqtobe",
2146
+ "Asia/Ashgabat",
2147
+ "Asia/Baghdad",
2148
+ "Asia/Bahrain",
2149
+ "Asia/Baku",
2150
+ "Asia/Bangkok",
2151
+ "Asia/Beirut",
2152
+ "Asia/Bishkek",
2153
+ "Asia/Brunei",
2154
+ "Asia/Calcutta",
2155
+ "Asia/Chita",
2156
+ "Asia/Choibalsan",
2157
+ "Asia/Colombo",
2158
+ "Asia/Damascus",
2159
+ "Asia/Dhaka",
2160
+ "Asia/Dili",
2161
+ "Asia/Dubai",
2162
+ "Asia/Dushanbe",
2163
+ "Asia/Hong_Kong",
2164
+ "Asia/Hovd",
2165
+ "Asia/Irkutsk",
2166
+ "Asia/Jakarta",
2167
+ "Asia/Jayapura",
2168
+ "Asia/Jerusalem",
2169
+ "Asia/Kabul",
2170
+ "Asia/Kamchatka",
2171
+ "Asia/Karachi",
2172
+ "Asia/Kathmandu",
2173
+ "Asia/Khandyga",
2174
+ "Asia/Kolkata",
2175
+ "Asia/Krasnoyarsk",
2176
+ "Asia/Kuala_Lumpur",
2177
+ "Asia/Kuching",
2178
+ "Asia/Kuwait",
2179
+ "Asia/Macau",
2180
+ "Asia/Magadan",
2181
+ "Asia/Makassar",
2182
+ "Asia/Manila",
2183
+ "Asia/Muscat",
2184
+ "Asia/Nicosia",
2185
+ "Asia/Novokuznetsk",
2186
+ "Asia/Novosibirsk",
2187
+ "Asia/Omsk",
2188
+ "Asia/Oral",
2189
+ "Asia/Phnom_Penh",
2190
+ "Asia/Pontianak",
2191
+ "Asia/Pyongyang",
2192
+ "Asia/Qatar",
2193
+ "Asia/Qyzylorda",
2194
+ "Asia/Rangoon",
2195
+ "Asia/Riyadh",
2196
+ "Asia/Saigon",
2197
+ "Asia/Sakhalin",
2198
+ "Asia/Samarkand",
2199
+ "Asia/Seoul",
2200
+ "Asia/Shanghai",
2201
+ "Asia/Singapore",
2202
+ "Asia/Srednekolymsk",
2203
+ "Asia/Taipei",
2204
+ "Asia/Tashkent",
2205
+ "Asia/Tbilisi",
2206
+ "Asia/Tehran",
2207
+ "Asia/Thimphu",
2208
+ "Asia/Tokyo",
2209
+ "Asia/Ulaanbaatar",
2210
+ "Asia/Urumqi",
2211
+ "Asia/Ust-Nera",
2212
+ "Asia/Vientiane",
2213
+ "Asia/Vladivostok",
2214
+ "Asia/Yakutsk",
2215
+ "Asia/Yekaterinburg",
2216
+ "Asia/Yerevan",
2217
+ "Atlantic/Azores",
2218
+ "Atlantic/Bermuda",
2219
+ "Atlantic/Canary",
2220
+ "Atlantic/Cape_Verde",
2221
+ "Atlantic/Faeroe",
2222
+ "Atlantic/Madeira",
2223
+ "Atlantic/Reykjavik",
2224
+ "Atlantic/South_Georgia",
2225
+ "Atlantic/St_Helena",
2226
+ "Atlantic/Stanley",
2227
+ "Australia/Adelaide",
2228
+ "Australia/Brisbane",
2229
+ "Australia/Broken_Hill",
2230
+ "Australia/Currie",
2231
+ "Australia/Darwin",
2232
+ "Australia/Hobart",
2233
+ "Australia/Lindeman",
2234
+ "Australia/Melbourne",
2235
+ "Australia/Perth",
2236
+ "Australia/Sydney",
2237
+ "CST6CDT",
2238
+ "EST5EDT",
2239
+ "Etc/GMT",
2240
+ "Etc/GMT+1",
2241
+ "Etc/GMT+10",
2242
+ "Etc/GMT+11",
2243
+ "Etc/GMT+12",
2244
+ "Etc/GMT+2",
2245
+ "Etc/GMT+3",
2246
+ "Etc/GMT+4",
2247
+ "Etc/GMT+5",
2248
+ "Etc/GMT+6",
2249
+ "Etc/GMT+7",
2250
+ "Etc/GMT-1",
2251
+ "Etc/GMT-10",
2252
+ "Etc/GMT-11",
2253
+ "Etc/GMT-12",
2254
+ "Etc/GMT-13",
2255
+ "Etc/GMT-2",
2256
+ "Etc/GMT-3",
2257
+ "Etc/GMT-4",
2258
+ "Etc/GMT-5",
2259
+ "Etc/GMT-6",
2260
+ "Etc/GMT-7",
2261
+ "Etc/GMT-8",
2262
+ "Etc/GMT-9",
2263
+ "Europe/Amsterdam",
2264
+ "Europe/Andorra",
2265
+ "Europe/Astrakhan",
2266
+ "Europe/Athens",
2267
+ "Europe/Belgrade",
2268
+ "Europe/Berlin",
2269
+ "Europe/Bratislava",
2270
+ "Europe/Brussels",
2271
+ "Europe/Bucharest",
2272
+ "Europe/Budapest",
2273
+ "Europe/Busingen",
2274
+ "Europe/Chisinau",
2275
+ "Europe/Copenhagen",
2276
+ "Europe/Dublin",
2277
+ "Europe/Gibraltar",
2278
+ "Europe/Guernsey",
2279
+ "Europe/Helsinki",
2280
+ "Europe/Isle_of_Man",
2281
+ "Europe/Istanbul",
2282
+ "Europe/Jersey",
2283
+ "Europe/Kaliningrad",
2284
+ "Europe/Kiev",
2285
+ "Europe/Kirov",
2286
+ "Europe/Lisbon",
2287
+ "Europe/Ljubljana",
2288
+ "Europe/London",
2289
+ "Europe/Luxembourg",
2290
+ "Europe/Madrid",
2291
+ "Europe/Malta",
2292
+ "Europe/Mariehamn",
2293
+ "Europe/Minsk",
2294
+ "Europe/Monaco",
2295
+ "Europe/Moscow",
2296
+ "Europe/Nicosia",
2297
+ "Europe/Oslo",
2298
+ "Europe/Paris",
2299
+ "Europe/Podgorica",
2300
+ "Europe/Prague",
2301
+ "Europe/Riga",
2302
+ "Europe/Rome",
2303
+ "Europe/Samara",
2304
+ "Europe/San_Marino",
2305
+ "Europe/Sarajevo",
2306
+ "Europe/Simferopol",
2307
+ "Europe/Skopje",
2308
+ "Europe/Sofia",
2309
+ "Europe/Stockholm",
2310
+ "Europe/Tallinn",
2311
+ "Europe/Tirane",
2312
+ "Europe/Ulyanovsk",
2313
+ "Europe/Uzhgorod",
2314
+ "Europe/Vaduz",
2315
+ "Europe/Vatican",
2316
+ "Europe/Vienna",
2317
+ "Europe/Vilnius",
2318
+ "Europe/Volgograd",
2319
+ "Europe/Warsaw",
2320
+ "Europe/Zagreb",
2321
+ "Europe/Zaporozhye",
2322
+ "Europe/Zurich",
2323
+ "Indian/Antananarivo",
2324
+ "Indian/Chagos",
2325
+ "Indian/Christmas",
2326
+ "Indian/Cocos",
2327
+ "Indian/Comoro",
2328
+ "Indian/Kerguelen",
2329
+ "Indian/Mahe",
2330
+ "Indian/Maldives",
2331
+ "Indian/Mauritius",
2332
+ "Indian/Mayotte",
2333
+ "Indian/Reunion",
2334
+ "MST7MDT",
2335
+ "PST8PDT",
2336
+ "Pacific/Apia",
2337
+ "Pacific/Auckland",
2338
+ "Pacific/Efate",
2339
+ "Pacific/Enderbury",
2340
+ "Pacific/Fakaofo",
2341
+ "Pacific/Fiji",
2342
+ "Pacific/Funafuti",
2343
+ "Pacific/Galapagos",
2344
+ "Pacific/Guadalcanal",
2345
+ "Pacific/Guam",
2346
+ "Pacific/Honolulu",
2347
+ "Pacific/Johnston",
2348
+ "Pacific/Kosrae",
2349
+ "Pacific/Kwajalein",
2350
+ "Pacific/Majuro",
2351
+ "Pacific/Midway",
2352
+ "Pacific/Nauru",
2353
+ "Pacific/Niue",
2354
+ "Pacific/Noumea",
2355
+ "Pacific/Pago_Pago",
2356
+ "Pacific/Palau",
2357
+ "Pacific/Ponape",
2358
+ "Pacific/Port_Moresby",
2359
+ "Pacific/Rarotonga",
2360
+ "Pacific/Saipan",
2361
+ "Pacific/Tahiti",
2362
+ "Pacific/Tarawa",
2363
+ "Pacific/Tongatapu",
2364
+ "Pacific/Truk",
2365
+ "Pacific/Wake",
2366
+ "Pacific/Wallis"
2367
+ ], a.getDefaultCountry = function() {
2368
+ const { session: n } = e.auth.getCurrentUser();
2369
+ if (n) {
2370
+ const r = n?.organisation?.countryCode;
2371
+ if (r) {
2372
+ const c = a.countryLookup[r];
2373
+ return {
2374
+ code: r,
2375
+ name: c
2376
+ };
2377
+ }
2378
+ }
2379
+ }, a;
2380
+ }
2381
+ const ee = function(e, a) {
2382
+ if (a = a || "production", !e.auth)
2383
+ throw new Error("Can't Instantiate QikSocket before QikAuth exists");
2384
+ const t = e.utils.guid();
2385
+ let n = {
2386
+ debug: !1,
2387
+ url: `wss://iqtm6zjz3l.execute-api.ap-southeast-2.amazonaws.com/${a}`,
2388
+ connected: !1,
2389
+ windowID: t,
2390
+ autoreconnect: !0
2391
+ }, r, c = {};
2392
+ const f = {}, d = new L();
2393
+ d.bootstrap(n), n.channel = async function(m) {
2394
+ if (c[m])
2395
+ return c[m];
2396
+ const g = new L();
2397
+ c[m] = g, n.connected || await n.connect(), n.subscribe(m), n.addEventListener(m, p);
2398
+ function p(v) {
2399
+ g.dispatch("message", v);
2400
+ }
2401
+ return g.destroy = function() {
2402
+ n.removeAllListeners(), c[m] = null;
2403
+ }, c[m];
2404
+ };
2405
+ function o(m) {
2406
+ n.debug && console.log("[socket] Connection open", m), n.connected = !0, d.dispatch("connected", m);
2407
+ }
2408
+ async function u(m) {
2409
+ m.wasClean ? n.debug && console.log(`[socket] Connection closed cleanly, code=${m.code} reason=${m.reason}`) : n.debug && console.log("[socket] - connection closed due to error", m), n.connected = !1, d.dispatch("disconnected", m), r = null, n.autoreconnect && n.reconnect();
2410
+ }
2411
+ function i(m) {
2412
+ console.log("[event] socketError", event), n.debug && console.log("[socket] Error", m), d.dispatch("error", m);
2413
+ }
2414
+ function s(m) {
2415
+ const g = JSON.parse(m.data);
2416
+ n.debug && console.log("[socket] message received", g), d.dispatch("message", g), g.channel && d.dispatch(g.channel, g);
2417
+ }
2418
+ async function l(m) {
2419
+ r.send(JSON.stringify(m));
2420
+ }
2421
+ function h() {
2422
+ return new Promise(function(m) {
2423
+ function g() {
2424
+ if (n.connected)
2425
+ return m(r);
2426
+ setTimeout(g, 1e3);
2427
+ }
2428
+ g();
2429
+ });
2430
+ }
2431
+ return n.connect = async function() {
2432
+ if (r)
2433
+ return r.connected ? (console.log("[socket] - Socket is already connected"), r) : h();
2434
+ const m = e.auth.getCurrentToken();
2435
+ if (!m) {
2436
+ n.debug && console.log("[socket] - Must be authenticated to connect to socket");
2437
+ return;
2438
+ }
2439
+ return r = new WebSocket(`${n.url}?access_token=${m}&windowid=${t}`), r.addEventListener("close", u), r.addEventListener("error", i), r.addEventListener("open", o), r.addEventListener("message", s), n.debug && console.log("[socket] - Connected with event listeners"), h();
2440
+ }, n.reconnect = async function() {
2441
+ if (n.connected)
2442
+ return;
2443
+ n.debug && console.log("[socket] reconnecting...");
2444
+ const m = await n.connect();
2445
+ return Object.keys(f).forEach(function(p) {
2446
+ n.subscribe(p);
2447
+ }), m;
2448
+ }, n.close = async function() {
2449
+ if (!r) {
2450
+ console.log("[socket] - Socket is not connected");
2451
+ return;
2452
+ }
2453
+ const m = n.autoreconnect;
2454
+ n.autoreconnect = !1, r.close(), r.removeEventListener("close", u), r.removeEventListener("error", i), r.removeEventListener("open", o), r.removeEventListener("message", s), r = null, u({ wasClean: !0 }), n.autoreconnect = m;
2455
+ }, n.disconnect = n.close, n.subscribe = async function(m) {
2456
+ if (!r) {
2457
+ console.log("[socket] - Can't subscribe to channel as socket is not connected");
2458
+ return;
2459
+ }
2460
+ l({
2461
+ action: "subscribe",
2462
+ channel: m
2463
+ }), f[m] = !0, d.dispatch("subscribe", m), n.debug && console.log(`[socket] - subscribed to ${m}`);
2464
+ }, n.unsubscribe = async function(m) {
2465
+ if (!r) {
2466
+ console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
2467
+ return;
2468
+ }
2469
+ l({
2470
+ action: "unsubscribe",
2471
+ channel: m
2472
+ }), delete f[m], d.dispatch("unsubscribe", m), n.debug && console.log(`[socket] - unsubscribed from ${m}`);
2473
+ }, n;
2474
+ };
2475
+ function oe(e) {
2476
+ switch (e || (e = {
2477
+ // apiURL,
2478
+ // applicationToken,
2479
+ // api:{}
2480
+ }), (!e.apiURL || !e.apiURL.length) && (e.apiURL = "staging"), String(e.apiURL).toLowerCase()) {
2481
+ case "production":
2482
+ e.apiURL = "https://api.qik.dev";
2483
+ break;
2484
+ case "staging":
2485
+ e.apiURL = "https://api.staging.qik.dev";
2486
+ break;
2487
+ case "local":
2488
+ e.apiURL = "http://api.qik.localhost:4001";
2489
+ break;
2490
+ }
2491
+ const a = Object.assign(e, {
2492
+ //Other options
2493
+ // domain:'',
2494
+ version: B,
2495
+ global: {}
2496
+ });
2497
+ Object.defineProperty(a, "cache", {
2498
+ value: Z,
2499
+ writable: !1
2500
+ });
2501
+ const n = A;
2502
+ Object.defineProperty(a, "utils", {
2503
+ value: n,
2504
+ writable: !1
2505
+ }), Object.defineProperty(a, "filter", {
2506
+ value: b,
2507
+ writable: !1
2508
+ });
2509
+ const c = new W(a);
2510
+ Object.defineProperty(a, "files", {
2511
+ value: c,
2512
+ writable: !1
2513
+ }), new L().bootstrap(a), a.error = function(m) {
2514
+ return a.dispatch("error", n.errorMessage(m));
2515
+ }, a.notify = function(m, g) {
2516
+ return a.dispatch("notification", { message: m, options: g });
2517
+ };
2518
+ const d = new J(a);
2519
+ Object.defineProperty(a, "api", {
2520
+ value: d,
2521
+ writable: !1
2522
+ });
2523
+ const o = new H(a);
2524
+ Object.defineProperty(a, "auth", {
2525
+ value: o,
2526
+ writable: !1
2527
+ });
2528
+ const u = new ee(a);
2529
+ Object.defineProperty(a, "socket", {
2530
+ value: u,
2531
+ writable: !1
2532
+ });
2533
+ const i = new Y(a);
2534
+ Object.defineProperty(a, "access", {
2535
+ value: i,
2536
+ writable: !1
2537
+ });
2538
+ const s = new X(a);
2539
+ Object.defineProperty(a, "system", {
2540
+ value: s,
2541
+ writable: !1
2542
+ });
2543
+ const l = new q(a);
2544
+ Object.defineProperty(a, "geo", {
2545
+ value: l,
2546
+ writable: !1
2547
+ });
2548
+ const h = new Q(a);
2549
+ return Object.defineProperty(a, "content", {
2550
+ value: h,
2551
+ writable: !1
2552
+ }), a;
2553
+ }
2554
+ var ae = `qik ${B}`;
2555
+ console.log(ae);
2556
+ export {
2557
+ L as EventDispatcher,
2558
+ oe as default
2559
+ };