@egen-civitas/esm-app-shell 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/{56fc39e12a477596.js → 09a305e14c26aa4c.js} +2 -2
- package/dist/{56fc39e12a477596.js.map → 09a305e14c26aa4c.js.map} +1 -1
- package/dist/{52f3245696d97e15.js → 1fca772e19e3c1b6.js} +1 -1
- package/dist/{52f3245696d97e15.js.map → 1fca772e19e3c1b6.js.map} +1 -1
- package/dist/27bce5d96d2f77ca.js +1 -0
- package/dist/27bce5d96d2f77ca.js.map +1 -0
- package/dist/6aadb9a4eef827fb.js +1 -0
- package/dist/{15541bd3feca17e6.js.map → 6aadb9a4eef827fb.js.map} +1 -1
- package/dist/{3f1c1976b0440132.js → 83dc1d7715f4c775.js} +1 -1
- package/dist/{3f1c1976b0440132.js.map → 83dc1d7715f4c775.js.map} +1 -1
- package/dist/8fec4ca250238f97.js +1 -0
- package/dist/8fec4ca250238f97.js.map +1 -0
- package/dist/99e304b895626c07.js +1 -0
- package/dist/99e304b895626c07.js.map +1 -0
- package/dist/a3487e3a30f88260.js +1 -0
- package/dist/a3487e3a30f88260.js.map +1 -0
- package/dist/{20c755ff6649179c.js → e30dd69f1360bbc1.js} +1 -1
- package/dist/{20c755ff6649179c.js.map → e30dd69f1360bbc1.js.map} +1 -1
- package/dist/{egen.08d314645907a8fe.js → egen.d17915ddd051e2ef.js} +2 -2
- package/dist/{egen.08d314645907a8fe.js.map → egen.d17915ddd051e2ef.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/15541bd3feca17e6.js +0 -1
- package/dist/208ea83805fb8282.js +0 -1
- package/dist/208ea83805fb8282.js.map +0 -1
- package/dist/3dec39fb5e14097c.js +0 -1
- package/dist/3dec39fb5e14097c.js.map +0 -1
- package/dist/654f4db62745a0eb.js +0 -1
- package/dist/654f4db62745a0eb.js.map +0 -1
- package/dist/a7e0b3975afec749.js +0 -1
- package/dist/a7e0b3975afec749.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_egen_civitas_esm_app_shell=self.webpackChunk_egen_civitas_esm_app_shell||[]).push([["9923"],{648(e,t){var r,n;r=this,n=function(){return function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},"object"==(t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)?e.exports=n():"function"==typeof define&&define.amd?define(n):(r="u">typeof globalThis?globalThis:r||self).dayjs_plugin_isToday=n()},8279(e,t,r){"use strict";var n=r(6233);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3642(e,t,r){"use strict";var n=r(5845),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,u=n.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,l(i)&&c({inst:i})},[e,r,t]),a(function(){return l(i)&&c({inst:i}),e(function(){l(i)&&c({inst:i})})},[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},8597(e,t,r){"use strict";e.exports=r(3642)},188(e,t,r){"use strict";r.d(t,{A:()=>u});let n="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);for(var i,o=new Uint8Array(16),a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));let u=function(e,t,r){if(n&&!t&&!e)return n();var s=(e=e||{}).random||(e.rng||function(){if(!i&&!(i="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=s[u];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(s)}},5794(e,t,r){"use strict";r.d(t,{D3:()=>f,jj:()=>d,uA:()=>c,B4:()=>p,sM:()=>h,jX:()=>l});var n=r(7988);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var u={flags:function(){var e={},t=!0,r=!1,n=void 0;try{for(var i,o=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;if(s.startsWith("egen:feature-flag:")){var u=s.replace("egen:feature-flag:",""),l=JSON.parse(localStorage.getItem("egen:feature-flag-meta:".concat(u))||"{}");e[u]=a({enabled:"true"===localStorage.getItem(s)},l)}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}return e}()},l=(0,n.getGlobalStore)("feature-flags",u);function c(e,t,r){l.setState(function(n){var i,u;return{flags:s(a({},n.flags),o({},e,{enabled:null!=(i=null==(u=n.flags[e])?void 0:u.enabled)&&i,label:t,description:r}))}})}function f(){var e=l.getState().flags;Object.keys(localStorage).filter(function(e){return e.startsWith("egen:feature-flag:")}).forEach(function(t){var r=t.replace("egen:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem("egen:feature-flag-meta:".concat(r)))})}function d(e){return l.getState().flags[e].enabled}function h(e,t){l.subscribe(function(r){t(r.flags[e].enabled)})}function p(e,t){l.setState(function(r){return{flags:s(a({},r.flags),o({},e,s(a({},r.flags[e]),{enabled:t})))}})}l.subscribe(function(e){var t=!0,r=!1,n=void 0;try{for(var o,a=Object.entries(e.flags)[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var s,u=(s=o.value,function(e){if(Array.isArray(e))return e}(s)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(t=n.next()).done)&&(i.push(t.value),2!==i.length);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(a)throw r}}return i}}(s)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=u[0],c=u[1];localStorage.setItem("egen:feature-flag:".concat(l),c.enabled.toString()),localStorage.setItem("egen:feature-flag-meta:".concat(l),JSON.stringify({label:c.label,description:c.description}))}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}})},7488(e,t,r){"use strict";r.d(t,{Ay:()=>c,BE:()=>l});var n=r(5845),i=r.n(n),o=r(8597),a=r(4873);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),u={dedupe:!0},l=a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),c=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:l,suspense:c,fallbackData:f,revalidateOnMount:d,revalidateIfStale:h,refreshInterval:p,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=r,[v,g,w,E]=a.SWRGlobalState.get(i),[O,x]=(0,a.serialize)(e),S=(0,n.useRef)(!1),k=(0,n.useRef)(!1),P=(0,n.useRef)(O),C=(0,n.useRef)(t),j=(0,n.useRef)(r),A=()=>j.current.isVisible()&&j.current.isOnline(),[D,I,R,T]=(0,a.createCacheHelper)(i,O),N=(0,n.useRef)({}).current,U=(0,a.isUndefined)(f)?r.fallback[O]:f,B=(e,t)=>{for(let r in N)if("data"===r){if(!l(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!l($,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},M=(0,n.useMemo)(()=>{let e=!!O&&!!t&&((0,a.isUndefined)(d)?!j.current.isPaused()&&!c&&(!!(0,a.isUndefined)(h)||h):d),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=D(),i=T(),o=r(n),s=n===i?o:r(i),u=o;return[()=>{let e=r(D());return B(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]},[i,O]),K=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(O,(t,r)=>{B(r,t)||e()}),[i,O]),M[0],M[1]),L=!S.current,F=v[O]&&v[O].length>0,V=K.data,q=(0,a.isUndefined)(V)?U:V,G=K.error,W=(0,n.useRef)(q),$=b?(0,a.isUndefined)(V)?W.current:V:q,H=(!F||!!(0,a.isUndefined)(G))&&(L&&!(0,a.isUndefined)(d)?d:!j.current.isPaused()&&(c?!(0,a.isUndefined)(q)&&h:(0,a.isUndefined)(q)||h)),z=!!(O&&t&&L&&H),X=(0,a.isUndefined)(K.isValidating)?z:K.isValidating,Y=(0,a.isUndefined)(K.isLoading)?z:K.isLoading,Q=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!O||!i||k.current||j.current.isPaused())return!1;let o=!0,s=e||{},u=!w[O]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!k.current&&O===P.current&&S.current:O===P.current,f={isValidating:!1,isLoading:!1},d=()=>{I(f)},h=()=>{let e=w[O];e&&e[1]===n&&delete w[O]},p={isValidating:!0};(0,a.isUndefined)(D().data)&&(p.isLoading=!0);try{if(u&&(I(p),r.loadingTimeout&&(0,a.isUndefined)(D().data)&&setTimeout(()=>{o&&c()&&j.current.onLoadingSlow(O,r)},r.loadingTimeout),w[O]=[i(x),(0,a.getTimestamp)()]),[t,n]=w[O],t=await t,u&&setTimeout(h,r.dedupingInterval),!w[O]||w[O][1]!==n)return u&&c()&&j.current.onDiscarded(O),!1;f.error=a.UNDEFINED;let e=g[O];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),u&&c()&&j.current.onDiscarded(O),!1;let s=D().data;f.data=l(s,t)?s:t,u&&c()&&j.current.onSuccess(t,O,r)}catch(r){h();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(f.error=r,u&&c()&&(e.onError(r,O,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||A())&&e.onErrorRetry(r,O,e,e=>{let t=v[O];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[O,i]),J=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,j.current=r,(0,a.isUndefined)(V)||(W.current=V)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!O)return;let e=Q.bind(a.UNDEFINED,u),t=0,r=(0,a.subscribeCallback)(O,v,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&A()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&A()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return Q();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(n)});return k.current=!1,P.current=O,S.current=!0,I({_k:x}),H&&((0,a.isUndefined)(q)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{k.current=!0,r()}},[O]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(p)?p(D().data):p;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!D().error&&(y||j.current.isVisible())&&(m||j.current.isOnline())?Q(u).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[p,y,m,O]),(0,n.useDebugValue)($),c&&(0,a.isUndefined)(q)&&O){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,j.current=r,k.current=!1;let e=E[O];if((0,a.isUndefined)(e)||s(J(e)),(0,a.isUndefined)(G)){let e=Q(u);(0,a.isUndefined)($)||(e.status="fulfilled",e.value=!0),s(e)}else throw G}return{mutate:J,get data(){return N.data=!0,$},get error(){return N.error=!0,G},get isValidating(){return N.isValidating=!0,X},get isLoading(){return N.isLoading=!0,Y}}})},6269(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(5845),i=r.n(n),o=r(8597),a=r(4873);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),u={dedupe:!0};a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig});let l=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:l,suspense:c,fallbackData:f,revalidateOnMount:d,revalidateIfStale:h,refreshInterval:p,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=r,[v,g,w,E]=a.SWRGlobalState.get(i),[O,x]=(0,a.serialize)(e),S=(0,n.useRef)(!1),k=(0,n.useRef)(!1),P=(0,n.useRef)(O),C=(0,n.useRef)(t),j=(0,n.useRef)(r),A=()=>j.current.isVisible()&&j.current.isOnline(),[D,I,R,T]=(0,a.createCacheHelper)(i,O),N=(0,n.useRef)({}).current,U=(0,a.isUndefined)(f)?r.fallback[O]:f,B=(e,t)=>{for(let r in N)if("data"===r){if(!l(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!l($,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},M=(0,n.useMemo)(()=>{let e=!!O&&!!t&&((0,a.isUndefined)(d)?!j.current.isPaused()&&!c&&(!!(0,a.isUndefined)(h)||h):d),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=D(),i=T(),o=r(n),s=n===i?o:r(i),u=o;return[()=>{let e=r(D());return B(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]},[i,O]),K=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(O,(t,r)=>{B(r,t)||e()}),[i,O]),M[0],M[1]),L=!S.current,F=v[O]&&v[O].length>0,V=K.data,q=(0,a.isUndefined)(V)?U:V,G=K.error,W=(0,n.useRef)(q),$=b?(0,a.isUndefined)(V)?W.current:V:q,H=(!F||!!(0,a.isUndefined)(G))&&(L&&!(0,a.isUndefined)(d)?d:!j.current.isPaused()&&(c?!(0,a.isUndefined)(q)&&h:(0,a.isUndefined)(q)||h)),z=!!(O&&t&&L&&H),X=(0,a.isUndefined)(K.isValidating)?z:K.isValidating,Y=(0,a.isUndefined)(K.isLoading)?z:K.isLoading,Q=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!O||!i||k.current||j.current.isPaused())return!1;let o=!0,s=e||{},u=!w[O]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!k.current&&O===P.current&&S.current:O===P.current,f={isValidating:!1,isLoading:!1},d=()=>{I(f)},h=()=>{let e=w[O];e&&e[1]===n&&delete w[O]},p={isValidating:!0};(0,a.isUndefined)(D().data)&&(p.isLoading=!0);try{if(u&&(I(p),r.loadingTimeout&&(0,a.isUndefined)(D().data)&&setTimeout(()=>{o&&c()&&j.current.onLoadingSlow(O,r)},r.loadingTimeout),w[O]=[i(x),(0,a.getTimestamp)()]),[t,n]=w[O],t=await t,u&&setTimeout(h,r.dedupingInterval),!w[O]||w[O][1]!==n)return u&&c()&&j.current.onDiscarded(O),!1;f.error=a.UNDEFINED;let e=g[O];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),u&&c()&&j.current.onDiscarded(O),!1;let s=D().data;f.data=l(s,t)?s:t,u&&c()&&j.current.onSuccess(t,O,r)}catch(r){h();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(f.error=r,u&&c()&&(e.onError(r,O,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||A())&&e.onErrorRetry(r,O,e,e=>{let t=v[O];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[O,i]),J=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,j.current=r,(0,a.isUndefined)(V)||(W.current=V)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!O)return;let e=Q.bind(a.UNDEFINED,u),t=0,r=(0,a.subscribeCallback)(O,v,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&A()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&A()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return Q();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(n)});return k.current=!1,P.current=O,S.current=!0,I({_k:x}),H&&((0,a.isUndefined)(q)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{k.current=!0,r()}},[O]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(p)?p(D().data):p;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!D().error&&(y||j.current.isVisible())&&(m||j.current.isOnline())?Q(u).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[p,y,m,O]),(0,n.useDebugValue)($),c&&(0,a.isUndefined)(q)&&O){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,j.current=r,k.current=!1;let e=E[O];if((0,a.isUndefined)(e)||s(J(e)),(0,a.isUndefined)(G)){let e=Q(u);(0,a.isUndefined)($)||(e.status="fulfilled",e.value=!0),s(e)}else throw G}return{mutate:J,get data(){return N.data=!0,$},get error(){return N.error=!0,G},get isValidating(){return N.isValidating=!0,X},get isLoading(){return N.isLoading=!0,Y}}}),c=(0,a.withMiddleware)(l,e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(t,r,n)))},3709(e,t,r){"use strict";r.d(t,{Ay:()=>f});var n=r(5845),i=r.n(n),o=r(8597),a=r(4873);let s=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),u={dedupe:!0};a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig});let l=(0,a.withArgs)((e,t,r)=>{let{cache:i,compare:l,suspense:c,fallbackData:f,revalidateOnMount:d,revalidateIfStale:h,refreshInterval:p,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=r,[v,g,w,E]=a.SWRGlobalState.get(i),[O,x]=(0,a.serialize)(e),S=(0,n.useRef)(!1),k=(0,n.useRef)(!1),P=(0,n.useRef)(O),C=(0,n.useRef)(t),j=(0,n.useRef)(r),A=()=>j.current.isVisible()&&j.current.isOnline(),[D,I,R,T]=(0,a.createCacheHelper)(i,O),N=(0,n.useRef)({}).current,U=(0,a.isUndefined)(f)?r.fallback[O]:f,B=(e,t)=>{for(let r in N)if("data"===r){if(!l(e[r],t[r])&&(!(0,a.isUndefined)(e[r])||!l($,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},M=(0,n.useMemo)(()=>{let e=!!O&&!!t&&((0,a.isUndefined)(d)?!j.current.isPaused()&&!c&&(!!(0,a.isUndefined)(h)||h):d),r=t=>{let r=(0,a.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=D(),i=T(),o=r(n),s=n===i?o:r(i),u=o;return[()=>{let e=r(D());return B(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]},[i,O]),K=(0,o.useSyncExternalStore)((0,n.useCallback)(e=>R(O,(t,r)=>{B(r,t)||e()}),[i,O]),M[0],M[1]),L=!S.current,F=v[O]&&v[O].length>0,V=K.data,q=(0,a.isUndefined)(V)?U:V,G=K.error,W=(0,n.useRef)(q),$=b?(0,a.isUndefined)(V)?W.current:V:q,H=(!F||!!(0,a.isUndefined)(G))&&(L&&!(0,a.isUndefined)(d)?d:!j.current.isPaused()&&(c?!(0,a.isUndefined)(q)&&h:(0,a.isUndefined)(q)||h)),z=!!(O&&t&&L&&H),X=(0,a.isUndefined)(K.isValidating)?z:K.isValidating,Y=(0,a.isUndefined)(K.isLoading)?z:K.isLoading,Q=(0,n.useCallback)(async e=>{let t,n,i=C.current;if(!O||!i||k.current||j.current.isPaused())return!1;let o=!0,s=e||{},u=!w[O]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!k.current&&O===P.current&&S.current:O===P.current,f={isValidating:!1,isLoading:!1},d=()=>{I(f)},h=()=>{let e=w[O];e&&e[1]===n&&delete w[O]},p={isValidating:!0};(0,a.isUndefined)(D().data)&&(p.isLoading=!0);try{if(u&&(I(p),r.loadingTimeout&&(0,a.isUndefined)(D().data)&&setTimeout(()=>{o&&c()&&j.current.onLoadingSlow(O,r)},r.loadingTimeout),w[O]=[i(x),(0,a.getTimestamp)()]),[t,n]=w[O],t=await t,u&&setTimeout(h,r.dedupingInterval),!w[O]||w[O][1]!==n)return u&&c()&&j.current.onDiscarded(O),!1;f.error=a.UNDEFINED;let e=g[O];if(!(0,a.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),u&&c()&&j.current.onDiscarded(O),!1;let s=D().data;f.data=l(s,t)?s:t,u&&c()&&j.current.onSuccess(t,O,r)}catch(r){h();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(f.error=r,u&&c()&&(e.onError(r,O,e),(!0===t||(0,a.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||A())&&e.onErrorRetry(r,O,e,e=>{let t=v[O];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[O,i]),J=(0,n.useCallback)((...e)=>(0,a.internalMutate)(i,P.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{C.current=t,j.current=r,(0,a.isUndefined)(V)||(W.current=V)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!O)return;let e=Q.bind(a.UNDEFINED,u),t=0,r=(0,a.subscribeCallback)(O,v,(r,n={})=>{if(r==a.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&A()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==a.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&A()&&e();else if(r==a.revalidateEvents.MUTATE_EVENT)return Q();else if(r==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(n)});return k.current=!1,P.current=O,S.current=!0,I({_k:x}),H&&((0,a.isUndefined)(q)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{k.current=!0,r()}},[O]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,a.isFunction)(p)?p(D().data):p;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!D().error&&(y||j.current.isVisible())&&(m||j.current.isOnline())?Q(u).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[p,y,m,O]),(0,n.useDebugValue)($),c&&(0,a.isUndefined)(q)&&O){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,j.current=r,k.current=!1;let e=E[O];if((0,a.isUndefined)(e)||s(J(e)),(0,a.isUndefined)(G)){let e=Q(u);(0,a.isUndefined)($)||(e.status="fulfilled",e.value=!0),s(e)}else throw G}return{mutate:J,get data(){return N.data=!0,$},get error(){return N.error=!0,G},get isValidating(){return N.isValidating=!0,X},get isLoading(){return N.isLoading=!0,Y}}}),c=Promise.resolve(),f=(0,a.withMiddleware)(l,e=>(t,r,i)=>{let s,u=(0,n.useRef)(!1),{cache:l,initialSize:f=1,revalidateAll:d=!1,persistSize:h=!1,revalidateFirstPage:p=!0,revalidateOnMount:y=!1,parallel:m=!1}=i,[,,,b]=a.SWRGlobalState.get(a.cache);try{(s=(0,a.serialize)(t?t(0,null):null)[0])&&(s=a.INFINITE_PREFIX+s)}catch(e){}let[v,g,w]=(0,a.createCacheHelper)(l,s),E=(0,n.useCallback)(()=>(0,a.isUndefined)(v()._l)?f:v()._l,[l,s,f]);(0,o.useSyncExternalStore)((0,n.useCallback)(e=>s?w(s,()=>{e()}):()=>{},[l,s]),E,E);let O=(0,n.useCallback)(()=>{let e=v()._l;return(0,a.isUndefined)(e)?f:e},[s,f]),x=(0,n.useRef)(O());(0,a.useIsomorphicLayoutEffect)(()=>{if(!u.current){u.current=!0;return}s&&g({_l:h?x.current:O()})},[s,l]);let S=y&&!u.current,k=e(s,async e=>{let n=v()._i,o=v()._r;g({_r:a.UNDEFINED});let s=[],u=O(),[c]=(0,a.createCacheHelper)(l,e),f=c().data,h=[],y=null;for(let e=0;e<u;++e){let[u,c]=(0,a.serialize)(t(e,m?null:y));if(!u)break;let[v,g]=(0,a.createCacheHelper)(l,u),w=v().data,E=d||n||(0,a.isUndefined)(w)||p&&!e&&!(0,a.isUndefined)(f)||S||f&&!(0,a.isUndefined)(f[e])&&!i.compare(f[e],w);if(r&&("function"==typeof o?o(w,c):E)){let t=async()=>{if(u in b){let e=b[u];delete b[u],w=await e}else w=await r(c);g({data:w,_k:c}),s[e]=w};m?h.push(t):await t()}else s[e]=w;m||(y=w)}return m&&await Promise.all(h.map(e=>e())),g({_i:a.UNDEFINED}),s},i),P=(0,n.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return s?(n&&((0,a.isUndefined)(e)?g({_i:!0,_r:r.revalidate}):g({_i:!1,_r:r.revalidate})),arguments.length?k.mutate(e,{...r,revalidate:n}):k.mutate()):c},[s,l]),C=(0,n.useCallback)(e=>{let r;if(!s)return c;let[,n]=(0,a.createCacheHelper)(l,s);if((0,a.isFunction)(e)?r=e(O()):"number"==typeof e&&(r=e),"number"!=typeof r)return c;n({_l:r}),x.current=r;let i=[],[o]=(0,a.createCacheHelper)(l,s),u=null;for(let e=0;e<r;++e){let[r]=(0,a.serialize)(t(e,u)),[n]=(0,a.createCacheHelper)(l,r),s=r?n().data:a.UNDEFINED;if((0,a.isUndefined)(s))return P(o().data);i.push(s),u=s}return P(i)},[s,l,P,O]);return{size:O(),setSize:C,mutate:P,get data(){return k.data},get error(){return k.error},get isValidating(){return k.isValidating},get isLoading(){return k.isLoading}}})},4356(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e}r.d(t,{A:()=>c});var s=function(){function e(){i(this,e)}return a(e,[{key:"add",value:function(e,t,r){if("string"!=typeof arguments[0])for(var n in arguments[0])this.add(n,arguments[0][n],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}]),e}(),u=function(){function e(t){i(this,e),this.jsep=t,this.registered={}}return a(e,[{key:"register",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];r.forEach(function(t){if((void 0===t?"undefined":t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)!="object"||!t.name||!t.init)throw Error("Invalid JSEP plugin format");e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}]),e}(),l=function(){function e(t){i(this,e),this.expr=t,this.index=0}return a(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,r){if(e.hooks[t]){var n={context:this,node:r};return e.hooks.run(t,n),n.node}return r}},{key:"searchHook",value:function(t){if(e.hooks[t]){var r={context:this};return e.hooks[t].find(function(e){return e.call(r.context,r),r.node}),r.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),r=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",r)}},{key:"gobbleExpressions",value:function(t){for(var r,n,i=[];this.index<this.expr.length;)if((r=this.code)===e.SEMCOL_CODE||r===e.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())i.push(n);else if(this.index<this.expr.length){if(r===t)break;this.throwError('Unexpected "'+this.char+'"')}return i}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),r=t.length;r>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,r,n,i,o,a,s,u,l,c;if(!(a=this.gobbleToken())||!(r=this.gobbleBinaryOp()))return a;for(o={value:r,prec:e.binaryPrecedence(r),right_a:e.right_associative.has(r)},(s=this.gobbleToken())||this.throwError("Expected expression after "+r),i=[a,o,s];r=this.gobbleBinaryOp();){if(0===(n=e.binaryPrecedence(r))){this.index-=r.length;break}for(o={value:r,prec:n,right_a:e.right_associative.has(r)},l=r;i.length>2&&(c=i[i.length-2],o.right_a&&c.right_a?n>c.prec:n<=c.prec);)s=i.pop(),r=i.pop().value,a=i.pop(),t={type:e.BINARY_EXP,operator:r,left:a,right:s},i.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+l),i.push(o,t)}for(u=i.length-1,t=i[u];u>1;)t={type:e.BINARY_EXP,operator:i[u-1].value,left:i[u-2],right:t},u-=2;return t}},{key:"gobbleToken",value:function(){var t,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"))return this.runHook("after-token",i);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)i=this.gobbleArray();else{for(n=(r=this.expr.substr(this.index,e.max_unop_len)).length;n>0;){if(e.unary_ops.hasOwnProperty(r)&&(!e.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;var o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--n)}e.isIdentifierStart(t)?(i=this.gobbleIdentifier(),e.literals.hasOwnProperty(i.name)?i={type:e.LITERAL,value:e.literals[i.name],raw:i.name}:i.name===e.this_str&&(i={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var r=this.code;r===e.PERIOD_CODE||r===e.OBRACK_CODE||r===e.OPAREN_CODE||r===e.QUMARK_CODE;){var n=void 0;if(r===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(r=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(r===e.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,r,n="";e.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(n+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(n+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(n+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")")}return r=this.code,e.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+n+this.char+")"):(r===e.PERIOD_CODE||1===n.length&&n.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(n),raw:n}}},{key:"gobbleStringLiteral",value:function(){for(var t="",r=this.index,n=this.expr.charAt(this.index++),i=!1;this.index<this.expr.length;){var o=this.expr.charAt(this.index++);if(o===n){i=!0;break}if("\\"===o)switch(o=this.expr.charAt(this.index++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,r=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(t=this.code,e.isIdentifierPart(t))this.index++;else break;return{type:e.IDENTIFIER,name:this.expr.slice(r,this.index)}}},{key:"gobbleArguments",value:function(t){for(var r=[],n=!1,i=0;this.index<this.expr.length;){this.gobbleSpaces();var o=this.code;if(o===t){n=!0,this.index++,t===e.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(o===e.COMMA_CODE){if(this.index++,++i!==r.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=r.length;a<i;a++)r.push(null)}}else if(r.length!==i&&0!==i)this.throwError("Expected comma");else{var s=this.gobbleExpression();s&&s.type!==e.COMPOUND||this.throwError("Expected comma"),r.push(s)}}return n||this.throwError("Expected "+String.fromCharCode(t)),r}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return(this.index++,1===t.length)?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.4.0"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,r,n){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=r,n?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,r){return e.literals[t]=r,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t,r;return(t=Math).max.apply(t,[0].concat(function(e){if(Array.isArray(e))return n(e)}(r=Object.keys(e).map(function(e){return e.length}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return n(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}();Object.assign(l,{hooks:new s,plugins:new u(l),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),l.max_unop_len=l.getMaxKeyLen(l.unary_ops),l.max_binop_len=l.getMaxKeyLen(l.binary_ops);var c=function(e){return new l(e).parse()},f=Object.getOwnPropertyNames(function e(){i(this,e)});Object.getOwnPropertyNames(l).filter(function(e){return!f.includes(e)&&void 0===c[e]}).forEach(function(e){c[e]=l[e]}),c.Jsep=l,c.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){for(var o=r;o.right.operator&&e.binary_ops[o.right.operator]<=.9;)o=o.right;t.node.test=o.right,o.right=t.node,t.node=r}}else this.throwError("Expected :")}})}})},7403(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(2102);let i=(0,r(6317).A)(function(e,t,r){(0,n.A)(e,t,r)})},2879(e,t,r){"use strict";function n(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e){return(a="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)})(e)}function s(e){return(s="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)})(e)}function u(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(s(r)));return function(){var e,n=r(t);if(null!=(e=HTMLElement)&&"u">typeof Symbol&&e[Symbol.hasInstance]?!e[Symbol.hasInstance](n):!(n instanceof e))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(s(n)));return n}}r.d(t,{A:()=>f,i:()=>l});var l=null;try{l=require("react").createContext()}catch(e){}var c={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function f(e){if("object"!==a(e))throw Error("single-spa-react requires a configuration object");var t,r=o(o({},c),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!l&&r.React.createContext&&(l=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:d.bind(null,r),mount:h.bind(null,r),unmount:p.bind(null,r)};return r.parcelCanUpdate&&(n.update=y.bind(null,r)),n}function d(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function h(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var i,o=b(e,t,function(){r(this)}),a=u(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,i=e.domElement,o=t[r];if("function"!=typeof o)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=o(i);return a.render(n),a;case"hydrateRoot":return o(i,n);default:return o(n,i),null}}({elementToRender:o,domElement:a,reactDom:m(e),renderType:"function"==typeof(i=e).renderType?i.renderType():i.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function p(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():m(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function y(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=b(e,t,null),i=e.renderResults[t.name];if(i&&i.render)i.render(n);else{var o=u(e,t)();m(e).render(n,o)}})}function m(e){return e.ReactDOMClient||e.ReactDOM}function b(e,t,r){var n=e.React.createElement(e.rootComponent,t),i=l?e.React.createElement(l.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),i=e.React.createElement(e.errorBoundaryClass,t,i)),i=e.React.createElement(e.SingleSpaRoot,o(o({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),i)}},3447(e,t,r){"use strict";r.d(t,{mI:()=>w,ly:()=>M,dZ:()=>v,rm:()=>K,Bv:()=>l,Vs:()=>S,cD:()=>c,KU:()=>u,XM:()=>U,Ty:()=>P,E$:()=>x,TG:()=>A,qd:()=>D,pJ:()=>I,SY:()=>f,R5:()=>N,g8:()=>g,iS:()=>k,r_:()=>T,Zu:()=>s,bS:()=>B});var n,i,o=r(7530);function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}var s="".concat(o.restBaseUrl,"/attachment");function u(e,t){return(0,o.egenFetch)("".concat(s,"/").concat(e),{signal:t.signal})}function l(e,t,r){return(0,o.egenFetch)("".concat(s,"?entity=").concat(e,"&includeOrphan=").concat(t),{signal:r.signal})}function c(e,t){var r;return(r=function(){var r;return function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return(r=new FormData).append("fileCaption",t.fileDescription),r.append("entity",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),[2,(0,o.egenFetch)("".concat(s),{method:"POST",body:r})]})},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)})})()}function f(e,t){return(0,o.egenFetch)("".concat(s,"/").concat(e),{method:"DELETE",signal:t.signal})}var d=r(6563);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function y(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){p(o,n,i,a,s,"next",e)}function s(e){p(o,n,i,a,s,"throw",e)}a(void 0)})}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(r=i.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function v(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return y(function(){var n,i,a,s;return b(this,function(u){switch(u.label){case 0:var l;if(!e)return[3,2];return n=null,[4,Promise.all([(0,o.egenFetch)("".concat(o.fhirBaseUrl,"/Entity/").concat(e),t).catch(function(e){return n=e}),r?(l=e,y(function(){var e,t;return b(this,function(r){switch(r.label){case 0:return[4,(0,d.pb)("entity-registration")];case 1:return[2,null!=(e=null==(t=r.sent().find(function(e){return e.fhirEntity.id===l}))?void 0:t.fhirEntity)?e:null]}})})()):Promise.resolve(null)])];case 1:if(a=(i=m.apply(void 0,[u.sent(),2]))[0],s=i[1],a.ok)return[2,a.data];if(s)return[2,s];if(n)throw n;u.label=2;case 2:return[2,null]}})})()}function g(e,t){var r=new CustomEvent("egen:".concat(e),{detail:null!=t?t:void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function w(e,t){var r=function(e){t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener("egen:".concat(e),r),function(){window.removeEventListener("egen:".concat(e),r)}}var E=r(4391),O=r(3862);function x(e){return{uuid:e.uuid,display:e.display}}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);var n=r.toString(),i="".concat(o.restBaseUrl,"/location").concat(n?"?"+n:"");return(0,o.egenObservableFetch)(i).pipe((0,E.T)(function(e){return e.data.results.map(x)})).pipe((0,O.s)(1))}function k(e){return{uuid:e.uuid,display:e.display,name:e.name}}function P(){return(0,o.egenObservableFetch)("".concat(o.restBaseUrl,"/sessiontype")).pipe((0,E.T)(function(e){return e.data.results.map(k)})).pipe((0,O.s)(1))}var C=r(7988),j=r(3989),A=((n={}).NEW="startSession",n.EDIT="editSession",n.LOADING="loadingSession",n),D=((i={}).NOTSTARTED="notStarted",i.ONGOING="ongoing",i),I="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,interactions:(uuid,display,interactionDatetime,form:(uuid,name),location:ref,interactionType:ref,interactionHandlers:(uuid,display,handler:(uuid,display))),entity:(uuid,display),sessionType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",R=function(){try{return JSON.parse(sessionStorage.getItem("egen:sessionStoreState")||"null")}catch(e){return null}}()||{entityUuid:null,manuallySetSessionUuid:null,mutateSessionCallbacks:{}};function T(){return(0,C.getGlobalStore)("session",R)}function N(e,t){T().setState({entityUuid:e,manuallySetSessionUuid:t})}function U(e,t){return(0,o.egenFetch)("".concat(o.restBaseUrl,"/session"),{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function B(e,t,r){return(0,o.egenFetch)("".concat(o.restBaseUrl,"/session/").concat(e),{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function M(e,t,r){return(0,o.egenFetch)("".concat(o.restBaseUrl,"/session?entity=").concat(e,"&v=").concat(null!=r?r:I),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}T().subscribe(function(e){var t;t=e,sessionStorage.setItem("egen:sessionStoreState",JSON.stringify(t))});var K=new j.BehaviorSubject(null)},6014(e,t,r){"use strict";r.d(t,{dX:()=>x,wE:()=>C,_3:()=>g,uN:()=>P,$F:()=>S,Gz:()=>O,eb:()=>E,Sj:()=>k,mv:()=>w,PQ:()=>n.A});var n=r(4356),i="ArrowFunctionExpression";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var s=r(4693);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)})}}function f(e,t,r){return(f=b()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&p(i,r.prototype),i}).apply(null,arguments)}function d(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return u(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function v(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k(e,t,j)}function w(e){return c(function(e){var t=arguments;return v(this,function(r){return[2,P(e,t.length>1&&void 0!==t[1]?t[1]:{},j)]})}).apply(this,arguments)}function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k(e,t,A)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P(e,t,A)}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k(e,t,D)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P(e,t,D)}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e&&((void 0===e?"undefined":m(e))!=="object"||!e||!("type"in e)))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});var i=T(t,s.z),o=I("string"==typeof e?(0,n.A)(e):e,i);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}}function P(e,t){return c(function(e){var t,r,i,o=arguments;return v(this,function(a){if(t=o.length>1&&void 0!==o[1]?o[1]:{},r=o.length>2?o[2]:void 0,"string"!=typeof e&&((void 0===e?"undefined":m(e))!=="object"||!e||!("type"in e)))return[2,Promise.reject("Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string."))];if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};return null==t&&(t={}),i=T(t,s.f),[2,Promise.resolve(I("string"==typeof e?(0,n.A)(e):e,i)).then(function(t){if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}})]})}).apply(this,arguments)}function C(e){return(0,n.A)(e)}function j(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||d(e,Date)}function A(e){return"boolean"==typeof e}function D(e){return"number"==typeof e}function I(e,t){switch(e.type){case"UnaryExpression":var r,n,i,o,a,s,u,l,c,h,p=e,b=t,v=I(p.argument,b);switch(p.operator){case"+":return+v;case"-":return-v;case"~":return~v;case"!":return!v;default:throw"Expression evaluator does not support operator '".concat(p.operator,"''")}case"BinaryExpression":var g=e,w=t,E=I(g.left,w),O=I(g.right,w);switch(g.operator){case"+":return E+O;case"-":return E-O;case"*":return E*O;case"/":return E/O;case"%":return E%O;case"**":return Math.pow(E,O);case"==":return E==O;case"===":return E===O;case"!=":return E!=O;case"!==":return E!==O;case">":return E>O;case">=":return E>=O;case"<":return E<O;case"<=":return E<=O;case"in":return E in O;case"&&":return E&&O;case"||":return E||O;case"??":return null!=E?E:O;default:throw"Expression evaluator does not support operator '".concat(g.operator,"' operator")}case"ConditionalExpression":return x=e,S=t,I(x.test,S)?I(x.consequent,S):I(x.alternate,S);case"CallExpression":var x,S,k,P=e,C=t,j=null==(k=P.arguments)?void 0:k.map(N(C)),A=I(P.callee,C);if(A){if("function"!=typeof A)throw"".concat(B(P.callee)," is not a function")}else throw"No function named ".concat(B(P.callee)," is defined in this context");return A.apply(void 0,y(j));case"ArrowFunctionExpression":return M=e,K=t,q=null!=(L=null==(V=M.params)?void 0:V.map(function(e){if("Identifier"===e.type)return e.name;throw"Cannot handle parameter of type ".concat(e.type)}))?L:[],(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length<q.length)throw"Required argument(s) ".concat(q.slice(t.length,-1).join(", ")," were not provided");var n=Object.fromEntries(q.reduce(function(e,r,n){var i=t[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||d(t,RegExp))return!0;if((void 0===t?"undefined":m(t))==="object"){var r=!0,n=!1,i=void 0;try{for(var o,a=Object.keys(t)[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if(!e(t[s]))return!1}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return!0}if(Array.isArray(t)){var u=!0,l=!1,c=void 0;try{for(var f,h=t[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var p=f.value;if(!e(p))return!1}}catch(e){l=!0,c=e}finally{try{u||null==h.return||h.return()}finally{if(l)throw c}}}return!1}(i)&&e.push([r,i]),e},[]));return I(M.body,K.addVariables(n))}).bind(null!=(F=K.thisObj)?F:null);case"MemberExpression":return function(e,t){var r,n=I(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":var i=R(e.object,t);throw ReferenceError("ReferenceError: ".concat(i," is not defined"));case"MemberExpression":var o=R(e.property,t);throw TypeError("TypeError: cannot read properties of undefined (reading '".concat(o,"')"));default:throw"VisitMemberExpression does not support operator '".concat(e.object.type,"' type")}var a=n;if("string"==typeof n)a=String.prototype;else if("number"==typeof n)a=Number.prototype;else if("function"==typeof n);else if((void 0===n?"undefined":m(n))!=="object")throw"VisitMemberExpression does not support member access on type ".concat(void 0===n?"undefined":m(n));switch(t.thisObj=a,e.property.type){case"Identifier":case"MemberExpression":r=I(e.property,t);break;default:var s=I(e.property,t);if(void 0===s)throw{type:"Illegal property access",message:"No property was supplied to the property access"};U(s),r=n[s]}return"function"==typeof r?r.bind(n):r}(e,t);case"ArrayExpression":return G=e,W=t,null==($=G.elements)?void 0:$.map(N(W));case"SequenceExpression":return H=e,z=t,(X=H.expressions.map(N(z)))[X.length-1];case"NewExpression":var D=e,T=t;if(D.callee&&"Identifier"===D.callee.type){var M,K,L,F,V,q,G,W,$,H,z,X,Y,Q=null==(Y=D.arguments)?void 0:Y.map(N(T));switch(D.callee.name){case"Date":return f(Date,y(Q));case"RegExp":return f(RegExp,y(Q));default:throw"Cannot instantiate object of type ".concat(D.callee.name)}}if(D.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return U((r=e).value),r.value;case"Identifier":var J=e,Z=t;U(J.name);var ee=Z.thisObj;if(ee&&((void 0===ee?"undefined":m(ee))==="object"||"function"==typeof ee)&&J.name in ee){var et=ee[J.name];return U(et),et}if(Z.variables&&J.name in Z.variables){var er=Z.variables[J.name];return U(er),er}return J.name in Z.globals?Z.globals[J.name]:void 0;case"TemplateLiteral":return n=e,i=t,l=null!=(o=null==(s=n.expressions)?void 0:s.map(N(i)))?o:[],(c=null!=(a=null==(u=n.quasis)?void 0:u.map(N(i)))?a:[]).filter(function(e){return!e.tail}).map(function(e){return e.value}).join("")+l.join("")+c.filter(function(e){return e.tail}).map(function(e){return e.value}).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}function R(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return R(e.property,t);default:throw"VisitExpressionName does not support expression of type '".concat(e.type,"'")}}function T(e,t){var r={thisObj:void 0,variables:h({},e),globals:h({},t),addVariables:function(e){return this.variables=h({},this.variables,e),this}};return r.addVariables.bind(r),r}function N(e){return function(t){return null===t?null:I(t,e)}}function U(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}}function B(e){if(!e)return null;if("MemberExpression"===e.type){var t;return null==(t=e.property)?void 0:t.name}return e.name}n.A.plugins.register({name:"arrow",init:function(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var n=this.gobbleBinaryOp();if("=>"===n){var o=this.gobbleBinaryExpression();o||this.throwError("Expected expression after "+n),t.node={type:i,params:null,body:o};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(function(e){e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&t(e)}),"=>"===r.operator&&(r.type=i,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),n.A.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){var r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;for(var n=t.node;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),n.A.plugins.register({name:"numbers",init:function(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){var r=this,n=this.index,i="",o=function(){for(;e.isDecimalDigit(r.code)||95===r.code;)95===r.code?r.index++:i+=r.expr.charAt(r.index++)};o(),this.code===e.PERIOD_CODE&&(i+=this.expr.charAt(this.index++),o());var a=this.char;("e"===a||"E"===a)&&(i+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(i+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+i+this.char+")"));var s=this.code;if(e.isIdentifierStart(s))this.throwError("Variable names cannot start with a number ("+i+this.char+")");else if(s===e.PERIOD_CODE){i.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:s,number:i},null,2))),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(i),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var i=this.index,a=this.expr.charAt(this.index+1),s=t.call(this,a);if(s){for(var u,l,c,f="";u=this.code,l=s,95===u||l.some(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(t=n.next()).done)&&(i.push(t.value),2!==i.length);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(a)throw r}}return i}}(e)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return u>=r&&u<=n});)95===this.code?this.index++:f+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(a.charCodeAt(0))){this.index=i+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(f,"x"===(c=a)||"X"===c?16:"b"===c||"B"===c?2:8),raw:this.expr.substring(i,this.index)}}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),n.A.plugins.register({name:"regex",init:function(e){e.hooks.add("gobble-token",function(t){if(47===this.code){for(var r=++this.index,n=!1;this.index<this.expr.length;){if(47===this.code&&!n){for(var i=this.expr.slice(r,this.index),o="";++this.index<this.expr.length;){var a=this.code;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)o+=this.char;else break}var s=void 0;try{s=new RegExp(i,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:s,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),n.A.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){for(var o=r;o.right.operator&&e.binary_ops[o.right.operator]<=.9;)o=o.right;t.node.test=o.right,o.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),n.A.plugins.register({name:"jsepTemplateLiteral",init:function(e){function t(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(96===this.code){for(var r={type:"TemplateLiteral",quasis:[],expressions:[]},n="",i="",o=!1,s=this.expr.length,u=function(){return r.quasis.push({type:"TemplateElement",value:{raw:i,cooked:n},tail:o})};this.index<s;){var l,c,f=this.expr.charAt(++this.index);if("`"===f)return this.index+=1,o=!0,u(),e.node=r,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===f&&"{"===this.expr.charAt(this.index+1))this.index+=2,u(),i="",n="",(c=r.expressions).push.apply(c,function(e){if(Array.isArray(e))return a(e)}(l=this.gobbleExpressions(125))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e){if(e){if("string"==typeof e)return a(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,void 0)}}(l)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),125!==this.code&&this.throwError("unclosed ${");else if("\\"===f)switch(i+=f,f=this.expr.charAt(++this.index),i+=f,f){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=f}else n+=f,i+=f}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),n.A.addBinaryOp("in",7),n.A.addBinaryOp("??",1)},4693(e,t,r){"use strict";r.d(t,{f:()=>a,z:()=>o});var n,i,o={Array:Array,Boolean:Boolean,Symbol:Symbol,Infinity:1/0,NaN:NaN,Math:Math,Number:Number,BigInt:BigInt,String:String,RegExp:RegExp,JSON:JSON,isFinite:isFinite,isNaN:isNaN,parseFloat:parseFloat,parseInt:parseInt,decodeURI:decodeURI,encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},a=(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},o),i=i={Promise:Promise},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n)},7477(e,t,r){"use strict";r.d(t,{J_:()=>ep,zx:()=>q,ES:()=>T,FY:()=>G,zF:()=>b,Uh:()=>ew,io:()=>eu,Ef:()=>d,wG:()=>eC,Qb:()=>eg,dO:()=>f,o1:()=>em,rD:()=>ev,Vx:()=>z,sr:()=>X,YX:()=>eb,Tj:()=>U,Gp:()=>H,K0:()=>M,Q_:()=>ef,a9:()=>y,xg:()=>N,DQ:()=>m,Ml:()=>ey,Xb:()=>ec,Fg:()=>J,VK:()=>B,pm:()=>es,Ju:()=>Q,cL:()=>$,ap:()=>W,Yo:()=>K,No:()=>L});var n=r(7530),i=r(5918),o=r(6014),a=r(5794),s=r(9726),u=r(2316),l=r(4809),c=r(7403);function f(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d((0,u.s)(),e,t)}function d(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!(e?t:r)}var h=r(7988),p=(0,h.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),y=function(){return(0,h.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function m(e){var t=p.getState(),r=e(t);r!==t&&p.setState(r)}var b=function(){return(0,h.getGlobalStore)("extensions",{slots:{}})};function v(e){var t=[],r=!0,n=!1,o=void 0;try{for(var a,s=Object.values(e.extensions)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=!0,f=!1,d=void 0;try{for(var h,p=u.instances[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var y=h.value;t.push({slotModuleName:y.slotModuleName,extensionModuleName:u.moduleName,slotName:y.slotName,extensionId:y.id})}}catch(e){f=!0,d=e}finally{try{c||null==p.return||p.return()}finally{if(f)throw d}}}}catch(e){n=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw o}}(0,l.A)(i.configExtensionStore.getState().mountedExtensions,t)||i.configExtensionStore.setState({mountedExtensions:t})}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){w(e,t,r[t])})}return e}function O(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(r=i.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(e,t)||k(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}}v(p.getState()),p.subscribe(v);var P=y(),C=b(),j=(0,i.getExtensionSlotsConfigStore)(),A=(0,i.getExtensionsConfigStore)();function D(e,t,r,n,o){var a={},s=(0,u.s)(),c=Object.entries(n.flags).filter(function(e){return x(e,2)[1].enabled}).map(function(e){return x(e,1)[0]}),f=!0,d=!1,h=void 0;try{for(var p,y=Object.entries(e.slots)[Symbol.iterator]();!(f=(p=y.next()).done);f=!0){var m=x(p.value,2),b=m[0],v=m[1],g=(0,i.getExtensionSlotConfigFromStore)(t,v.name).config,w=V(b,e,g,r,c,s,o.session);a[b]={moduleName:v.moduleName,assignedExtensions:w}}}catch(e){d=!0,h=e}finally{try{f||null==y.return||y.return()}finally{if(d)throw h}}(0,l.A)(C.getState().slots,a)||C.setState({slots:a})}function I(){D(P.getState(),j.getState(),A.getState(),a.jX.getState(),n.sessionStore.getState())}function R(e,t,r){return{moduleName:t,name:e,attachedIds:[],config:null,state:r}}function T(e){return x(e.split("#"),1)[0]}function N(e,t){var r=T(t);return e.extensions[r]}function U(e){return N(P.getState(),e)}P.subscribe(function(e){D(e,j.getState(),A.getState(),a.jX.getState(),n.sessionStore.getState())}),j.subscribe(function(e){D(P.getState(),e,A.getState(),a.jX.getState(),n.sessionStore.getState())}),A.subscribe(function(e){D(P.getState(),j.getState(),e,a.jX.getState(),n.sessionStore.getState())}),a.jX.subscribe(function(e){D(P.getState(),j.getState(),A.getState(),e,n.sessionStore.getState())}),n.sessionStore.subscribe(function(e){D(P.getState(),j.getState(),A.getState(),a.jX.getState(),e)}),I(),(0,s.gj)(I);var B=function(e){return P.setState(function(t){return t.extensions[e.name]=O(E({},e),{instances:[]}),t})};function M(e,t){m(function(r){var n=r.slots[e];return n?O(E({},r),{slots:O(E({},r.slots),w({},e,O(E({},n),{attachedIds:S(n.attachedIds).concat([t])})))}):O(E({},r),{slots:O(E({},r.slots),w({},e,O(E({},R(e)),{attachedIds:[t]})))})})}function K(e,t){m(function(r){var n=r.slots[e];return n&&n.attachedIds.includes(t)?O(E({},r),{slots:O(E({},r.slots),w({},e,O(E({},n),{attachedIds:n.attachedIds.filter(function(e){return e!==t})})))}):r})}function L(e){m(function(t){var r=t.slots[e];return r?O(E({},t),{slots:O(E({},t.slots),w({},e,O(E({},r),{attachedIds:[]})))}):t})}function F(e,t,r,n){var i=t.indexOf(e);if(-1!==i)return i;if(void 0!==r)return 1e3+r;var o=n.indexOf(e);return -1!==o?2e3+o:-1}function V(e,t,r,a,s,u,l){var f=(g=r,w=t.slots[e].attachedIds,O=g.add||[],x=g.remove||[],k=g.order||[],C=P.getState().extensions,S(w).concat(S(O)).filter(function(e){return!x.includes(e)}).sort(function(e,t){var r,n,i=F(e,k,null==(r=C[T(e)])?void 0:r.order,w),o=F(t,k,null==(n=C[T(t)])?void 0:n.order,w);return -1===o?-1:-1===i?1:i-o})),h=[],p=null==(j=t.slots[e])?void 0:j.state,y=p&&(void 0===p?"undefined":p&&"u">typeof Symbol&&p.constructor===Symbol?"symbol":typeof p)=="object"?E({session:l},p):{session:l},m=!0,b=!1,v=void 0;try{for(var g,w,O,x,k,C,j,A,D=f[Symbol.iterator]();!(m=(A=D.next()).done);m=!0){var I=A.value,R=(0,i.getExtensionConfigFromStore)(a,e,I).config,N=(0,i.getExtensionConfigFromExtensionSlotStore)(r,e,I),U=(0,c.A)(R,N),B=T(I),M=t.extensions[B];if(M){var K,L,V,q,G,W,$,H,z,X,Y=null!=(K=null!=(L=null==U||null==($=U["Display conditions"])?void 0:$.privileges)?L:M.privileges)?K:[];if(Y&&("string"==typeof Y||Array.isArray(Y)&&Y.length>0)&&(!(null==l?void 0:l.user)||!(0,n.userHasAccess)(Y,l.user)))continue;var Q=(null==U||null==(H=U["Display conditions"])?void 0:H.expression)||M.displayExpression;if(void 0!==Q&&"string"==typeof Q&&Q.trim().length>0)try{if(!(0,o.eb)(Q,y))continue}catch(t){console.error("Error while evaluating expression '".concat(Q,"' for extension ").concat(B," in slot ").concat(e),t);continue}if(M.featureFlag&&!s.includes(M.featureFlag)||window.offlineEnabled&&!d(u,M.online,M.offline))continue;h.push({id:I,name:B,moduleName:M.moduleName,config:U,featureFlag:M.featureFlag,meta:M.meta,online:null==(V=null!=(q=null==U||null==(z=U["Display conditions"])?void 0:z.online)?q:M.online)||V,offline:null!=(G=null!=(W=null==U||null==(X=U["Display conditions"])?void 0:X.offline)?W:M.offline)&&G})}}}catch(e){b=!0,v=e}finally{try{m||null==D.return||D.return()}finally{if(b)throw v}}return h}function q(e){var t=P.getState(),r=(0,i.getExtensionSlotConfig)(e).config,o=A.getState(),s=a.jX.getState(),l=n.sessionStore.getState(),c=(0,u.s)();return V(e,t,r,o,Object.entries(s.flags).filter(function(e){return x(e,2)[1].enabled}).map(function(e){return x(e,1)[0]}),c,l.session)}var G=function(e,t,r){return P.setState(function(n){var i,o=null==(i=n.slots[t])?void 0:i.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(t,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),n;if(o&&o==e)return n;if(n.slots[t])return O(E({},n),{slots:O(E({},n.slots),w({},t,O(E({},n.slots[t]),{moduleName:e,state:r})))});var a=R(t,e,r);return O(E({},n),{slots:O(E({},n.slots),w({},t,E({},a)))})})};function W(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];P.setState(function(n){var i=r?(0,c.A)(n.slots[e].state,t):t;return O(E({},n),{slots:O(E({},n.slots),w({},e,O(E({},n.slots[e]),{state:i})))})})}var $=function(){return C.setState(function(){return{slots:{},extensions:{}}})},H=(0,h.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function z(e){var t=e.name,r=e.basePath,n=e.mode,i=e.componentContext,o=e.state;H.setState({slotName:t,basePath:r,mode:null!=n?n:"normal",componentContext:i,state:o})}function X(e){H.getState().slotName===e&&H.setState(H.getInitialState(),!0)}var Y=(0,h.createGlobalStore)("modalRegistry",{modals:{}});function Q(e){Y.setState(function(t){return t.modals[e.name]=e,t})}function J(e){var t=Y.getState().modals[e];if(!t){var r=U(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn("Modal ".concat(e,' was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.')),Q(t))}return t}var Z=r(5565);function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function et(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){et(e,t,r[t])})}return e}function en(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ei(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return ee(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ee(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eo=(0,h.createGlobalStore)("workspaceRegistrations",{workspaces:{}}),ea=(0,h.createGlobalStore)("workspaceGroups",{workspaceGroups:{}});function es(e){eo.setState(function(t){var r,n,i,o,a,s;return{workspaces:en(er({},t.workspaces),et({},e.name,en(er({},e),{load:e.load,preferredWindowSize:null!=(r=e.preferredWindowSize)?r:"normal",type:null!=(n=e.type)?n:"form",canHide:null!=(i=e.canHide)&&i,canMaximize:null!=(o=e.canMaximize)&&o,width:null!=(a=e.width)?a:"narrow",groups:null!=(s=e.groups)?s:[]})))}})}function eu(e){ea.setState(function(t){var r=t.workspaceGroups[e.name];return r?{workspaceGroups:en(er({},t.workspaceGroups),et({},e.name,en(er({},r),{members:Array.from(new Set(ei(r.members).concat(ei(e.members))))})))}:{workspaceGroups:en(er({},t.workspaceGroups),et({},e.name,{name:e.name,members:e.members}))}})}var el=new Set;function ec(e){var t=eo.getState().workspaces;if(t[e])return t[e];var r,n,i,o,a,s,u,l,c,f,d,h,p=U(e);if(p)return el.has(e)||(console.warn("The workspace '".concat(e,'\' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.')),el.add(e)),{name:p.name,title:function(e){var t,r=null==e||null==(t=e.meta)?void 0:t.title;return"string"==typeof r?r:r&&(void 0===r?"undefined":r&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)=="object"?(0,Z.t)(e.moduleName,r.key,r.default):e.name}(p),moduleName:p.moduleName,preferredWindowSize:null!=(r=null==(u=p.meta)?void 0:u.screenSize)?r:"normal",load:p.load,type:null!=(n=null==(l=p.meta)?void 0:l.type)?n:"form",canHide:null!=(i=null==(c=p.meta)?void 0:c.canHide)&&i,canMaximize:null!=(o=null==(f=p.meta)?void 0:f.canMaximize)&&o,width:null!=(a=null==(d=p.meta)?void 0:d.width)?a:"narrow",groups:null!=(s=null==(h=p.meta)?void 0:h.groups)?s:[]};throw Error("No workspace named '".concat(e,"' has been registered."))}function ef(e){var t=ea.getState().workspaceGroups;if(t[e])return t[e];throw Error("No workspace group named '".concat(e,"' has been registered."))}function ed(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function eh(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var ep=(0,h.createGlobalStore)("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function ey(e){var t=ep.getState(),r=t.registeredWorkspacesByName,n=t.registeredWindowsByName,i=r[e];if(i){var o=n[i.window];if(o)return o;throw Error("No workspace window found with name: ".concat(i.window," for workspace: ").concat(e))}throw Error("No workspace found with name: ".concat(e))}function em(e){var t=ep.getState(),r=t.registeredGroupsByName,n=t.registeredWindowsByName[e];if(n){var i=r[n.group];if(i)return i;throw Error("No workspace group found with name: ".concat(n.group," for window: ").concat(e))}throw Error("No workspace window found with name: ".concat(e))}function eb(e){return ep.getState().openedWindows.findIndex(function(t){return t.openedWorkspaces.find(function(t){return t.workspaceName===e})})}function ev(e,t){if(0!=t.length){var r=ed({},ep.getState().registeredGroupsByName),n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(r[u.name])throw Error("Cannot register workspace group ".concat(u.name," more than once"));r[u.name]=eh(ed({},u),{moduleName:e})}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}ep.setState({registeredGroupsByName:r})}}function eg(e,t){if(0!=t.length){var r=ed({},ep.getState().registeredWindowsByName),n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(r[u.name])throw Error("Cannot register workspace window ".concat(u.name," more than once"));var l=eh(ed({},u),{moduleName:e});r[u.name]=l}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}ep.setState({registeredWindowsByName:r})}}function ew(e,t){if(0!=t.length){var r=ed({},ep.getState().registeredWorkspacesByName),n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(r[u.name])throw Error("Cannot register workspace ".concat(u.name," more than once"));var l=eh(ed({},u),{moduleName:e});r[u.name]=l}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}ep.setState({registeredWorkspacesByName:r})}}var eE=r(8400);function eO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e_(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function ex(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){ex(e,t,r[t])})}return e}function ek(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var eP=0;function eC(e,t,r,n){var i;return(i=function(e,t,r,n){var i,o,a,s,u,l,c,d,h,p,y,b,v=arguments;return function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(g){switch(g.label){case 0:if(i=v.length>4&&void 0!==v[4]?v[4]:function(e){return e},o=v.length>5&&void 0!==v[5]?v[5]:{},a=T(n),s=U(n),u=null,!e)return[3,3];if(!s)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));if(l=s.meta,c=s.moduleName,d=s.online,h=s.offline,p=s.load,!f(d,h))return[3,2];return m(function(i){var o;return ek(eS({},i),{extensions:ek(eS({},i.extensions),ex({},a,ek(eS({},i.extensions[a]),{instances:((function(e){if(Array.isArray(e))return eO(e)})(o=i.extensions[a].instances)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e){if(e){if("string"==typeof e)return eO(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eO(e,void 0)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{domElement:e,id:n,slotName:t,slotModuleName:r}])})))})}),[4,p()];case 1:y=g.sent(),b=eP++,u=(0,eE.mountRootParcel)(i(ek(eS({},y),{name:"".concat(t,"/").concat(a,"-").concat(b)})),ek(eS({},o),{_meta:l,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:c},domElement:e})),g.label=2;case 2:return[3,4];case 3:console.warn("Tried to render ".concat(n," into ").concat(t," but no DOM element was available.")),g.label=4;case 4:return[2,u]}})},function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){e_(o,r,n,a,s,"next",e)}function s(e){e_(o,r,n,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)}},6563(e,t,r){"use strict";let n;r.d(t,{nr:()=>D,xN:()=>nh,u1:()=>nN,FO:()=>np,Q1:()=>v,FE:()=>nC,sA:()=>ng,LM:()=>nn,ff:()=>nD,wn:()=>nR,Oj:()=>nF,lY:()=>ny,Zr:()=>ns,cy:()=>nm,WA:()=>nj,T$:()=>w,Gp:()=>nd,jU:()=>nv,Og:()=>A,iD:()=>nP,C$:()=>nf,qb:()=>nk,Iq:()=>na,NU:()=>nI,yD:()=>nA,Wo:()=>nL,sm:()=>nK,Io:()=>nu,wJ:()=>j,Oc:()=>O,e:()=>r3,xc:()=>nl,pb:()=>nc,bO:()=>nw,b1:()=>b,AO:()=>ni,Td:()=>nT,QP:()=>m,Gt:()=>g});try{self["workbox:window:6.5.4"]&&_()}catch(e){}function i(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var s=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function u(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var l=function(e,t){this.type=e,Object.assign(this,t)};function c(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function f(){}var d={type:"SKIP_WAITING"};function h(e,t){if(!t)return e&&e.then?e.then(f):Promise.resolve()}var p=function(e){function t(t,r){var n,i;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new s,n.en=new s,n.on=new s,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!u(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,i=r.state,o=r===n.vn,a={sw:r,isExternal:o,originalEvent:e};!o&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new l(i,a)),"installed"===i?n.wn=self.setTimeout(function(){"installed"===i&&t.waiting===r&&n.dispatchEvent(new l("waiting",a))},200):"activating"===i&&(clearTimeout(n.wn),o||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new l("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},i=function(e){var t=e.data,r=e.ports,i=e.source;return c(n.getSW(),function(){n.an.has(i)&&n.dispatchEvent(new l("message",{data:t,originalEvent:e,ports:r,sw:i}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,a=t.prototype;return a.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,i,o,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return h(new Promise(function(e){return window.addEventListener("load",e)}))},i=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),c(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&u(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new l("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(o=n())&&o.then?o.then(i):i(o)}catch(e){return Promise.reject(e)}},a.update=function(){try{return this.fn?h(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},a.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(e){try{return c(this.getSW(),function(t){return i(t,e)})}catch(e){return Promise.reject(e)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&i(this.fn.waiting,d)},a.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},a.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return c(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],o(t.prototype,r),n&&o(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return a(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),y=void 0;function m(e,t){if(void 0!==y)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),y;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");var r=new p(e,t);return y=r.register().then(function(){return r.controlling.then(function(){return r})})}function b(){return null!=y?y:Promise.resolve(void 0)}var v="x-egen-offline-response-body",g="x-egen-offline-response-status",w="x-egen-offline-caching-strategy";function E(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function O(e){var t;return(t=function(){var t,r;return function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,b()];case 1:if(!(t=n.sent()))return[3,3];return[4,t.messageSW(e)];case 2:return r=n.sent(),[3,4];case 3:r={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},n.label=4;case 4:return[2,r]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(e){E(o,n,i,a,s,"next",e)}function s(e){E(o,n,i,a,s,"throw",e)}a(void 0)})})()}function x(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){x(o,n,i,a,s,"next",e)}function s(e){x(o,n,i,a,s,"throw",e)}a(void 0)})}}function k(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var P="egen3:offline-mode",C="unavailable";function j(){return{current:C,notAvailable:"unavailable"===C,active:"on"===C}}function A(e){"unavailable"!==C&&"unavailable"!==e&&(localStorage.setItem(P,"on"===e?"active":"disabled"),C=e)}function D(){return S(function(){return k(this,function(e){switch(e.label){case 0:return[4,S(function(){var e,t;return k(this,function(r){switch(r.label){case 0:return[4,S(function(){return k(this,function(e){return[2,new Promise(function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}})]})})()];case 1:if(t=r.sent())return[3,3];return[4,S(function(){return k(this,function(e){return[2,!window.indexedDB]})})()];case 2:t=r.sent(),r.label=3;case 3:if(e=t)return[3,5];return[4,S(function(){var e;return k(this,function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]})})()];case 4:e=r.sent(),r.label=5;case 5:return[2,e]}})})()];case 1:return e.sent()||(C="active"===localStorage.getItem(P)?"on":"off"),navigator.onLine,[2]}})})()}let I="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,R=Object.keys,T=Array.isArray;function N(e,t){return"object"!=typeof t||R(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||I.Promise||(I.Promise=Promise);let U=Object.getPrototypeOf,B={}.hasOwnProperty;function M(e,t){return B.call(e,t)}function K(e,t){"function"==typeof t&&(t=t(U(e))),("u"<typeof Reflect?R:Reflect.ownKeys)(t).forEach(r=>{F(e,r,t[r])})}let L=Object.defineProperty;function F(e,t,r,n){L(e,t,N(r&&M(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function V(e){return{from:function(t){return e.prototype=Object.create(t.prototype),F(e.prototype,"constructor",e),{extend:K.bind(null,e.prototype)}}}}let q=Object.getOwnPropertyDescriptor;function G(e,t){let r;return q(e,t)||(r=U(e))&&G(r,t)}let W=[].slice;function $(e,t,r){return W.call(e,t,r)}function H(e,t){return t(e)}function z(e){if(!e)throw Error("Assertion Failed")}function X(e){I.setImmediate?setImmediate(e):setTimeout(e,0)}function Y(e,t){return e.reduce((e,r,n)=>{var i=t(r,n);return i&&(e[i[0]]=i[1]),e},{})}function Q(e,t){if("string"==typeof t&&M(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=Q(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:Q(s,t.substr(a+1))}}function J(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){z("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)J(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?T(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var u=e[a];u&&M(e,a)||(u=e[a]={}),J(u,s,r)}}else void 0===r?T(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function Z(e){var t={};for(var r in e)M(e,r)&&(t[r]=e[r]);return t}let ee=[].concat;function et(e){return ee.apply([],e)}let er="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(et([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>I[e]),en=er.map(e=>I[e]);Y(er,e=>[e,!0]);let ei=null;function eo(e){ei="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=ei&&ei.get(t);if(r)return r;if(T(t)){r=[],ei&&ei.set(t,r);for(var n=0,i=t.length;n<i;++n)r.push(e(t[n]))}else if(en.indexOf(t.constructor)>=0)r=t;else{let n=U(t);for(var o in r=n===Object.prototype?{}:Object.create(n),ei&&ei.set(t,r),t)M(t,o)&&(r[o]=e(t[o]))}return r}(e);return ei=null,t}let{toString:ea}={};function es(e){return ea.call(e).slice(8,-1)}let eu="u">typeof Symbol?Symbol.iterator:"@@iterator",el="symbol"==typeof eu?function(e){var t;return null!=e&&(t=e[eu])&&t.apply(e)}:function(){return null},ec={};function ef(e){var t,r,n,i;if(1==arguments.length){if(T(e))return e.slice();if(this===ec&&"string"==typeof e)return[e];if(i=el(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let ed="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var eh="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),ep=()=>!0;let ey=!Error("").stack;function em(){if(ey)try{throw em.arguments,Error()}catch(e){return e}return Error()}function eb(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(ep).map(e=>"\n"+e).join("")):""}var ev=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],eg=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ev),ew={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function eE(e,t){this._e=em(),this.name=e,this.message=t}function eO(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function e_(e,t,r,n){this._e=em(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=eO(e,t)}function ex(e,t){this._e=em(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=eO(e,t)}V(eE).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+eb(this._e,2))}},toString:function(){return this.name+": "+this.message}}),V(e_).from(eE),V(ex).from(eE);var eS=eg.reduce((e,t)=>(e[t]=t+"Error",e),{}),ek=eg.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=em(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ew[t]||r,this.inner=null)}return V(n).from(eE),e[t]=n,e},{});ek.Syntax=SyntaxError,ek.Type=TypeError,ek.Range=RangeError;var eP=ev.reduce((e,t)=>(e[t+"Error"]=ek[t],e),{}),eC=eg.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ek[t]),e),{});function ej(){}function eA(e){return e}function eD(e,t){return null==e||e===eA?t:function(r){return t(e(r))}}function eI(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function eR(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?eI(n,this.onsuccess):n),i&&(this.onerror=this.onerror?eI(i,this.onerror):i),void 0!==o?o:r}}function eT(e,t){return e===ej?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?eI(r,this.onsuccess):r),n&&(this.onerror=this.onerror?eI(n,this.onerror):n)}}function eN(e,t){return e===ej?t:function(r){var n=e.apply(this,arguments);N(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?eI(i,this.onsuccess):i),o&&(this.onerror=this.onerror?eI(o,this.onerror):o),void 0===n?void 0===a?void 0:a:N(n,a)}}function eU(e,t){return e===ej?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function eB(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=Array(i);i--;)o[i]=arguments[i];return r.then(function(){return t.apply(n,o)})}return t.apply(this,arguments)}}eC.ModifyError=e_,eC.DexieError=eE,eC.BulkError=ex;var eM={};let[eK,eL,eF]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,U(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,U(t),e]})(),eV=eL&&eL.then,eq=eK&&eK.constructor,eG=!!eF;var eW=!1,e$=eF?()=>{eF.then(tn)}:I.setImmediate?setImmediate.bind(null,tn):I.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{tn(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tn,0)},eH=function(e,t){e2.push([e,t]),eX&&(e$(),eX=!1)},ez=!0,eX=!0,eY=[],eQ=[],eJ=null,eZ=eA,e0={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:tP,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{tP(e[0],e[1])}catch(e){}})}},e1=e0,e2=[],e4=0,e3=[];function e6(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ej,this._lib=!1;var t=this._PSD=e1;if(eh&&(this._stackHolder=em(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==eM)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&e7(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&ti();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof e6?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,e9(t)),n&&to()}},e7.bind(null,t))}catch(e){e7(t,e)}}(this,e)}let e5={get:function(){var e=e1,t=th;function r(r,n){var i=!e.global&&(e!==e1||t!==th);let o=i&&!tb();var a=new e6((t,a)=>{te(this,new e8(tx(r,e,i,o),tx(n,e,i,o),t,a,e))});return eh&&tr(a,this),a}return r.prototype=eM,r},set:function(e){F(this,"then",e&&e.prototype===eM?e5:{get:function(){return e},set:e5.set})}};function e8(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function e7(e,t){if(eQ.push(t),null===e._state){var r=e._lib&&ti();t=eZ(t),e._state=!1,e._value=t,eh&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=G(t,"stack");t._promise=e,F(t,"stack",{get:()=>eW?r&&(r.get?r.get.apply(t):r.value):e.stack})}),eY.some(t=>t._value===e._value)||eY.push(e),e9(e),r&&to()}}function e9(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)te(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===e4&&(++e4,eH(()=>{0==--e4&&ta()},[]))}function te(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++e4,eH(tt,[r,e,t])}else e._listeners.push(t)}function tt(e,t,r){try{eJ=t;var n,i=t._value;t._state?n=e(i):(eQ.length&&(eQ=[]),n=e(i),-1===eQ.indexOf(i)&&function(e){for(var t=eY.length;t;)if(eY[--t]._value===e._value)return void eY.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{eJ=null,0==--e4&&ta(),--r.psd.ref||r.psd.finalize()}}function tr(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function tn(){ti()&&to()}function ti(){var e=ez;return ez=!1,eX=!1,e}function to(){var e,t,r;do for(;e2.length>0;)for(e=e2,e2=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(e2.length>0);ez=!0,eX=!0}function ta(){var e=eY;eY=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=e3.slice(0),r=t.length;r;)t[--r]()}function ts(e){return new e6(eM,!1,e)}function tu(e,t){var r=e1;return function(){var n=ti(),i=e1;try{return tE(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{tE(i,!1),n&&to()}}}K(e6.prototype,{then:e5,_then:function(e,t){te(this,new e8(null,null,e,t,e1))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):ts(e)):this.then(null,e=>e&&e.name===t?r(e):ts(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),ts(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eW=!0;var e=(function e(t,r,n){if(r.length===n)return r;var i="";if(!1===t._state){var o,a,s=t._value;null!=s?(o=s.name||"Error",a=s.message||s,i=eb(s,0)):(o=s,a=""),r.push(o+(a?": "+a:"")+i)}return eh&&((i=eb(t._stackHolder,2))&&-1===r.indexOf(i)&&r.push(i),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eW=!1}}},timeout:function(e,t){return e<1/0?new e6((r,n)=>{var i=setTimeout(()=>n(new ek.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,i))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&F(e6.prototype,Symbol.toStringTag,"Dexie.Promise"),e0.env=tO(),K(e6,{all:function(){var e=ef.apply(null,arguments).map(tv);return new e6(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((i,o)=>e6.resolve(i).then(r=>{e[o]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof e6)return e;if(e&&"function"==typeof e.then)return new e6((t,r)=>{e.then(t,r)});var t=new e6(eM,!0,e);return tr(t,eJ),t},reject:ts,race:function(){var e=ef.apply(null,arguments).map(tv);return new e6((t,r)=>{e.map(e=>e6.resolve(e).then(t,r))})},PSD:{get:()=>e1,set:e=>e1=e},totalEchoes:{get:()=>th},newPSD:ty,usePSD:t_,scheduler:{get:()=>eH,set:e=>{eH=e}},rejectionMapper:{get:()=>eZ,set:e=>{eZ=e}},follow:(e,t)=>new e6((r,n)=>ty((t,r)=>{var n=e1;n.unhandleds=[],n.onunhandled=r,n.finalize=eI(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},e3.push(function t(){e(),e3.splice(e3.indexOf(t),1)}),++e4,eH(()=>{0==--e4&&ta()},[])},n.finalize),e()},t,r,n))}),eq&&(eq.allSettled&&F(e6,"allSettled",function(){let e=ef.apply(null,arguments).map(tv);return new e6(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,i)=>e6.resolve(e).then(e=>n[i]={status:"fulfilled",value:e},e=>n[i]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),eq.any&&"u">typeof AggregateError&&F(e6,"any",function(){let e=ef.apply(null,arguments).map(tv);return new e6((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,i=Array(n);e.forEach((e,o)=>e6.resolve(e).then(e=>t(e),e=>{i[o]=e,--n||r(AggregateError(i))}))})}));let tl={awaits:0,echoes:0,id:0};var tc=0,tf=[],td=0,th=0,tp=0;function ty(e,t,r,n){var i=e1,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++tp;var a=e0.env;o.env=eG?{Promise:e6,PromiseProp:{value:e6,configurable:!0,writable:!0},all:e6.all,race:e6.race,allSettled:e6.allSettled,any:e6.any,resolve:e6.resolve,reject:e6.reject,nthen:tS(a.nthen,o),gthen:tS(a.gthen,o)}:{},t&&N(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=t_(o,e,r,n);return 0===o.ref&&o.finalize(),s}function tm(){return tl.id||(tl.id=++tc),++tl.awaits,tl.echoes+=100,tl.id}function tb(){return!!tl.awaits&&(0==--tl.awaits&&(tl.id=0),tl.echoes=100*tl.awaits,!0)}function tv(e){return tl.echoes&&e&&e.constructor===eq?(tm(),e.then(e=>(tb(),e),e=>(tb(),tC(e)))):e}function tg(e){++th,tl.echoes&&0!=--tl.echoes||(tl.echoes=tl.id=0),tf.push(e1),tE(e,!0)}function tw(){var e=tf[tf.length-1];tf.pop(),tE(e,!1)}function tE(e,t){var r,n=e1;if((t?!tl.echoes||td++&&e===e1:!td||--td&&e===e1)||(r=t?tg.bind(null,e):tw,eV.call(eK,r)),e!==e1&&(e1=e,n===e0&&(e0.env=tO()),eG)){var i=e0.env.Promise,o=e.env;eL.then=o.nthen,i.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(I,"Promise",o.PromiseProp),i.all=o.all,i.race=o.race,i.resolve=o.resolve,i.reject=o.reject,o.allSettled&&(i.allSettled=o.allSettled),o.any&&(i.any=o.any))}}function tO(){var e=I.Promise;return eG?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(I,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:eL.then,gthen:e.prototype.then}:{}}function t_(e,t,r,n,i){var o=e1;try{return tE(e,!0),t(r,n,i)}finally{tE(o,!1)}}function tx(e,t,r,n){return"function"!=typeof e?e:function(){var i,o=e1;r&&tm(),tE(t,!0);try{return e.apply(this,arguments)}finally{tE(o,!1),n&&(i=tb,eV.call(eK,i))}}}function tS(e,t){return function(r,n){return e.call(this,tx(r,t),tx(n,t))}}-1===(""+eV).indexOf("[native code]")&&(tm=tb=ej);let tk="unhandledrejection";function tP(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,i={promise:t,reason:e};if(I.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(tk,!0,!0),N(n,i)):I.CustomEvent&&N(n=new CustomEvent(tk,{detail:i}),i),n&&I.dispatchEvent&&(dispatchEvent(n),!I.PromiseRejectionEvent&&I.onunhandledrejection))try{I.onunhandledrejection(n)}catch(e){}eh&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var tC=e6.reject;let tj="3.2.7",tA=String.fromCharCode(65535),tD=-1/0,tI="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tR="String expected.",tT=[],tN="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tU=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),tB="__dbnames",tM="readonly",tK="readwrite";function tL(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tF={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tV(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=eo(t))[e],t)}class tq{_trans(e,t,r){let n=this._tx||e1.trans,i=this.name;function o(e,r,n){if(!n.schema[i])throw new ek.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}let a=ti();try{return n&&n.db===this.db?n===e1.trans?n._promise(e,o,r):ty(()=>n._promise(e,o,r),{trans:n,transless:e1.transless||e1}):function e(t,r,n,i){if(t.idbdb&&(t._state.openComplete||e1.letThrough||t._vip)){var o=t._createTransaction(r,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===eS.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,i))):tC(o)}return o._promise(r,(e,t)=>ty(()=>(e1.trans=o,i(e,t,o)))).then(e=>o._completion.then(()=>e))}if(t._state.openComplete)return tC(new ek.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tC(new ek.DatabaseClosed);t.open().catch(ej)}return t._state.dbReadyPromise.then(()=>e(t,r,n,i))}(this.db,e,[this.name],o)}finally{a&&to()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(T(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=R(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(r&&this.db._maxKey!==tA){let n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map(t=>e[t]))}!r&&eh&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],i)=>{let a=n[i],s=e[i];return[t||a,t||!a?tL(r,a&&a.multi?e=>{let t=Q(e,i);return T(t)&&t.some(e=>o(s,e))}:e=>o(s,Q(e,i))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,T(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(M(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){N(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,i=e;return n&&r&&(i=tV(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[i]})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{J(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||T(e))return this.where(":id").equals(e).modify(t);{let r=Q(e,this.schema.primKey.keyPath);if(void 0===r)return tC(new ek.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?R(t).forEach(r=>{J(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,i=e;return n&&r&&(i=tV(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[i],keys:null!=t?[t]:null})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{J(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tF})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,i=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new ek.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ek.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=o&&r?e.map(tV(o)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:i}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new ex(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,i=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new ek.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ek.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=o&&r?e.map(tV(o)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:i}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new ex(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new ex(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function tG(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){n||(n=eU),i||(i=ej);var a={subscribers:[],fire:i,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,i)}};return t[e]=r[e]=a,a}R(e).forEach(function(t){var r=e[t];if(T(r))o(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new ek.InvalidArgument("Invalid event config");var n=o(t,eA,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){X(function(){e.apply(null,t)})})})}})}}function tW(e,t){return V(t).from({prototype:e}),t}function t$(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tH(e,t){e.filter=tL(e.filter,t)}function tz(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>tL(n(),t()):t,e.justLimit=r&&!n}function tX(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new ek.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function tY(e,t,r){let n=tX(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function tQ(e,t,r,n){let i=e.replayFilter?tL(e.filter,e.replayFilter()):e.filter;if(e.or){let o={},a=(e,r,n)=>{if(!i||i(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),M(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),tJ(tY(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return tJ(tY(e,n,r),tL(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function tJ(e,t,r,n){var i=tu(n?(e,t,i)=>r(n(e),t,i):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=ej},t=>{e.fail(t),r=ej})||i(e.value,e,e=>r=e),r()})})}function tZ(e,t){try{let r=t0(e),n=t0(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,i=r<n?r:n;for(let r=0;r<i;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(t1(e),t1(t));case"Array":return function(e,t){let r=e.length,n=t.length,i=r<n?r:n;for(let r=0;r<i;++r){let n=tZ(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function t0(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=es(e);return"ArrayBuffer"===r?"binary":r}function t1(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class t2{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,tC.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,tC.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=tL(t.algorithm,e)}_iterate(e,t){return tQ(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&N(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>tQ(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(t$(t,!0))return r.count({trans:e,query:{index:tX(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return tQ(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&t$(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=tX(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return tQ(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,t$(t)?tz(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):tz(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),tz(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return tH(this._ctx,function(r,n,i){return!e(r.value)||(n(i),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return tH(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=tL(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&t$(t,!0)&&t.limit>0)return this._read(e=>{var r=tX(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return tH(this._ctx,function(e){var t=e.primaryKey.toString(),n=M(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var i=R(e),o=i.length;n=function(t){for(var r=!1,n=0;n<o;++n){var a=i[n],s=e[a];Q(t,a)!==s&&(J(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[],f=0,d=[],h=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(f+=e-n,R(r)))c.push(r[t])};return this.clone().primaryKeys().then(i=>{let o=c=>{let f=Math.min(l,i.length-c);return a.getMany({trans:r,keys:i.slice(c,c+f),cache:"immutable"}).then(d=>{let p=[],y=[],m=s?[]:null,b=[];for(let e=0;e<f;++e){let t=d[e],r={value:eo(t),primKey:i[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?b.push(i[c+e]):s||0===tZ(u(t),u(r.value))?(y.push(r.value),s&&m.push(i[c+e])):(b.push(i[c+e]),p.push(r.value)))}let v=t$(t)&&t.limit===1/0&&("function"!=typeof e||e===t4)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then(e=>{for(let t in e.failures)b.splice(parseInt(t),1);h(p.length,e)})).then(()=>(y.length>0||v&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:m,values:y,criteria:v,changeSpec:"function"!=typeof e&&e}).then(e=>h(y.length,e))).then(()=>(b.length>0||v&&e===t4)&&a.mutate({trans:r,type:"delete",keys:b,criteria:v}).then(e=>h(b.length,e))).then(()=>i.length>c+f&&o(c+l))})};return o(0).then(()=>{if(c.length>0)throw new e_("Error modifying one or more objects",c,f,d);return i.length})})})}delete(){var e=this._ctx,t=e.range;return t$(e)&&(e.isPrimKey&&!tN||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:i})=>{if(i)throw new e_("Could not delete some values",Object.keys(e).map(t=>e[t]),n-i);return n-i}))}):this.modify(t4)}}let t4=(e,t)=>t.value=null;function t3(e,t){return e<t?-1:+(e!==t)}function t6(e,t){return e>t?-1:+(e!==t)}function t5(e,t,r){var n=e instanceof rt?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function t8(e){return new e.Collection(e,()=>re("")).limit(0)}function t7(e,t,r,n){var i,o,a,s,u,l,c,f=r.length;if(!r.every(e=>"string"==typeof e))return t5(e,tR);function d(e){i="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),o="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?t3:t6;var t=r.map(function(e){return{lower:o(e),upper:i(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),u=t.map(function(e){return e.lower}),l=e,c="next"===e?"":n}d("next");var h=new e.Collection(e,()=>t9(s[0],u[f-1]+n));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm(function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var m=function(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==n[u])return 0>i(e[u],r[u])?e.substr(0,u)+r[u]+r.substr(u+1):0>i(e[u],n[u])?e.substr(0,u)+n[u]+r.substr(u+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>i(e[u],l)&&(s=u)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(i,d,s[y],u[y],a,l);null===m&&null===h?p=y+1:(null===h||a(h,m)>0)&&(h=m)}return r(null!==h?function(){e.continue(h+c)}:n),!1}),h}function t9(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function re(e){return{type:1,lower:e,upper:e}}class rt{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?t8(this):new this.Collection(this,()=>t9(e,t,!r,!n))}catch(e){return t5(this,tI)}}equals(e){return null==e?t5(this,tI):new this.Collection(this,()=>re(e))}above(e){return null==e?t5(this,tI):new this.Collection(this,()=>t9(e,void 0,!0))}aboveOrEqual(e){return null==e?t5(this,tI):new this.Collection(this,()=>t9(e,void 0,!1))}below(e){return null==e?t5(this,tI):new this.Collection(this,()=>t9(void 0,e,!1,!0))}belowOrEqual(e){return null==e?t5(this,tI):new this.Collection(this,()=>t9(void 0,e))}startsWith(e){return"string"!=typeof e?t5(this,tR):this.between(e,e+tA,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):t7(this,(e,t)=>0===e.indexOf(t[0]),[e],tA)}equalsIgnoreCase(e){return t7(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ef.apply(ec,arguments);return 0===e.length?t8(this):t7(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ef.apply(ec,arguments);return 0===e.length?t8(this):t7(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tA)}anyOf(){let e=ef.apply(ec,arguments),t=this._cmp;try{e.sort(t)}catch(e){return t5(this,tI)}if(0===e.length)return t8(this);let r=new this.Collection(this,()=>t9(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,i,o)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return i(o),!1;return 0===t(a,e[n])||(i(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[tD,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ef.apply(ec,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return t5(this,tI)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[tD,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,i=this._descending,o=this._min,a=this._max;if(0===e.length)return t8(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return t5(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ek.InvalidArgument);let s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers,l,c=n;function f(e,t){return c(e[0],t[0])}try{(l=e.reduce(function(e,t){let n=0,i=e.length;for(;n<i;++n){let i=e[n];if(0>r(t[0],i[1])&&r(t[1],i[0])>0){i[0]=o(i[0],t[0]),i[1]=a(i[1],t[1]);break}}return n===i&&e.push(t),e},[])).sort(f)}catch(e){return t5(this,tI)}let d=0,h=u?e=>n(e,l[d][1])>0:e=>n(e,l[d][1])>=0,p=s?e=>i(e,l[d][0])>0:e=>i(e,l[d][0])>=0,y=h,m=new this.Collection(this,()=>t9(l[0][0],l[l.length-1][1],!s,!u));return m._ondirectionchange=e=>{"next"===e?(y=h,c=n):(y=p,c=i),l.sort(f)},m._addAlgorithm((e,t,r)=>{for(var i=e.key;y(i);)if(++d===l.length)return t(r),!1;return!!(!h(i)&&!p(i))||(0===this._cmp(i,l[d][1])||0===this._cmp(i,l[d][0])||t(()=>{c===n?e.continue(l[d][0]):e.continue(l[d][1])}),!1)}),m}startsWithAnyOf(){let e=ef.apply(ec,arguments);return e.every(e=>"string"==typeof e)?0===e.length?t8(this):this.inAnyRange(e.map(e=>[e,e+tA])):t5(this,"startsWithAnyOf() only works with strings")}}function rr(e){return tu(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let ri="storagemutated",ro="x-storagemutated-1",ra=tG(null,ri);class rs{_lock(){return z(!e1.global),++this._reculock,1!==this._reculock||e1.global||(e1.lockOwnerFor=this),this}_unlock(){if(z(!e1.global),0==--this._reculock)for(e1.global||(e1.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{t_(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&e1.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(z(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new ek.DatabaseClosed(r);case"MissingAPIError":throw new ek.MissingAPI(r.message,r);default:throw new ek.OpenFailed(r)}if(!this.active)throw new ek.TransactionInactive;return z(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=tu(t=>{rn(t),this._reject(e.error)}),e.onabort=tu(t=>{rn(t),this.active&&this._reject(new ek.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=tu(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&ra.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return tC(new ek.ReadOnly("Transaction is readonly"));if(!this.active)return tC(new ek.TransactionInactive);if(this._locked())return new e6((n,i)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,i)},e1])});if(r)return ty(()=>{var e=new e6((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new e6((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=e6.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new e6((e,n)=>{r.then(r=>t._waitingQueue.push(tu(e.bind(null,r))),e=>t._waitingQueue.push(tu(n.bind(null,e)))).finally(()=>{t._waitingFor===i&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ek.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];let r=this.schema[e];if(!r)throw new ek.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function ru(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+rl(t)}}function rl(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function rc(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:Y(r,e=>[e.name,e])}}let rf=e=>{try{return e.only([[]]),rf=()=>[[]],[[]]}catch(e){return rf=()=>tA,tA}};function rd(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>Q(t,e):t=>Q(t,e)}function rh(e){return[].slice.call(e)}let rp=0;function ry(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function rm({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},i){var o;return{dbcore:(o=function(e,t,r){let n;function i(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:i,upperOpen:o}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}let{schema:o,hasGetAll:a}=(n=rh(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=T(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:rd(t)},indexes:rh(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:i}=e,a={name:t,compound:T(i),keyPath:i,unique:r,multiEntry:n,extractKey:rd(i)};return o[ry(i)]=a,a}),getIndexByKeyPath:e=>o[ry(e)]};return o[":id"]=a.primaryKey,null!=t&&(o[ry(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=o.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:o,range:a}){return new Promise((s,u)=>{let l;s=tu(s);let c=e.objectStore(t),f=null==c.keyPath,d="put"===r||"add"===r;if(!d&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:h}=n||o||{length:1};if(n&&o&&n.length!==o.length)throw Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p=[],y=[],m=0,b=e=>{++m,rn(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:m,failures:y,results:[],lastResult:void 0});3===a.type?p.push(l=c.clear()):p.push(l=c.delete(i(a)))}else{let[e,t]=d?f?[o,n]:[o,null]:[n,null];if(d)for(let n=0;n<h;++n)p.push(l=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),l.onerror=b;else for(let t=0;t<h;++t)p.push(l=c[r](e[t])),l.onerror=b}let v=e=>{let t=e.target.result;p.forEach((e,t)=>null!=e.error&&(y[t]=e.error)),s({numFailures:m,failures:y,results:"delete"===r?n:p.map(e=>e.result),lastResult:t})};l.onerror=e=>{b(e),v(e)},l.onsuccess=v})},getMany:({trans:e,keys:r})=>new Promise((n,i)=>{n=tu(n);let o=e.objectStore(t),a=r.length,s=Array(a),u,l=0,c=0,f=e=>{let t=e.target;s[t._pos]=t.result,++c===l&&n(s)},d=rr(i);for(let e=0;e<a;++e)null!=r[e]&&((u=o.get(r[e]))._pos=e,u.onsuccess=f,u.onerror=d,++l);0===l&&n(s)}),get:({trans:e,key:r})=>new Promise((n,i)=>{n=tu(n);let o=e.objectStore(t).get(r);o.onsuccess=e=>n(e.target.result),o.onerror=rr(i)}),query:e=>new Promise((r,n)=>{r=tu(r);let{trans:o,values:s,limit:u,query:l}=e,c=u===1/0?void 0:u,{index:f,range:d}=l,h=o.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=i(d);if(0===u)return r({result:[]});if(a){let e=s?p.getAll(y,c):p.getAllKeys(y,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=rr(n)}else{let e=0,t=!s&&"openKeyCursor"in p?p.openKeyCursor(y):p.openCursor(y),i=[];t.onsuccess=n=>{let o=t.result;return o?(i.push(s?o.value:o.primaryKey),++e===u?r({result:i}):void o.continue()):r({result:i})},t.onerror=rr(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:o,unique:a}){return new Promise((s,u)=>{s=tu(s);let{index:l,range:c}=n,f=e.objectStore(t),d=l.isPrimaryKey?f:f.index(l.name),h=o?a?"prevunique":"prev":a?"nextunique":"next",p=!r&&"openKeyCursor"in d?d.openKeyCursor(i(c),h):d.openCursor(i(c),h);p.onerror=rr(u),p.onsuccess=tu(t=>{let r=p.result;if(!r)return void s(null);r.___id=++rp,r.done=!1;let n=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));let o=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=tu(u),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=tu(e),p.onerror=rr(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return p.onsuccess=tu(e=>{p.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=i,r.advance=o,s(),t},s(r)},u)})},count({query:e,trans:r}){let{index:n,range:o}=e;return new Promise((e,a)=>{let s=r.objectStore(t),u=n.isPrimaryKey?s:s.index(n.name),l=i(o),c=l?u.count(l):u.count();c.onsuccess=tu(t=>e(t.target.result)),c.onerror=rr(a)})}}}),u={};return s.forEach(e=>u[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:rf(t),schema:o}}(t,r,i),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),o))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function rb({_novip:e},t,r,n){r.forEach(r=>{let i=n[r];t.forEach(t=>{let n=G(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?F(t,r,{get(){return this.table(r)},set(e){L(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))})})}function rv({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function rg(e,t){return e._cfg.version-t._cfg.version}function rw(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let i=e[r],o=t[r];if(i){let e={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")==""+(o.primKey.keyPath||"")&&(i.primKey.auto===o.primKey.auto||tN)){let t,r=i.idxByName,a=o.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],i=a[t];n?n.src!==i.src&&e.change.push(i):e.add.push(i)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,o])}return n}function rE(e,t,r,n){let i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>rO(i,e)),i}function rO(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function r_(e,t,r){let n={};return $(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),i=t.keyPath,o=ru(rl(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);i=r.keyPath;var s=ru(r.name,i,!!r.unique,!!r.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(s)}n[e]=rc(e,o,a)}),n}function rx({_novip:e},t,r){let n=r.db.objectStoreNames;for(let i=0;i<n.length;++i){let o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,i="string"==typeof n?n:"["+$(n).join("+")+"]";if(t[o]){let e=t[o].idxByName[i];e&&(e.name=r,delete t[o].idxByName[i],t[o].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&I.WorkerGlobalScope&&I instanceof I.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class rS{_parseStoresSpec(e,t){R(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return ru(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),T(n),0===t)}),i=n.shift();if(i.multi)throw new ek.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new ek.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ek.Schema("Index must have a name and cannot be an empty string")}),t[r]=rc(r,i,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?N(this._cfg.storesSource,e):e;let r=t._versions,n={},i={};return r.forEach(e=>{N(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)}),t._dbSchema=i,rv(t,[t._allTables,t,t.Transaction.prototype]),rb(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],R(i),i),t._storeNames=R(i),this}upgrade(e){return this._cfg.contentUpgrade=eB(this._cfg.contentUpgrade||ej,e),this}}function rk(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new rW(tB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function rP(e){return e&&"function"==typeof e.databases}function rC(e){return ty(function(){return e1.letThrough=!0,e()})}function rj(e){var t=t=>e.next(t),r=i(t),n=i(t=>e.throw(t));function i(e){return t=>{var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):T(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function rA(e,t,r){var n=arguments.length;if(n<2)throw new ek.InvalidArgument("Too few arguments");for(var i=Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,et(i),r]}function rD(e,t,r){let n=T(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let rI={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,i={},o=[];function a(e,t,r){let n=ry(e),s=i[n]=i[n]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...r,isVirtual:l,keyTail:t,keyLength:u,extractKey:rd(e),unique:!l&&r.unique};return s.push(c),c.isPrimaryKey||o.push(c),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(i[":id"]=[s],n.indexes))a(e.keyPath,0,e);function u(t){var r,n;let i=t.query.index;return i.isVirtual?{...t,query:{index:i,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:rD(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:rD(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:o,getIndexByKeyPath:function(e){let t=i[ry(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){let{keyTail:n,isVirtual:i,keyLength:o}=t.query.index;return i?r.openCursor(u(t)).then(r=>r&&Object.create(r,{continue:{value:function(i){null!=i?r.continue(rD(i,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,i){r.continuePrimaryKey(rD(t,e.MAX_KEY,n),i)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===o?e[0]:e.slice(0,o)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function rR(e,t,r,n){return r=r||{},n=n||"",R(e).forEach(i=>{if(M(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){let e=es(o);e!==es(a)?r[n+i]=t[i]:"Object"===e?rR(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0}),R(t).forEach(i=>{M(e,i)||(r[n+i]=t[i])}),r}let rT={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let i=e1.trans,{deleting:o,creating:a,updating:s}=i.table(t).hook;switch(e.type){case"add":if(a.fire===ej)break;return i._promise("readwrite",()=>u(e),!0);case"put":if(a.fire===ej&&s.fire===ej)break;return i._promise("readwrite",()=>u(e),!0);case"delete":if(o.fire===ej)break;return i._promise("readwrite",()=>u(e),!0);case"deleteRange":if(o.fire===ej)break;return i._promise("readwrite",()=>(function e(t,i,o){return r.query({trans:t,values:!1,query:{index:n,range:i},limit:o}).then(({result:r})=>u({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...i,lower:r[r.length-1],lowerOpen:!0},o)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function u(e){var t,i;let u=e1.trans,l=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!l)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:l}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(i=e).type?Promise.resolve([]):r.getMany({trans:i.trans,keys:l,cache:"immutable"})).then(t=>{let i=l.map((r,i)=>{let l=t[i],c={onerror:null,onsuccess:null};if("delete"===e.type)o.fire.call(c,r,l,u);else if("add"===e.type||void 0===l){let t=a.fire.call(c,r,e.values[i],u);null==r&&null!=t&&(r=t,e.keys[i]=r,n.outbound||J(e.values[i],n.keyPath,r))}else{let t=rR(l,e.values[i]),n=s.fire.call(c,t,r,l,u);if(n){let t=e.values[i];Object.keys(n).forEach(e=>{M(t,e)?t[e]=n[e]:J(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:o,lastResult:a})=>{for(let o=0;o<l.length;++o){let a=n?n[o]:l[o],s=i[o];null==a?s.onerror&&s.onerror(r[o]):s.onsuccess&&s.onsuccess("put"===e.type&&t[o]?e.values[o]:a)}return{failures:r,results:n,numFailures:o,lastResult:a}}).catch(e=>(i.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function rN(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let i=0,o=0;i<t.keys.length&&o<e.length;++i)0===tZ(t.keys[i],e[o])&&(n.push(r?eo(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}let rU={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=rN(e.keys,e.trans._cache,"clone"===e.cache);return t?e6.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?eo(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function rB(e){return!("from"in e)}let rM=function(e,t){if(!this){let t=new rM;return e&&"d"in e&&N(t,e),t}N(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function rK(e,t,r){let n=tZ(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(rB(e))return N(e,{from:t,to:r,d:1});let i=e.l,o=e.r;if(0>tZ(r,e.from))return i?rK(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rV(e);if(tZ(t,e.to)>0)return o?rK(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rV(e);0>tZ(t,e.from)&&(e.from=t,e.l=null,e.d=o?o.d+1:1),tZ(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;i&&!e.l&&rL(e,i),o&&a&&rL(e,o)}function rL(e,t){rB(t)||function e(t,{from:r,to:n,l:i,r:o}){rK(t,r,n),i&&e(t,i),o&&e(t,o)}(e,t)}function rF(e){let t=rB(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>tZ(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=tZ(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rV(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){let t="r"===i?"l":"r",r={...e},n=e[i];e.from=n.from,e.to=n.to,e[i]=n[i],r[i]=n[t],e[t]=r,r.d=rq(r)}e.d=rq(e)}function rq({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}K(rM.prototype,{add(e){return rL(this,e),this},addKey(e){return rK(this,e,e),this},addKeys(e){return e.forEach(e=>rK(this,e,e)),this},[eu](){return rF(this)}});let rG={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new rM(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let i=e.table(n),{schema:o}=i,{primaryKey:a}=o,{extractKey:s,outbound:u}=a,l={...i,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new rM)},l=u(""),c=u(":dels"),{type:f}=e,[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],p=e.trans._cache;return i.mutate(e).then(e=>{if(T(d)){"delete"!==f&&(d=e.results),l.addKeys(d);let t=rN(d,p);t||"add"===f||c.addKeys(d),(t||h)&&o.indexes.forEach(function(e){let r=u(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let i=t=>e.multiEntry&&T(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||h).forEach((e,r)=>{let o=t&&n(t[r]),a=h&&n(h[r]);0!==tZ(o,a)&&(null!=o&&i(o),null!=a&&i(a))})})}else if(d){let e={from:d.lower,to:d.upper};c.add(e),l.add(e)}else l.add(r),c.add(r),o.indexes.forEach(e=>u(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,i;return[t,new rM(null!=(n=r.lower)?n:e.MIN_KEY,null!=(i=r.upper)?i:e.MAX_KEY)]},f={get:e=>[a,new rM(e.key)],getMany:e=>[a,(new rM).addKeys(e.keys)],count:c,query:c,openCursor:c};return R(f).forEach(e=>{l[e]=function(o){let{subscr:a}=e1;if(a){let l=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new rM)},c=l(""),d=l(":dels"),[h,p]=f[e](o);if(l(h.name||"").add(p),!h.isPrimaryKey){if("count"!==e){let t="query"===e&&u&&o.values&&i.query({...o,values:!1});return i[e].apply(this,arguments).then(r=>{if("query"===e){if(u&&o.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=o.values?r.result.map(s):r.result;o.values?c.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=o.values;return r&&Object.create(r,{key:{get:()=>(d.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return d.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}d.add(r)}}return i[e].apply(this,arguments)}}),l}}}};class rW{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=rW.dependencies;this._options=t={addons:rW.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:i}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ej,dbReadyPromise:null,cancelOpen:ej,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};o.dbReadyPromise=new e6(e=>{o.dbReadyResolve=e}),o.openCanceller=new e6((e,t)=>{o.cancelOpen=t}),this._state=o,this.name=e,this.on=tG(this,"populate","blocked","versionchange","close",{ready:[eB,ej]}),this.on.ready.subscribe=H(this.on.ready.subscribe,e=>(t,r)=>{rW.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||e6.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,tW(t2.prototype,function(e,t){this.db=r;let n=tF,i=null;if(t)try{n=t()}catch(e){i=e}let o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==eA?s:null}})),this.Table=function(e){return tW(tq.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:tG(null,{creating:[eR,ej],reading:[eD,eA],updating:[eN,ej],deleting:[eT,ej]})})}(this),this.Transaction=function(e){return tW(rs.prototype,function(t,r,n,i,o){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=tG(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new e6((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),tC(e)})})}(this),this.Version=function(e){return tW(rS.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return tW(rt.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let i=e._deps.indexedDB;if(!i)throw new ek.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=(e,t)=>i.cmp(t,e),this._max=(e,t)=>i.cmp(e,t)>0?e:t,this._min=(e,t)=>0>i.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=rf(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),tT.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(rI),this.use(rT),this.use(rG),this.use(rU),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new ek.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ek.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(rg),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||e1.letThrough||this._vip)?e():new e6((e,t)=>{if(this._state.openComplete)return t(new ek.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ek.DatabaseClosed);this.open().catch(ej)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:t,level:null==r?10:r,name:n}),i.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?tC(r.dbOpenError):e);eh&&(r.openCanceller._stackHolder=em()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let i=r.openCanceller;function o(){if(r.openCanceller!==i)throw new ek.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,u=!1,l=()=>new e6((t,i)=>{if(o(),!n)throw new ek.MissingAPI;let a=e.name,l=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!l)throw new ek.MissingAPI;l.onerror=rr(i),l.onblocked=tu(e._fireOnBlocked),l.onupgradeneeded=tu(t=>{if(s=l.transaction,r.autoSchema&&!e._options.allowEmptyDB){l.onerror=rn,s.abort(),l.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=tu(()=>{i(new ek.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,d;s.onerror=rr(i);var o,c,f=t.oldVersion>0x4000000000000000?0:t.oldVersion;u=f<1,e._novip.idbdb=l.result,o=f/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(i),a=n._reject.bind(n),d=e1.transless||e1,ty(()=>{e1.trans=n,e1.transless=d,0===o?(R(r).forEach(e=>{rE(c,e,r[e].primKey,r[e].indexes)}),rm(e,c),e6.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let i=[],o=e._versions,a=e._dbSchema=r_(e,e.idbdb,n),s=!1;return o.filter(e=>e._cfg.version>=t).forEach(o=>{i.push(()=>{let i=a,u=o._cfg.dbschema;rx(e,i,n),rx(e,u,n),a=e._dbSchema=u;let l=rw(i,u);l.add.forEach(e=>{rE(n,e[0],e[1].primKey,e[1].indexes)}),l.change.forEach(e=>{if(e.recreate)throw new ek.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>rO(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),rO(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=o._cfg.contentUpgrade;if(c&&o._cfg.version>t){let t;rm(e,n),r._memoizedTables={},s=!0;let o=Z(u);l.del.forEach(e=>{o[e]=i[e]}),rv(e,[e.Transaction.prototype]),rb(e,[e.Transaction.prototype],R(o),o),r.schema=o;let a=ed(c);a&&tm();let f=e6.follow(()=>{if((t=c(r))&&a){var e=tb.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?e6.resolve(t):f.then(()=>t)}}),i.push(t=>{var n;s&&tN||(n=o._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),rv(e,[e.Transaction.prototype]),rb(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return i.length?e6.resolve(i.shift()(r.idbtrans)).then(e):e6.resolve()})().then(()=>{var e;R(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||rE(n,t,e[t].primKey,e[t].indexes)})})})(e,o,n,c).catch(a)})}},i),l.onsuccess=tu(()=>{s=null;let n=e._novip.idbdb=l.result,i=$(n.objectStoreNames);if(i.length>0)try{let t,o=n.transaction(1===i.length?i[0]:i,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=r_(0,t,r);e._storeNames=$(t.objectStoreNames,0),rb(e,[e._allTables],R(n),n)}(e,n,o):(rx(e,e._dbSchema,o),((t=rw(r_(0,e.idbdb,o),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),rm(e,o)}catch(e){}tT.push(e),n.onversionchange=tu(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=tu(t=>{e.on("close").fire(t)}),u&&function({indexedDB:e,IDBKeyRange:t},r){rP(e)||r===tB||rk(e,t).put({name:r}).catch(ej)}(e._deps,a),t()},i)}).catch(e=>e&&"UnknownError"===e.name&&r.PR1398_maxLoop>0?(r.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),l()):e6.reject(e));return e6.race([i,("u"<typeof navigator?e6.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(l)]).then(()=>(o(),r.onReadyBeingFired=[],e6.resolve(rC(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(eB,ej);return r.onReadyBeingFired=[],e6.resolve(rC(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return i===r.openCanceller&&e._close(),tC(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=tT.indexOf(this);if(t>=0&&tT.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new e6(t=>{e.dbReadyResolve=t}),e.openCanceller=new e6((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ek.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new e6((r,n)=>{let i=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tu(()=>{!function({indexedDB:e,IDBKeyRange:t},r){rP(e)||r===tB||rk(e,t).delete(r).catch(ej)}(this._deps,this.name),r()}),e.onerror=rr(n),e.onblocked=this._fireOnBlocked};if(e)throw new ek.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(i):i()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return R(this._allTables).map(e=>this._allTables[e])}transaction(){let e=rA.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,i,o=e1.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(i=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===tM)n=tM;else{if("rw"!=e&&e!=tK)throw new ek.InvalidArgument("Invalid transaction mode: "+e);n=tK}if(o){if(o.mode===tM&&n===tK){if(!a)throw new ek.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&i.forEach(e=>{if(o&&-1===o.storeNames.indexOf(e)){if(!a)throw new ek.SubTransaction("Table "+e+" not included in parent transaction.");o=null}}),a&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(t,r)=>{r(e)}):tC(e)}let s=(function e(t,r,n,i,o){return e6.resolve().then(()=>{let a,s=e1.transless||e1,u=t._createTransaction(r,n,t._dbSchema,i);if(i)u.idbtrans=i.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===eS.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,o))):tC(i)}let l=ed(o);l&&tm();let c=e6.follow(()=>{if(a=o.call(u,u))if(l){var e=tb.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=rj(a))},{trans:u,transless:s});return(a&&"function"==typeof a.then?e6.resolve(a).then(e=>u.active?e:tC(new ek.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(i&&u._resolve(),u._completion.then(()=>e))).catch(e=>(u._reject(e),tC(e)))})}).bind(null,this,n,i,o,r);return o?o._promise(n,s,"lock"):e1.trans?t_(e1.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!M(this._allTables,e))throw new ek.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let r$="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class rH{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[r$](){return this}}function rz(e,t){return R(t).forEach(r=>{rL(e[r]||(e[r]=new rM),t[r])}),e}try{n={indexedDB:I.indexedDB||I.mozIndexedDB||I.webkitIndexedDB||I.msIndexedDB,IDBKeyRange:I.IDBKeyRange||I.webkitIDBKeyRange}}catch(e){n={indexedDB:null,IDBKeyRange:null}}function rX(e){let t=rY;try{rY=!0,ra.storagemutated.fire(e)}finally{rY=t}}K(rW,{...eC,delete:e=>new rW(e,{addons:[]}).delete(),exists:e=>new rW(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return rP(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==tB)):rk(e,t).toCollection().primaryKeys()})(rW.dependencies).then(e)}catch(e){return tC(new ek.MissingAPI)}},defineClass:()=>function(e){N(this,e)},ignoreTransaction:e=>e1.trans?t_(e1.transless,e):e(),vip:rC,async:function(e){return function(){try{var t=rj(e.apply(this,arguments));return t&&"function"==typeof t.then?t:e6.resolve(t)}catch(e){return tC(e)}}},spawn:function(e,t,r){try{var n=rj(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:e6.resolve(n)}catch(e){return tC(e)}},currentTransaction:{get:()=>e1.trans||null},waitFor:function(e,t){let r=e6.resolve("function"==typeof e?rW.ignoreTransaction(e):e).timeout(t||6e4);return e1.trans?e1.trans.waitFor(r):r},Promise:e6,debug:{get:()=>eh,set:e=>{eh=e,ep="dexie"===e?()=>!0:tU}},derive:V,extend:N,props:K,override:H,Events:tG,on:ra,liveQuery:function(e){let t,r=!1,n=new rH(n=>{let i=ed(e),o=!1,a={},s={},u={get closed(){return o},unsubscribe:()=>{o=!0,ra.storagemutated.unsubscribe(d)}};n.start&&n.start(u);let l=!1,c=!1;function f(){return R(s).some(e=>a[e]&&function(e,t){let r=rF(t),n=r.next();if(n.done)return!1;let i=n.value,o=rF(e),a=o.next(i.from),s=a.value;for(;!n.done&&!a.done;){if(0>=tZ(s.from,i.to)&&tZ(s.to,i.from)>=0)return!0;0>tZ(i.from,s.from)?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}(a[e],s[e]))}let d=e=>{rz(a,e),f()&&h()},h=()=>{let p,y;if(l||o)return;a={};let m={},b=(i&&tm(),p=()=>ty(e,{subscr:m,trans:null}),y=e1.trans?t_(e1.transless,p):p(),i&&y.then(tb,tb),y);c||(ra(ri,d),c=!0),l=!0,Promise.resolve(b).then(e=>{r=!0,t=e,l=!1,o||(f()?h():(a={},s=m,n.next&&n.next(e)))},e=>{l=!1,r=!1,n.error&&n.error(e),u.unsubscribe()})};return h(),u});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:rz,getByKeyPath:Q,setByKeyPath:J,delByKeyPath:function(e,t){"string"==typeof t?J(e,t,void 0):"length"in t&&[].map.call(t,function(t){J(e,t,void 0)})},shallowClone:Z,deepClone:eo,getObjectDiff:rR,cmp:tZ,asap:X,minKey:tD,addons:[],connections:tT,errnames:eS,dependencies:n,semVer:tj,version:tj.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),rW.maxKey=rf(rW.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(ra(ri,e=>{if(!rY){let t;tN?(t=document.createEvent("CustomEvent")).initCustomEvent(ro,!0,!0,e):t=new CustomEvent(ro,{detail:e}),rY=!0,dispatchEvent(t),rY=!1}}),addEventListener(ro,({detail:e})=>{rY||rX(e)}));let rY=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(ro);"function"==typeof e.unref&&e.unref(),ra(ri,t=>{rY||e.postMessage(t)}),e.onmessage=e=>{e.data&&rX(e.data)}}else if("u">typeof self&&"u">typeof navigator){ra(ri,e=>{try{rY||("u">typeof localStorage&&localStorage.setItem(ro,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:ro,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===ro){let t=JSON.parse(e.newValue);t&&rX(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===ro&&rX(e.changedParts)})}e6.rejectionMapper=function(e,t){if(!e||e instanceof eE||e instanceof TypeError||e instanceof SyntaxError||!e.name||!eP[e.name])return e;var r=new eP[e.name](t||e.message,e);return"stack"in e&&F(r,"stack",{get:function(){return this.inner.stack}}),r},ep=tU;var rQ=r(7530),rJ=r(7988);function rZ(e){return(rZ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r0(e,t){return(r0=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r1=function(){return!!e})()}function r2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var r4=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,r,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return n=["EsmOffline"],r=rZ(r=t),r2(e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,r1()?Reflect.construct(r,n||[],rZ(this).constructor):r.apply(this,n)),"syncQueue",void 0),r2(e,"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r0(t,e),t}(rW);function r3(){return new r4}function r6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r5(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function r8(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){r5(o,n,i,a,s,"next",e)}function s(e){r5(o,n,i,a,s,"throw",e)}a(void 0)})}}function r7(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(r=i.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r6(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r9(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var ne=new r4,nt={},nr=(0,rJ.createGlobalStore)("offline-synchronization",{});function nn(){return nr}function ni(){return r8(function(){var e,t,r,n,i,o,a,s,u,l,c,f,d;return r9(this,function(h){switch(h.label){case 0:if(nr.getState().synchronization)return[2];return[4,ne.syncQueue.count()];case 1:e=h.sent(),t={},n=(r=Object.entries(nt)).length,i={},o=new AbortController,a=function(){var e,t,r=nr.getState().synchronization;nr.setState({synchronization:(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},r),t=t={pendingCount:r.pendingCount-1},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e)})},h.label=2;case 2:h.trys.push([2,,10,11]),nr.setState({synchronization:{totalCount:e,pendingCount:e,abortController:o}}),s=0,h.label=3;case 3:if(!(s<n&&r.length>0))return[3,8];u=r.length,h.label=4;case 4:if(!u--)return[3,7];if(c=(l=r7(r[u],2))[0],!(d=(f=l[1]).dependsOn.map(function(e){return t[e]})).every(Boolean))return[3,6];return i[c]={},[4,Promise.all(d)];case 5:h.sent(),t[c]=function(e,t,r,n){return r8(function(e,t,r,n){var i,o,a,s,u,l,c,f,d,h,p,y,m,b,v,g,w;return r9(this,function(E){switch(E.label){case 0:return i=e.type,o=e.dependsOn,a=e.process,s=[],u=[],[4,no()];case 1:return l=E.sent(),[4,ne.syncQueue.where({type:i,userId:l}).each(function(e,t){s.push([t.primaryKey,e.content,e.descriptor]),u.push(e.content)})];case 2:E.sent(),c=0,E.label=3;case 3:if(!(c<s.length))return[3,11];d=(f=r7(s[c],3))[0],h=f[1],y=(p=f[2]).id,b=void 0===(m=p.dependencies)?[]:m,E.label=4;case 4:return E.trys.push([4,7,9,10]),[4,a(h,{abort:r,index:c,items:u,userId:l,dependencies:b.map(function(e){var r=e.id,n=e.type;return o.includes(n)?t[n][r]:void 0})})];case 5:return v=E.sent(),void 0!==y&&(t[i][y]=v),[4,ne.syncQueue.delete(d)];case 6:case 8:return E.sent(),[3,10];case 7:var O,x;return O=g=E.sent(),w=(null!=(x=Error)&&"u">typeof Symbol&&x[Symbol.hasInstance]?!!x[Symbol.hasInstance](O):O instanceof x)?g:{name:"UnknownError",message:String(g)},[4,ne.syncQueue.update(d,{lastError:{name:w.name,message:w.message}})];case 9:return n(),[7];case 10:return c++,[3,3];case 11:return[2]}})}).apply(this,arguments)}(f,i,o,a),r.splice(u,1),h.label=6;case 6:return[3,4];case 7:return s++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return h.sent(),[3,11];case 10:return nr.setState({synchronization:void 0}),[7];case 11:return[2]}})})()}function no(){return r8(function(){var e;return r9(this,function(t){switch(t.label){case 0:return[4,(0,rQ.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}})})()}function na(e,t,r,n){return r8(function(){var i;return r9(this,function(o){switch(o.label){case 0:if(void 0===(i=n&&n.id))return[3,2];return[4,ne.syncQueue.where({type:t,userId:e}).filter(function(e){return(null==e?void 0:e.descriptor.id)===i}).delete().catch(rW.errnames.DatabaseClosed)];case 1:o.sent(),o.label=2;case 2:return[4,ne.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(rW.errnames.DatabaseClosed,function(){return -1})];case 3:return[2,o.sent()]}})})()}function ns(e,t,r){return r8(function(){return r9(this,function(n){switch(n.label){case 0:return[4,no()];case 1:return[4,na(n.sent(),e,t,r)];case 2:return[2,n.sent()]}})})()}function nu(e,t){return r8(function(){return r9(this,function(r){switch(r.label){case 0:return[4,nl(e,t)];case 1:return[2,r.sent().map(function(e){return e.content})]}})})()}function nl(e,t){return r8(function(){var r;return r9(this,function(n){switch(n.label){case 0:return r=t?{type:t,userId:e}:{userId:e},[4,ne.syncQueue.where(r).toArray().catch(rW.errnames.DatabaseClosed,function(){return[]})];case 1:return[2,n.sent()]}})})()}function nc(e){return r8(function(){return r9(this,function(t){switch(t.label){case 0:return[4,no()];case 1:return[4,nu(t.sent(),e)];case 2:return[2,t.sent()]}})})()}function nf(e){return r8(function(){return r9(this,function(t){switch(t.label){case 0:return[4,no()];case 1:return[4,nl(t.sent(),e)];case 2:return[2,t.sent()]}})})()}function nd(e){return r8(function(){return r9(this,function(t){switch(t.label){case 0:return[4,ne.syncQueue.get(e).catch(rW.errnames.DatabaseClosed,function(){})];case 1:return[2,t.sent()]}})})()}function nh(e){var t;return!!(null==(t=nt[e])?void 0:t.options.onBeginEditSyncItem)}function np(e){return r8(function(){var t,r,n;return r9(this,function(i){switch(i.label){case 0:return[4,nd(e)];case 1:if(!(r=i.sent()))throw Error("No sync item with the ID ".concat(e," exists."));if(!(n=null==(t=nt[r.type])?void 0:t.options.onBeginEditSyncItem))throw Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));return n(r),[2]}})})()}function ny(e){return r8(function(){return r9(this,function(t){switch(t.label){case 0:return[4,ne.syncQueue.delete(e).catch(rW.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}})})()}function nm(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};nt[e]={type:e,dependsOn:t,process:r,options:n}}var nb=r(188),nv="OFFLINE+";function ng(){return nv+(0,nb.A)()}function nw(e){return e.startsWith(nv)}function nE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nO(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}function n_(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){nO(o,n,i,a,s,"next",e)}function s(e){nO(o,n,i,a,s,"throw",e)}a(void 0)})}}function nx(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var nS={};function nk(){return Object.values(nS)}function nP(e){nS[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),nS[e.id]=e}function nC(e){return n_(function(){return nx(this,function(t){switch(t.label){case 0:return[4,nU()];case 1:return[4,nj(t.sent(),e)];case 2:return[2,t.sent()]}})})()}function nj(e,t){return n_(function(){var r;return nx(this,function(n){switch(n.label){case 0:return r=t?{type:t,users:e}:{users:e},[4,new r4().dynamicOfflineData.where(r).toArray().catch(rW.errnames.DatabaseClosed,function(){return[]})];case 1:return[2,n.sent()]}})})()}function nA(e,t){return n_(function(){return nx(this,function(r){switch(r.label){case 0:return[4,nU()];case 1:return[4,nD(r.sent(),e,t)];case 2:return[2,r.sent()]}})})()}function nD(e,t,r){return n_(function(){var n,i;return nx(this,function(o){switch(o.label){case 0:return[4,(n=new r4).dynamicOfflineData.get({type:t,identifier:r}).catch(rW.errnames.DatabaseClosed,function(){})];case 1:if(i=o.sent())return[3,3];return[4,n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(rW.errnames.DatabaseClosed)];case 2:return o.sent(),[3,5];case 3:var a;if(i.users.includes(e))return[3,5];return[4,n.dynamicOfflineData.update(i.id,{users:((function(e){if(Array.isArray(e))return nE(e)})(a=i.users)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e){if(e){if("string"==typeof e)return nE(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nE(e,void 0)}}(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])}).catch(rW.errnames.DatabaseClosed)];case 4:o.sent(),o.label=5;case 5:return[2]}})})()}function nI(e,t){return n_(function(){return nx(this,function(r){switch(r.label){case 0:return[4,nU()];case 1:return[4,nR(r.sent(),e,t)];case 2:return[2,r.sent()]}})})()}function nR(e,t,r){return n_(function(){var n,i;return nx(this,function(o){switch(o.label){case 0:return[4,(n=new r4).dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(rW.errnames.DatabaseClosed,function(){})];case 1:if(!(i=o.sent()))return[3,5];if(!(i.users.length>1))return[3,3];return[4,n.dynamicOfflineData.update(i.id,{users:i.users.filter(function(t){return t!==e})}).catch(rW.errnames.DatabaseClosed)];case 2:return o.sent(),[3,5];case 3:return[4,n.dynamicOfflineData.delete(i.id).catch(rW.errnames.DatabaseClosed)];case 4:o.sent(),o.label=5;case 5:return[2]}})})()}function nT(e,t){return n_(function(){return nx(this,function(r){switch(r.label){case 0:return[4,nC(e)];case 1:return[4,Promise.all(r.sent().map(function(e){return n_(function(){return nx(this,function(r){return[2,nN(e.type,e.identifier,t)]})})()}))];case 2:return r.sent(),[2]}})})()}function nN(e,t,r){return n_(function(){var n,i,o,a,s,u,l,c,f;return nx(this,function(d){switch(d.label){case 0:return[4,nA(e,t)];case 1:return d.sent(),n=new r4,[4,nU()];case 2:return i=d.sent(),[4,n.dynamicOfflineData.get({type:e,identifier:t}).catch(rW.errnames.DatabaseClosed,function(){})];case 3:if(o=d.sent(),a=nk().filter(function(t){return t.type===e}),!o)return[2];return[4,Promise.all(a.map(function(e){return n_(function(){var n,i,o;return nx(this,function(a){try{return e.sync(t,r),[2,{id:e.id,error:void 0}]}catch(t){return o=null!=(n=null==(i=t.message)?void 0:i.toString())?n:t.toString(),[2,{id:e.id,error:o}]}})})()}))];case 4:if(u=(s=d.sent()).filter(function(e){return!e.error}).map(function(e){return e.id}),l=s.filter(function(e){return e.error}).map(function(e){return e.id}),c=s.filter(function(e){return e.error}).map(function(e){return{handlerId:e.id,message:e.error}}),f={syncedOn:new Date,syncedBy:i,succeededHandlers:u,erroredHandlers:l,errors:c},!o.id)return[3,6];return[4,n.dynamicOfflineData.update(o.id,{syncState:f}).catch(rW.errnames.DatabaseClosed)];case 5:d.sent(),d.label=6;case 6:return[2]}})})()}function nU(){return n_(function(){var e;return nx(this,function(t){switch(t.label){case 0:return[4,(0,rQ.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}})})()}function nB(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,i)}var nM=(0,rJ.createGlobalStore)("offline-entities",{offlineEntityDataSyncState:{},handlers:{}});function nK(){return nV(),nM}function nL(e,t){nV(),nP({type:"entity",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,r){return t.onOfflineEntityAdded({entityUuid:e,signal:null!=r?r:new AbortController().signal})}})}function nF(e){var t;return(t=function(){return function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){var l=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return nV(),[4,nN("entity",e)];case 1:return t.sent(),[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(e){nB(o,n,i,a,s,"next",e)}function s(e){nB(o,n,i,a,s,"throw",e)}a(void 0)})})()}function nV(){console.warn("The offline entity API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}},5565(e,t,r){"use strict";r.d(t,{V:()=>c,t:()=>l});var n,i,o=(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},{address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State"},{closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header"},{closeWorkspaces2PromptTitle:"Close workspace(s)",closeWorkspaces2PromptBody:"You are about to close the following workspace(s), which might have unsaved changes:"}),i=i={abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact Details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",entityAvatarAlt:"Avatar for {{entityName}}",entityGroups:"Entity Groups",entityIdentifierSticker:"Entity identifier sticker",entityPhotoAlt:"Profile photo of {{entityName}}",entityPhotoPlaceholder:"Photo placeholder for {{entityName}}",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",Framework:"Framework",groups:"Groups",leftNavigation:"Left navigation",loading:"Loading",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreGroups:"See {{count}} more groups",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n),a=r(4519),s=r.n(a),u=s().default||s();function l(e,t,r,n){return u.t(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ns:e,defaultValue:r},n))}function c(e,t,r){return o[e]?l("core",e,null!=t?t:o[e],r):(console.error("O3 Core Translations does not provide key '".concat(e,"'. The key itself is being rendered as text.")),e)}u.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},2316(e,t,r){"use strict";function n(e){return!window.offlineEnabled||(null!=e?e:navigator.onLine)}r.d(t,{s:()=>n})}}]);
|