@cc-openmrs/cc-esm-active-prescriptions 1.0.63 → 1.0.64
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/cc-openmrs-cc-esm-active-prescriptions-1.0.63.tgz +0 -0
- package/dist/282.js +2 -0
- package/dist/282.js.LICENSE.txt +32 -0
- package/dist/319.js +1 -1
- package/dist/335.js +1 -1
- package/dist/353.js +1 -1
- package/dist/382.js +1 -0
- package/dist/437.js +1 -0
- package/dist/478.js +2 -0
- package/dist/499.js +1 -1
- package/dist/537.js +1 -1
- package/dist/774.js +2 -0
- package/dist/966.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +51 -0
- package/dist/openmrs-esm-template-app.js +1 -1
- package/dist/openmrs-esm-template-app.js.buildmanifest.json +86 -292
- package/dist/routes.json +1 -1
- package/package.json +26 -35
- package/src/index.ts +6 -30
- package/src/prescriptions-actions/prescriptions-action-button.component.tsx +6 -6
- package/dist/225.js +0 -1
- package/dist/279.js +0 -2
- package/dist/279.js.LICENSE.txt +0 -14
- package/dist/41.js +0 -1
- package/dist/422.js +0 -2
- package/dist/606.js +0 -2
- package/dist/606.js.LICENSE.txt +0 -9
- package/dist/635.js +0 -1
- package/dist/68.js +0 -2
- package/dist/68.js.LICENSE.txt +0 -9
- package/dist/692.js +0 -2
- package/dist/692.js.LICENSE.txt +0 -9
- package/dist/845.js +0 -1
- package/dist/866.js +0 -2
- package/dist/993.js +0 -1
- /package/dist/{422.js.LICENSE.txt → 478.js.LICENSE.txt} +0 -0
- /package/dist/{866.js.LICENSE.txt → 774.js.LICENSE.txt} +0 -0
package/dist/279.js.LICENSE.txt
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* decimal.js v10.6.0
|
|
3
|
-
* An arbitrary-precision Decimal type for JavaScript.
|
|
4
|
-
* https://github.com/MikeMcl/decimal.js
|
|
5
|
-
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
6
|
-
* MIT Licence
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*!
|
|
10
|
-
* Determine if an object is a Buffer
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/
|
package/dist/41.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[41],{3041(e,t,n){n.r(t),n.d(t,{default:()=>E,infinite:()=>f,unstable_serialize:()=>c});var r=n(6072),i=n(9888),a=n(8465);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(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});const l=(0,a.withArgs)((e,t,n)=>{const{cache:l,compare:d,suspense:c,fallbackData:o,revalidateOnMount:f,revalidateIfStale:E,refreshInterval:g,refreshWhenHidden:_,refreshWhenOffline:p,keepPreviousData:h}=n,[v,U,R,b]=a.SWRGlobalState.get(l),[C,m]=(0,a.serialize)(e),I=(0,r.useRef)(!1),T=(0,r.useRef)(!1),S=(0,r.useRef)(C),V=(0,r.useRef)(t),k=(0,r.useRef)(n),N=()=>k.current,y=()=>N().isVisible()&&N().isOnline(),[L,w,D,F]=(0,a.createCacheHelper)(l,C),O=(0,r.useRef)({}).current,A=(0,a.isUndefined)(o)?n.fallback[C]:o,P=(e,t)=>{for(const n in O){const r=n;if("data"===r){if(!d(e[r],t[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!d(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},z=(0,r.useMemo)(()=>{const e=!!C&&!!t&&((0,a.isUndefined)(f)?!N().isPaused()&&!c&&(!!(0,a.isUndefined)(E)||E):f),n=t=>{const n=(0,a.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=L(),i=F(),s=n(r),u=r===i?s:n(i);let l=s;return[()=>{const e=n(L());return P(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>u]},[l,C]),H=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(C,(t,n)=>{P(n,t)||e()}),[l,C]),z[0],z[1]),M=!I.current,W=v[C]&&v[C].length>0,G=H.data,j=(0,a.isUndefined)(G)?A:G,x=H.error,X=(0,r.useRef)(j),Y=h?(0,a.isUndefined)(G)?X.current:G:j,q=!(W&&!(0,a.isUndefined)(x))&&(M&&!(0,a.isUndefined)(f)?f:!N().isPaused()&&(c?!(0,a.isUndefined)(j)&&E:(0,a.isUndefined)(j)||E)),B=!!(C&&t&&M&&q),J=(0,a.isUndefined)(H.isValidating)?B:H.isValidating,K=(0,a.isUndefined)(H.isLoading)?B:H.isLoading,Q=(0,r.useCallback)(async e=>{const t=V.current;if(!C||!t||T.current||N().isPaused())return!1;let r,i,s=!0;const u=e||{},l=!R[C]||!u.dedupe,c=()=>a.IS_REACT_LEGACY?!T.current&&C===S.current&&I.current:C===S.current,o={isValidating:!1,isLoading:!1},f=()=>{w(o)},E=()=>{const e=R[C];e&&e[1]===i&&delete R[C]},g={isValidating:!0};(0,a.isUndefined)(L().data)&&(g.isLoading=!0);try{if(l&&(w(g),n.loadingTimeout&&(0,a.isUndefined)(L().data)&&setTimeout(()=>{s&&c()&&N().onLoadingSlow(C,n)},n.loadingTimeout),R[C]=[t(m),(0,a.getTimestamp)()]),[r,i]=R[C],r=await r,l&&setTimeout(E,n.dedupingInterval),!R[C]||R[C][1]!==i)return l&&c()&&N().onDiscarded(C),!1;o.error=a.UNDEFINED;const e=U[C];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),l&&c()&&N().onDiscarded(C),!1;const u=L().data;o.data=d(u,r)?u:r,l&&c()&&N().onSuccess(r,C,n)}catch(e){E();const t=N(),{shouldRetryOnError:n}=t;t.isPaused()||(o.error=e,l&&c()&&(t.onError(e,C,t),(!0===n||(0,a.isFunction)(n)&&n(e))&&(N().revalidateOnFocus&&N().revalidateOnReconnect&&!y()||t.onErrorRetry(e,C,t,e=>{const t=v[C];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return s=!1,f(),!0},[C,l]),Z=(0,r.useCallback)((...e)=>(0,a.internalMutate)(l,S.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{V.current=t,k.current=n,(0,a.isUndefined)(G)||(X.current=G)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!C)return;const e=Q.bind(a.UNDEFINED,u);let t=0;const n=(0,a.subscribeCallback)(C,v,(n,r={})=>{if(n==a.revalidateEvents.FOCUS_EVENT){const n=Date.now();N().revalidateOnFocus&&n>t&&y()&&(t=n+N().focusThrottleInterval,e())}else if(n==a.revalidateEvents.RECONNECT_EVENT)N().revalidateOnReconnect&&y()&&e();else{if(n==a.revalidateEvents.MUTATE_EVENT)return Q();if(n==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return T.current=!1,S.current=C,I.current=!0,w({_k:m}),q&&((0,a.isUndefined)(j)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{T.current=!0,n()}},[C]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,a.isFunction)(g)?g(L().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){L().error||!_&&!N().isVisible()||!p&&!N().isOnline()?t():Q(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,_,p,C]),(0,r.useDebugValue)(Y),c&&(0,a.isUndefined)(j)&&C){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");V.current=t,k.current=n,T.current=!1;const e=b[C];if(!(0,a.isUndefined)(e)){const t=Z(e);s(t)}if(!(0,a.isUndefined)(x))throw x;{const e=Q(u);(0,a.isUndefined)(Y)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:Z,get data(){return O.data=!0,Y},get error(){return O.error=!0,x},get isValidating(){return O.isValidating=!0,J},get isLoading(){return O.isLoading=!0,K}}}),d=e=>(0,a.serialize)(e?e(0,null):null)[0],c=e=>a.INFINITE_PREFIX+d(e),o=Promise.resolve(),f=e=>(t,n,s)=>{const u=(0,r.useRef)(!1),{cache:l,initialSize:c=1,revalidateAll:f=!1,persistSize:E=!1,revalidateFirstPage:g=!0,revalidateOnMount:_=!1,parallel:p=!1}=s,[,,,h]=a.SWRGlobalState.get(a.cache);let v;try{v=d(t),v&&(v=a.INFINITE_PREFIX+v)}catch(e){}const[U,R,b]=(0,a.createCacheHelper)(l,v),C=(0,r.useCallback)(()=>(0,a.isUndefined)(U()._l)?c:U()._l,[l,v,c]);(0,i.useSyncExternalStore)((0,r.useCallback)(e=>v?b(v,()=>{e()}):()=>{},[l,v]),C,C);const m=(0,r.useCallback)(()=>{const e=U()._l;return(0,a.isUndefined)(e)?c:e},[v,c]),I=(0,r.useRef)(m());(0,a.useIsomorphicLayoutEffect)(()=>{u.current?v&&R({_l:E?I.current:m()}):u.current=!0},[v,l]);const T=_&&!u.current,S=e(v,async e=>{const r=U()._i,i=U()._r;R({_r:a.UNDEFINED});const u=[],d=m(),[c]=(0,a.createCacheHelper)(l,e),o=c().data,E=[];let _=null;for(let e=0;e<d;++e){const[d,c]=(0,a.serialize)(t(e,p?null:_));if(!d)break;const[v,U]=(0,a.createCacheHelper)(l,d);let R=v().data;const b=f||r||(0,a.isUndefined)(R)||g&&!e&&!(0,a.isUndefined)(o)||T||o&&!(0,a.isUndefined)(o[e])&&!s.compare(o[e],R);if(n&&("function"==typeof i?i(R,c):b)){const t=async()=>{if(d in h){const e=h[d];delete h[d],R=await e}else R=await n(c);U({data:R,_k:c}),u[e]=R};p?E.push(t):await t()}else u[e]=R;p||(_=R)}return p&&await Promise.all(E.map(e=>e())),R({_i:a.UNDEFINED}),u},s),V=(0,r.useCallback)(function(e,t){const n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return v?(r&&((0,a.isUndefined)(e)?R({_i:!0,_r:n.revalidate}):R({_i:!1,_r:n.revalidate})),arguments.length?S.mutate(e,{...n,revalidate:r}):S.mutate()):o},[v,l]),k=(0,r.useCallback)(e=>{if(!v)return o;const[,n]=(0,a.createCacheHelper)(l,v);let r;if((0,a.isFunction)(e)?r=e(m()):"number"==typeof e&&(r=e),"number"!=typeof r)return o;n({_l:r}),I.current=r;const i=[],[s]=(0,a.createCacheHelper)(l,v);let u=null;for(let e=0;e<r;++e){const[n]=(0,a.serialize)(t(e,u)),[r]=(0,a.createCacheHelper)(l,n),d=n?r().data:a.UNDEFINED;if((0,a.isUndefined)(d))return V(s().data);i.push(d),u=d}return V(i)},[v,l,V,m]);return{size:m(),setSize:k,mutate:V,get data(){return S.data},get error(){return S.error},get isValidating(){return S.isValidating},get isLoading(){return S.isLoading}}},E=(0,a.withMiddleware)(l,f)}}]);
|
package/dist/422.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 422.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[41,422],{8493(e,t,n){var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,u=r.useLayoutEffect,c=r.useDebugValue;function o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,d=r[1];return u(function(){i.value=n,i.getSnapshot=t,o(i)&&d({inst:i})},[e,n,t]),s(function(){return o(i)&&d({inst:i}),e(function(){o(i)&&d({inst:i})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},9888(e,t,n){e.exports=n(8493)},3041(e,t,n){n.r(t),n.d(t,{default:()=>E,infinite:()=>f,unstable_serialize:()=>d});var r=n(6072),i=n(9888),a=n(8465);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(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});const c=(0,a.withArgs)((e,t,n)=>{const{cache:c,compare:o,suspense:d,fallbackData:l,revalidateOnMount:f,revalidateIfStale:E,refreshInterval:g,refreshWhenHidden:p,refreshWhenOffline:v,keepPreviousData:h}=n,[_,U,R,S]=a.SWRGlobalState.get(c),[b,m]=(0,a.serialize)(e),C=(0,r.useRef)(!1),y=(0,r.useRef)(!1),I=(0,r.useRef)(b),T=(0,r.useRef)(t),V=(0,r.useRef)(n),w=()=>V.current,k=()=>w().isVisible()&&w().isOnline(),[L,N,D,F]=(0,a.createCacheHelper)(c,b),O=(0,r.useRef)({}).current,A=(0,a.isUndefined)(l)?n.fallback[b]:l,P=(e,t)=>{for(const n in O){const r=n;if("data"===r){if(!o(e[r],t[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},z=(0,r.useMemo)(()=>{const e=!!b&&!!t&&((0,a.isUndefined)(f)?!w().isPaused()&&!d&&(!!(0,a.isUndefined)(E)||E):f),n=t=>{const n=(0,a.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=L(),i=F(),s=n(r),u=r===i?s:n(i);let c=s;return[()=>{const e=n(L());return P(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>u]},[c,b]),H=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(b,(t,n)=>{P(n,t)||e()}),[c,b]),z[0],z[1]),x=!C.current,M=_[b]&&_[b].length>0,j=H.data,W=(0,a.isUndefined)(j)?A:j,G=H.error,X=(0,r.useRef)(W),Y=h?(0,a.isUndefined)(j)?X.current:j:W,q=!(M&&!(0,a.isUndefined)(G))&&(x&&!(0,a.isUndefined)(f)?f:!w().isPaused()&&(d?!(0,a.isUndefined)(W)&&E:(0,a.isUndefined)(W)||E)),B=!!(b&&t&&x&&q),J=(0,a.isUndefined)(H.isValidating)?B:H.isValidating,K=(0,a.isUndefined)(H.isLoading)?B:H.isLoading,Q=(0,r.useCallback)(async e=>{const t=T.current;if(!b||!t||y.current||w().isPaused())return!1;let r,i,s=!0;const u=e||{},c=!R[b]||!u.dedupe,d=()=>a.IS_REACT_LEGACY?!y.current&&b===I.current&&C.current:b===I.current,l={isValidating:!1,isLoading:!1},f=()=>{N(l)},E=()=>{const e=R[b];e&&e[1]===i&&delete R[b]},g={isValidating:!0};(0,a.isUndefined)(L().data)&&(g.isLoading=!0);try{if(c&&(N(g),n.loadingTimeout&&(0,a.isUndefined)(L().data)&&setTimeout(()=>{s&&d()&&w().onLoadingSlow(b,n)},n.loadingTimeout),R[b]=[t(m),(0,a.getTimestamp)()]),[r,i]=R[b],r=await r,c&&setTimeout(E,n.dedupingInterval),!R[b]||R[b][1]!==i)return c&&d()&&w().onDiscarded(b),!1;l.error=a.UNDEFINED;const e=U[b];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),c&&d()&&w().onDiscarded(b),!1;const u=L().data;l.data=o(u,r)?u:r,c&&d()&&w().onSuccess(r,b,n)}catch(e){E();const t=w(),{shouldRetryOnError:n}=t;t.isPaused()||(l.error=e,c&&d()&&(t.onError(e,b,t),(!0===n||(0,a.isFunction)(n)&&n(e))&&(w().revalidateOnFocus&&w().revalidateOnReconnect&&!k()||t.onErrorRetry(e,b,t,e=>{const t=_[b];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return s=!1,f(),!0},[b,c]),Z=(0,r.useCallback)((...e)=>(0,a.internalMutate)(c,I.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{T.current=t,V.current=n,(0,a.isUndefined)(j)||(X.current=j)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!b)return;const e=Q.bind(a.UNDEFINED,u);let t=0;const n=(0,a.subscribeCallback)(b,_,(n,r={})=>{if(n==a.revalidateEvents.FOCUS_EVENT){const n=Date.now();w().revalidateOnFocus&&n>t&&k()&&(t=n+w().focusThrottleInterval,e())}else if(n==a.revalidateEvents.RECONNECT_EVENT)w().revalidateOnReconnect&&k()&&e();else{if(n==a.revalidateEvents.MUTATE_EVENT)return Q();if(n==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return y.current=!1,I.current=b,C.current=!0,N({_k:m}),q&&((0,a.isUndefined)(W)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{y.current=!0,n()}},[b]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,a.isFunction)(g)?g(L().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){L().error||!p&&!w().isVisible()||!v&&!w().isOnline()?t():Q(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,p,v,b]),(0,r.useDebugValue)(Y),d&&(0,a.isUndefined)(W)&&b){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");T.current=t,V.current=n,y.current=!1;const e=S[b];if(!(0,a.isUndefined)(e)){const t=Z(e);s(t)}if(!(0,a.isUndefined)(G))throw G;{const e=Q(u);(0,a.isUndefined)(Y)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:Z,get data(){return O.data=!0,Y},get error(){return O.error=!0,G},get isValidating(){return O.isValidating=!0,J},get isLoading(){return O.isLoading=!0,K}}}),o=e=>(0,a.serialize)(e?e(0,null):null)[0],d=e=>a.INFINITE_PREFIX+o(e),l=Promise.resolve(),f=e=>(t,n,s)=>{const u=(0,r.useRef)(!1),{cache:c,initialSize:d=1,revalidateAll:f=!1,persistSize:E=!1,revalidateFirstPage:g=!0,revalidateOnMount:p=!1,parallel:v=!1}=s,[,,,h]=a.SWRGlobalState.get(a.cache);let _;try{_=o(t),_&&(_=a.INFINITE_PREFIX+_)}catch(e){}const[U,R,S]=(0,a.createCacheHelper)(c,_),b=(0,r.useCallback)(()=>(0,a.isUndefined)(U()._l)?d:U()._l,[c,_,d]);(0,i.useSyncExternalStore)((0,r.useCallback)(e=>_?S(_,()=>{e()}):()=>{},[c,_]),b,b);const m=(0,r.useCallback)(()=>{const e=U()._l;return(0,a.isUndefined)(e)?d:e},[_,d]),C=(0,r.useRef)(m());(0,a.useIsomorphicLayoutEffect)(()=>{u.current?_&&R({_l:E?C.current:m()}):u.current=!0},[_,c]);const y=p&&!u.current,I=e(_,async e=>{const r=U()._i,i=U()._r;R({_r:a.UNDEFINED});const u=[],o=m(),[d]=(0,a.createCacheHelper)(c,e),l=d().data,E=[];let p=null;for(let e=0;e<o;++e){const[o,d]=(0,a.serialize)(t(e,v?null:p));if(!o)break;const[_,U]=(0,a.createCacheHelper)(c,o);let R=_().data;const S=f||r||(0,a.isUndefined)(R)||g&&!e&&!(0,a.isUndefined)(l)||y||l&&!(0,a.isUndefined)(l[e])&&!s.compare(l[e],R);if(n&&("function"==typeof i?i(R,d):S)){const t=async()=>{if(o in h){const e=h[o];delete h[o],R=await e}else R=await n(d);U({data:R,_k:d}),u[e]=R};v?E.push(t):await t()}else u[e]=R;v||(p=R)}return v&&await Promise.all(E.map(e=>e())),R({_i:a.UNDEFINED}),u},s),T=(0,r.useCallback)(function(e,t){const n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return _?(r&&((0,a.isUndefined)(e)?R({_i:!0,_r:n.revalidate}):R({_i:!1,_r:n.revalidate})),arguments.length?I.mutate(e,{...n,revalidate:r}):I.mutate()):l},[_,c]),V=(0,r.useCallback)(e=>{if(!_)return l;const[,n]=(0,a.createCacheHelper)(c,_);let r;if((0,a.isFunction)(e)?r=e(m()):"number"==typeof e&&(r=e),"number"!=typeof r)return l;n({_l:r}),C.current=r;const i=[],[s]=(0,a.createCacheHelper)(c,_);let u=null;for(let e=0;e<r;++e){const[n]=(0,a.serialize)(t(e,u)),[r]=(0,a.createCacheHelper)(c,n),o=n?r().data:a.UNDEFINED;if((0,a.isUndefined)(o))return T(s().data);i.push(o),u=o}return T(i)},[_,c,T,m]);return{size:m(),setSize:V,mutate:T,get data(){return I.data},get error(){return I.error},get isValidating(){return I.isValidating},get isLoading(){return I.isLoading}}},E=(0,a.withMiddleware)(c,f)}}]);
|
package/dist/606.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 606.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[225,606],{8493(e,t,n){var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,a=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue;function o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return u(function(){i.value=n,i.getSnapshot=t,o(i)&&c({inst:i})},[e,n,t]),a(function(){return o(i)&&c({inst:i}),e(function(){o(i)&&c({inst:i})})},[e]),d(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},9888(e,t,n){e.exports=n(8493)},4225(e,t,n){n.r(t),n.d(t,{default:()=>c,immutable:()=>o});var r=n(6072),i=n(9888),s=n(8465);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),u={dedupe:!0};s.OBJECT.defineProperty(s.SWRConfig,"defaultValue",{value:s.defaultConfig});const d=(0,s.withArgs)((e,t,n)=>{const{cache:d,compare:o,suspense:c,fallbackData:l,revalidateOnMount:f,revalidateIfStale:E,refreshInterval:g,refreshWhenHidden:v,refreshWhenOffline:h,keepPreviousData:p}=n,[R,S,_,U]=s.SWRGlobalState.get(d),[m,b]=(0,s.serialize)(e),T=(0,r.useRef)(!1),V=(0,r.useRef)(!1),w=(0,r.useRef)(m),C=(0,r.useRef)(t),O=(0,r.useRef)(n),y=()=>O.current,L=()=>y().isVisible()&&y().isOnline(),[I,k,D,A]=(0,s.createCacheHelper)(d,m),N=(0,r.useRef)({}).current,F=(0,s.isUndefined)(l)?n.fallback[m]:l,P=(e,t)=>{for(const n in N){const r=n;if("data"===r){if(!o(e[r],t[r])){if(!(0,s.isUndefined)(e[r]))return!1;if(!o(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},j=(0,r.useMemo)(()=>{const e=!!m&&!!t&&((0,s.isUndefined)(f)?!y().isPaused()&&!c&&(!!(0,s.isUndefined)(E)||E):f),n=t=>{const n=(0,s.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=I(),i=A(),a=n(r),u=r===i?a:n(i);let d=a;return[()=>{const e=n(I());return P(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>u]},[d,m]),x=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(m,(t,n)=>{P(n,t)||e()}),[d,m]),j[0],j[1]),M=!T.current,W=R[m]&&R[m].length>0,G=x.data,H=(0,s.isUndefined)(G)?F:G,Y=x.error,q=(0,r.useRef)(H),z=p?(0,s.isUndefined)(G)?q.current:G:H,B=!(W&&!(0,s.isUndefined)(Y))&&(M&&!(0,s.isUndefined)(f)?f:!y().isPaused()&&(c?!(0,s.isUndefined)(H)&&E:(0,s.isUndefined)(H)||E)),J=!!(m&&t&&M&&B),K=(0,s.isUndefined)(x.isValidating)?J:x.isValidating,Q=(0,s.isUndefined)(x.isLoading)?J:x.isLoading,X=(0,r.useCallback)(async e=>{const t=C.current;if(!m||!t||V.current||y().isPaused())return!1;let r,i,a=!0;const u=e||{},d=!_[m]||!u.dedupe,c=()=>s.IS_REACT_LEGACY?!V.current&&m===w.current&&T.current:m===w.current,l={isValidating:!1,isLoading:!1},f=()=>{k(l)},E=()=>{const e=_[m];e&&e[1]===i&&delete _[m]},g={isValidating:!0};(0,s.isUndefined)(I().data)&&(g.isLoading=!0);try{if(d&&(k(g),n.loadingTimeout&&(0,s.isUndefined)(I().data)&&setTimeout(()=>{a&&c()&&y().onLoadingSlow(m,n)},n.loadingTimeout),_[m]=[t(b),(0,s.getTimestamp)()]),[r,i]=_[m],r=await r,d&&setTimeout(E,n.dedupingInterval),!_[m]||_[m][1]!==i)return d&&c()&&y().onDiscarded(m),!1;l.error=s.UNDEFINED;const e=S[m];if(!(0,s.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),d&&c()&&y().onDiscarded(m),!1;const u=I().data;l.data=o(u,r)?u:r,d&&c()&&y().onSuccess(r,m,n)}catch(e){E();const t=y(),{shouldRetryOnError:n}=t;t.isPaused()||(l.error=e,d&&c()&&(t.onError(e,m,t),(!0===n||(0,s.isFunction)(n)&&n(e))&&(y().revalidateOnFocus&&y().revalidateOnReconnect&&!L()||t.onErrorRetry(e,m,t,e=>{const t=R[m];t&&t[0]&&t[0](s.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return a=!1,f(),!0},[m,d]),Z=(0,r.useCallback)((...e)=>(0,s.internalMutate)(d,w.current,...e),[]);if((0,s.useIsomorphicLayoutEffect)(()=>{C.current=t,O.current=n,(0,s.isUndefined)(G)||(q.current=G)}),(0,s.useIsomorphicLayoutEffect)(()=>{if(!m)return;const e=X.bind(s.UNDEFINED,u);let t=0;const n=(0,s.subscribeCallback)(m,R,(n,r={})=>{if(n==s.revalidateEvents.FOCUS_EVENT){const n=Date.now();y().revalidateOnFocus&&n>t&&L()&&(t=n+y().focusThrottleInterval,e())}else if(n==s.revalidateEvents.RECONNECT_EVENT)y().revalidateOnReconnect&&L()&&e();else{if(n==s.revalidateEvents.MUTATE_EVENT)return X();if(n==s.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}});return V.current=!1,w.current=m,T.current=!0,k({_k:b}),B&&((0,s.isUndefined)(H)||s.IS_SERVER?e():(0,s.rAF)(e)),()=>{V.current=!0,n()}},[m]),(0,s.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,s.isFunction)(g)?g(I().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){I().error||!v&&!y().isVisible()||!h&&!y().isOnline()?t():X(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,v,h,m]),(0,r.useDebugValue)(z),c&&(0,s.isUndefined)(H)&&m){if(!s.IS_REACT_LEGACY&&s.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,O.current=n,V.current=!1;const e=U[m];if(!(0,s.isUndefined)(e)){const t=Z(e);a(t)}if(!(0,s.isUndefined)(Y))throw Y;{const e=X(u);(0,s.isUndefined)(z)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:Z,get data(){return N.data=!0,z},get error(){return N.error=!0,Y},get isValidating(){return N.isValidating=!0,K},get isLoading(){return N.isLoading=!0,Q}}}),o=e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)),c=(0,s.withMiddleware)(d,o)}}]);
|
package/dist/606.js.LICENSE.txt
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
package/dist/635.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[635],{2635(e,t,s){s.d(t,{Ay:()=>q,Rm:()=>R});const i=e=>"string"==typeof e,o=()=>{let e,t;const s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},n=e=>null==e?"":""+e,a=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,l=e=>!e||i(e),c=(e,t,s)=>{const o=i(t)?t.split("."):t;let n=0;for(;n<o.length-1;){if(l(e))return{};const t=r(o[n]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++n}return l(e)?{}:{obj:e,k:r(o[n])}},h=(e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);if(void 0!==i||1===t.length)return void(i[o]=s);let n=t[t.length-1],a=t.slice(0,t.length-1),r=c(e,a,Object);for(;void 0===r.obj&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),r=c(e,a,Object),r?.obj&&void 0!==r.obj[`${r.k}.${n}`]&&(r.obj=void 0);r.obj[`${r.k}.${n}`]=s},p=(e,t)=>{const{obj:s,k:i}=c(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},u=(e,t,s)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?i(e[o])||e[o]instanceof String||i(t[o])||t[o]instanceof String?s&&(e[o]=t[o]):u(e[o],t[o],s):e[o]=t[o]);return e},g=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const f=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e,m=[" ",",","?","!",";"],y=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),x=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let o=e;for(let e=0;e<i.length;){if(!o||"object"!=typeof o)return;let t,n="";for(let a=e;a<i.length;++a)if(a!==e&&(n+=s),n+=i[a],t=o[n],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<i.length-1)continue;e+=a-e+1;break}o=t}return o},b=e=>e?.replace(/_/g,"-"),v={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class k{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,o){return o&&!this.debug?null:(i(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new k(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new k(this.logger,e)}}var S=new k;class O{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...t])})}}class L extends O{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,o={}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],s&&(Array.isArray(s)?r.push(...s):i(s)&&n?r.push(...s.split(n)):r.push(s)));const l=p(this.data,r);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=r[0],t=r[1],s=r.slice(2).join(".")),!l&&a&&i(s)?x(this.data?.[e]?.[t],s,n):l}addResource(e,t,s,i,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),h(this.data,a,i),o.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,o={silent:!1}){for(const o in s)(i(s[o])||Array.isArray(s[o]))&&this.addResource(e,t,o,s[o],{silent:!0});o.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,o,n={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=s,s=t,t=a[1]),this.addNamespaces(t);let r=p(this.data,a)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?u(r,s,o):r={...r,...s},h(this.data,a,r),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var w={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,o)??t}),t}};const $=Symbol("i18next/PATH_KEY");function R(e,t){const{[$]:s}=e(function(){const e=[],t=Object.create(null);let s;return t.get=(i,o)=>(s?.revoke?.(),o===$?e:(e.push(o),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),i=t?.keySeparator??".",o=t?.nsSeparator??":";if(s.length>1&&o){const e=t?.ns;if((e?Array.isArray(e)?e:[e]:[]).includes(s[0]))return`${s[0]}${o}${s.slice(1).join(i)}`}return s.join(i)}const C={},P=e=>!i(e)&&"boolean"!=typeof e&&"number"!=typeof e;class j extends O{constructor(e,t={}){var s,i;super(),s=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{s[e]&&(i[e]=s[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(null==e)return!1;const i=this.resolve(e,s);if(void 0===i?.res)return!1;const o=P(i.res);return!1!==s.returnObjects||!o}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=m.filter(e=>t.indexOf(e)<0&&s.indexOf(e)<0);if(0===i.length)return!0;const o=y.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let n=!o.test(e);if(!n){const t=e.indexOf(s);t>0&&!o.test(e.substring(0,t))&&(n=!0)}return n})(e,s,o));if(a&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(n)?[n]:n};const a=e.split(s);(s!==o||s===o&&this.options.ns.indexOf(a[0])>-1)&&(n=a.shift()),e=a.join(o)}return{key:e,namespaces:i(n)?[n]:n}}translate(e,t,s){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=R(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?R(e,{...this.options,...o}):String(e));const n=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,a=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:r,namespaces:l}=this.extractFromKey(e[e.length-1],o),c=l[l.length-1];let h=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===h&&(h=":");const p=o.lng||this.language,u=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return u?n?{res:`${c}${h}${r}`,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${h}${r}`:n?{res:r,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:r;const g=this.resolve(e,o);let d=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==o.count&&!i(o.count),v=j.hasDefaultValue(o),k=b?this.pluralResolver.getSuffix(p,o.count,o):"",S=o.ordinal&&b?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",O=b&&!o.ordinal&&0===o.count,L=O&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${S}`]||o.defaultValue;let w=d;x&&!d&&v&&(w=L);const $=P(w),C=Object.prototype.toString.apply(w);if(!(x&&w&&$&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||i(y)&&Array.isArray(w))if(x&&i(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,o,s));else{let t=!1,i=!1;!this.isValidLookup(d)&&v&&(t=!0,d=L),this.isValidLookup(d)||(i=!0,d=r);const n=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,l=v&&L!==d&&this.options.updateMissing;if(i||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,c,r,l?L:d),a){const e=this.resolve(r,{...o,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(o.lng||this.language):e.push(o.lng||this.language);const s=(e,t,s)=>{const i=v&&s!==d?s:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,i,l,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,i,l,o),this.emit("missingKey",e,c,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,o);O&&o[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],r+t,o[`defaultValue${t}`]||L)})}):s(e,r,L))}d=this.extendTranslation(d,e,o,g,s),i&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${c}${h}${r}`),(i||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${h}${r}`:r,t?d:void 0,o))}else{if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,w,{...o,ns:l}):`key '${r} (${this.language})' returned an object instead of string.`;return n?(g.res=e,g.usedParams=this.getUsedParamsDetails(o),g):e}if(a){const e=Array.isArray(w),t=e?[]:{},s=e?m:f;for(const e in w)if(Object.prototype.hasOwnProperty.call(w,e)){const i=`${s}${a}${e}`;t[e]=v&&!d?this.translate(i,{...o,defaultValue:P(L)?L[e]:void 0,joinArrays:!1,ns:l}):this.translate(i,{...o,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=w[e])}d=t}}return n?(g.res=d,g.usedParams=this.getUsedParamsDetails(o),g):d}extendTranslation(e,t,s,o,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const a=i(e)&&(void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(a){const t=e.match(this.interpolator.nestingRegexp);r=t&&t.length}let l=s.replace&&!i(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language||o.usedLng,s),a){const t=e.match(this.interpolator.nestingRegexp);r<(t&&t.length)&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>n?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,r=i(a)?[a]:a;return null!=e&&r?.length&&!1!==s.applyPostProcessor&&(e=w.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,o,n,a,r;return i(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?R(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(e,t),c=l.key;o=c;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=void 0!==t.count&&!i(t.count),u=p&&!t.ordinal&&0===t.count,g=void 0!==t.context&&(i(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(e=>{this.isValidLookup(s)||(r=e,C[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(C[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${o}" for languages "${d.join(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(i=>{if(this.isValidLookup(s))return;a=i;const o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,i,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(i,t.count,t));const s=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(n)&&o.push(c+e.replace(n,this.options.pluralSeparator)),o.push(c+e),u&&o.push(c+s)),g){const i=`${c}${this.options.contextSeparator||"_"}${t.context}`;o.push(i),p&&(t.ordinal&&0===e.indexOf(n)&&o.push(i+e.replace(n,this.options.pluralSeparator)),o.push(i+e),u&&o.push(i+s))}}let r;for(;r=o.pop();)this.isValidLookup(s)||(n=r,s=this.getResource(i,e,r,t))}))})}),{res:s,usedKey:o,exactUsedKey:n,usedLng:a,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!i(e.replace);let o=s?e.replace:e;if(s&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const e of t)delete o[e]}return o}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class N{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),i(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),o=[],n=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return i(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):i(e)&&n(this.formatLanguageCode(e)),s.forEach(e=>{o.indexOf(e)<0&&n(this.formatLanguageCode(e))}),o}}const E={zero:0,one:1,two:2,few:3,many:4,other:5},F={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class T{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=b("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),F;if(!e.match(/-|_/))return F;const i=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(i,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((e,t)=>E[e]-E[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const I=(e,t,s,o=".",n=!0)=>{let a=((e,t,s)=>{const i=p(e,s);return void 0!==i?i:p(t,s)})(e,t,s);return!a&&n&&i(s)&&(a=x(e,s,o),void 0===a&&(a=x(t,s,o))),a},V=e=>e.replace(/\$/g,"$$$$");class D{constructor(e={}){this.logger=S.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:o,prefixEscaped:n,suffix:a,suffixEscaped:r,formatSeparator:l,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:u,nestingSuffix:d,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=o?g(o):n||"{{",this.suffix=a?g(a):r||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?g(p):u||g("$t("),this.nestingSuffix=d?g(d):m||g(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,o){let a,r,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=e=>{if(e.indexOf(this.formatSeparator)<0){const i=I(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,s,{...o,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),n=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(I(t,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),a,s,{...o,...t,interpolationkey:n})};this.resetRegExp();const p=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==o?.interpolation?.skipOnVariables?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>V(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?V(this.escape(e)):V(e)}].forEach(t=>{for(l=0;a=t.regex.exec(e);){const s=a[1].trim();if(r=h(s),void 0===r)if("function"==typeof p){const t=p(e,a,o);r=i(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,s))r="";else{if(u){r=a[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),r=""}else i(r)||this.useRawValueToEscape||(r=n(r));const c=t.safeValue(r);if(e=e.replace(a[0],c),u?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let o,a,r;const l=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${g(s)}[ ]*{`));let o=`{${i[1]}`;e=i[0],o=this.interpolate(o,r);const n=o.match(/'/g),a=o.match(/"/g);((n?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;o=this.nestingRegexp.exec(e);){let c=[];r={...s},r=r.replace&&!i(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const h=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(-1!==h&&(c=o[1].slice(h).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),o[1]=o[1].slice(0,h)),a=t(l.call(this,o[1].trim(),r),r),a&&o[0]===e&&!i(a))return a;i(a)||(a=n(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),c.length&&(a=c.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const A=e=>{const t={};return(s,i,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const a=i+JSON.stringify(n);let r=t[a];return r||(r=e(b(i),o),t[a]=r),r(s)}},K=e=>(t,s,i)=>e(b(s),i)(t);class U{constructor(e={}){this.logger=S.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?A:K;this.formats={number:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=A(t)}format(e,t,s,i={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{const{formatName:o,formatOptions:n}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);"currency"===t&&o.indexOf(":")<0?s.currency||(s.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?s.range||(s.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),o=i.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=o),"false"===o&&(s[n]=!1),"true"===o&&(s[n]=!0),isNaN(o)||(s[n]=parseInt(o,10))}})}return{formatName:t,formatOptions:s}})(t);if(this.formats[o]){let t=e;try{const a=i?.formatParams?.[i.interpolationkey]||{},r=a.locale||a.lng||i.locale||i.lng||s;t=this.formats[o](e,r,{...n,...i,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class M extends O{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const o={},n={},a={},r={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const a=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===n[a]&&(n[a]=!0):(this.state[a]=1,i=!1,void 0===n[a]&&(n[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===r[t]&&(r[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(r)}}loaded(e,t,s){const i=e.split("|"),o=i[0],n=i[1];t&&this.emit("failedLoading",o,n,t),!t&&s&&this.store.addResourceBundle(o,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(s=>{((e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);i[o]=i[o]||[],i[o].push(s)})(s.loaded,[o],n),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{a[e]||(a[e]={});const t=s.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,o=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:o,callback:n});this.readingCalls++;const a=(a,r)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&r&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*o,n)},o):n(a,r)},r=this.backend[s].bind(this.backend);if(2!==r.length)return r(e,t,a);try{const s=r(e,t);s&&"function"==typeof s.then?s.then(e=>a(null,e)).catch(a):a(null,s)}catch(e){a(e)}}prepareLoading(e,t,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);const n=this.queueLoad(e,t,s,o);if(!n.toLoad.length)return n.pending.length||o(),null;n.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],o=s[1];this.read(i,o,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,o,n={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&&""!==s){if(this.backend?.create){const r={...n,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,s,i,r):l(e,t,s,i),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,s,i,a,r)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const z=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),i(e[1])&&(t.defaultValue=e[1]),i(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),_=()=>{},B="__i18next_supportNoticeShown";class J extends O{constructor(e={},t){var s;if(super(),this.options=H(e),this.services={},this.logger=S,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(e=>{"function"==typeof s[e]&&(s[e]=s[e].bind(s))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(i(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=z();var n;this.options={...s,...this.options,...H(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(n=this,n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(e=>e?.projectId))||"undefined"!=typeof globalThis&&globalThis[B]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[B]=!0));const a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?S.init(a(this.modules.logger),this.options):S.init(null,this.options),e=this.modules.formatter?this.modules.formatter:U;const t=new N(this.options);this.store=new L(this.options.resources,this.options);const i=this.services;i.logger=S,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new T(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(i.formatter=a(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new D(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new M(a(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=a(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=a(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new j(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=_),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const r=o(),l=()=>{const e=(e,s)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),r.resolve(s),t(e,s)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),r}loadResources(e,t=_){let s=t;const o=i(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===o?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};o?t(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){const i=o();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=_),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&w.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=o();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(i,o)=>{o?this.isLanguageChangingTo===e&&(n(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,s.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const s=i(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(i(t)?[t]:t);o&&(this.language||n(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,s){const o=(e,t,...i)=>{let n;n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs,n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||o.keyPrefix);const a=this.options.keySeparator||".";let r;return n.keyPrefix&&Array.isArray(e)?r=e.map(e=>("function"==typeof e&&(e=R(e,{...this.options,...t})),`${n.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=R(e,{...this.options,...t})),r=n.keyPrefix?`${n.keyPrefix}${a}${e}`:e),this.t(r,n)};return i(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=s,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const n=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,n);if(void 0!==e)return e}return!(!this.hasResourceBundle(s,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(s,e)||i&&!n(o,e)))}loadNamespaces(e,t){const s=o();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=o();i(e)&&(e=[e]);const n=this.options.preload||[],a=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new N(z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new J(e,t);return s.createInstance=J.createInstance,s}cloneInstance(e={},t=_){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new J(i);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},s){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{});o.store=new L(e,i),o.services.resourceStore=o.store}if(e.interpolation){const t={...z().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};o.services.interpolator=new D(s)}return o.translator=new j(o.services,i),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const q=J.createInstance();q.createInstance,q.dir,q.init,q.loadResources,q.reloadResources,q.use,q.changeLanguage,q.getFixedT,q.t,q.exists,q.setDefaultNamespace,q.hasLoadedNamespace,q.loadNamespaces,q.loadLanguages}}]);
|
package/dist/68.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 68.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[68],{428(e,t,n){"use strict";function r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>p});var a=["width","height","viewBox"],c=["tabindex"],u={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var l=n(5556),f=n.n(l),d=n(6072);const p=(0,d.forwardRef)(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...l},f){const{tabindex:p,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,o=void 0===r?"0 0 ".concat(t," ").concat(n):r,l=s(e,a),f=l.tabindex,d=s(l,c),p=i(i(i({},u),d),{},{width:t,height:n,viewBox:o});return p["aria-label"]||p["aria-labelledby"]?(p.role="img",null!=f&&(p.focusable="true",p.tabindex=f)):p["aria-hidden"]=!0,p}({...l,tabindex:n}),m=h;return e&&(m.className=e),null!=p&&(m.tabIndex="number"==typeof p?p:Number(n)),f&&(m.ref=f),r&&(m.xmlns=r),o&&(m.preserveAspectRatio=o),d.createElement("svg",m,t)});p.displayName="Icon",p.propTypes={"aria-hidden":f().oneOfType([f().bool,f().oneOf(["true","false"])]),"aria-label":f().string,"aria-labelledby":f().string,children:f().node,className:f().string,height:f().oneOfType([f().number,f().string]),preserveAspectRatio:f().string,tabIndex:f().oneOfType([f().number,f().string]),viewBox:f().string,width:f().oneOfType([f().number,f().string]),xmlns:f().string}},771(e,t,n){"use strict";n.d(t,{$D:()=>S,d3:()=>O,sV:()=>T,x:()=>A});var r,o,i,s,a,c,u,l,f,d,p,h,m,g,y,v,w,b=n(6072),E=n(428);const O=b.forwardRef(function({children:e,size:t=16,...n},i){return b.createElement(E.A,{width:t,height:t,ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},r||(r=b.createElement("path",{d:"M16 18 6 8 7.4 6.6 16 15.2 24.6 6.6 26 8z"})),o||(o=b.createElement("path",{d:"M4 22H28V24H4z"})),e)}),S=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=b.createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),e)}),A=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},s||(s=b.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),a||(a=b.createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},c||(c=b.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),u||(u=b.createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},l||(l=b.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),f||(f=b.createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),e):b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},d||(d=b.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),p||(p=b.createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),e)}),T=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},h||(h=b.createElement("path",{d:"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z"})),m||(m=b.createElement("path",{d:"M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z"})),g||(g=b.createElement("path",{d:"M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z"})),y||(y=b.createElement("path",{d:"M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z"})),v||(v=b.createElement("path",{d:"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z"})),w||(w=b.createElement("path",{d:"M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z"})),e)})},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8493(e,t,n){"use strict";var r=n(6072),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return a(function(){o.value=n,o.getSnapshot=t,u(o)&&l({inst:o})},[e,n,t]),s(function(){return u(o)&&l({inst:o}),e(function(){u(o)&&l({inst:o})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},9888(e,t,n){"use strict";e.exports=n(8493)},967(e,t,n){"use strict";n.d(t,{$f:()=>w,QE:()=>I,g$:()=>j,IU:()=>h,HW:()=>O,xC:()=>_,Kx:()=>x,EW:()=>S,L7:()=>$,Gm:()=>g,lo:()=>y,ut:()=>v,yH:()=>T,Jj:()=>p,Ct:()=>m,eA:()=>b,Gp:()=>R,E4:()=>A,Fi:()=>C,Y0:()=>U,st:()=>P});var r=n(44),o=n(5048);const i=function(e){return void 0===e};var s=n(3083),a=n(4963),c=n(6963),u=n(5874);const l="${openmrsSpaBase}/login",f={redirectAuthFailure:{enabled:{_type:c.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:c.ZU.String,_default:l,_validators:[c.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:c.ZU.Array,_default:[401],_elements:{_type:c.ZU.Number,_validators:[c.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:c.ZU.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:c.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p="/ws/rest/v1",h="/ws/fhir2/R4",m=`${p}/session`;function g(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function y(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=g(e);if(t.headers||(t.headers={}),(0,a.A)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(p)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(h)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then(async e=>{const t=e,{redirectAuthFailure:o,followRedirects:i}=await(0,c.zj)("@openmrs/esm-api");if(t.ok){if(204===t.status){if(i&&t.headers.has("location")){const e=t.headers.get("location");e&&(0,u.oo)({to:e})}return t.data=null,t}return t.clone().text().then(e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t})}if(n===g(m)&&403===t.status||o.enabled&&o.errors.includes(t.status)){(0,u.g4)();const e=o.url||t.headers.get("location")||l;return(0,u.oo)({to:e}),o.resolvePromise?Promise.resolve():new Promise(()=>{})}return t.clone().text().then(e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new w(n,t,o,r)},e=>{throw new w(n,t,null,r)})})}function v(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new s.Observable(r=>{let o=!1;return y(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class w extends Error{constructor(e,t,n,r){super(),d(this,"response",void 0),d(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const b=(0,o.Zd)("session",{loaded:!1,session:null});let E=0;function O(e={includeAuthStatus:!0}){return(E<Date.now()-6e4||!b.getState().loaded)&&T(),new s.Observable(t=>{const n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(b.getState()),b.subscribe(n)})}function S(){return(E<Date.now()-6e4||!b.getState().loaded)&&T(),b}function A(e){let t=e.user?.userProperties?.defaultLocale??e.locale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function T(e,t){E=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),N(y(m,{headers:n}))}function j(){b.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function P(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!i(t.privileges.find(t=>e===t.display)):Array.isArray(e)?e.every(e=>!i(t.privileges.find(t=>e===t.display))):(i(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!i(e.roles.find(e=>"System Developer"===e.display))}(t)}function _(){let e,t;return new Promise(n=>{const r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(b.getState()),e||(t=b.subscribe(r))})}function x(){return new Promise((e,t)=>{O().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function R(e,t){return N(y(m,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function C(e,t,n){return n||(n=new AbortController),await y(`${p}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),T()}function N(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},b.setState(r),t(r)):(r={loaded:!1,session:null},b.setState(r),n(r))}).catch(e=>{(0,r.N)(`Failed to fetch new session information: ${e}`);const t={loaded:!1,session:null};b.setState(t),n(t)})})}function $(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}b.subscribe(e=>{e.loaded&&e.session&&A(e.session)});const I={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function U(){(0,c.T0)("@openmrs/esm-api",f),T()}},6963(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function o(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}function i(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return r(n)?t:o(function(t){return e(n,t)});default:return r(n)&&r(i)?t:r(n)?o(function(t){return e(t,i)}):r(i)?o(function(t){return e(n,t)}):e(n,i)}}}function s(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function c(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,{ZU:()=>V,Nh:()=>He,hs:()=>te,Rt:()=>X,T0:()=>me,ks:()=>we,zj:()=>Ee,IS:()=>ne,UY:()=>ae,g$:()=>ue,P0:()=>ce,G9:()=>oe,vu:()=>ie,YP:()=>re,GI:()=>se,td:()=>Oe,tN:()=>le,r4:()=>Ze,gU:()=>Je,qG:()=>qe,yL:()=>Ye,mq:()=>Se,Gt:()=>be,kl:()=>ye,FL:()=>ge,GV:()=>ve,H:()=>ee,Nc:()=>H,y$:()=>Ke});const u="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var l=Object.prototype.toString,f=function(){return"[object Arguments]"===l.call(arguments)?function(e){return"[object Arguments]"===l.call(e)}:function(e){return c("callee",e)}}();const d=f;var p=!{toString:null}.propertyIsEnumerable("toString"),h=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=function(){return arguments.propertyIsEnumerable("length")}(),g=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const y="function"!=typeof Object.keys||m?o(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=m&&d(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(p)for(n=h.length-1;n>=0;)c(t=h[n],e)&&!g(r,t)&&(r[r.length]=t),n-=1;return r}):o(function(e){return Object(e)!==e?[]:Object.keys(e)}),v=o(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function w(e,t,n,r){var o=s(e);function i(e,t){return b(e,t,n.slice(),r.slice())}return!a(function(e,t){return!a(i,t,e)},s(t),o)}function b(e,t,n,r){if(u(e,t))return!0;var o,i,s=v(e);if(s!==v(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!u(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!u(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;a-=1}switch(s){case"Map":return e.size===t.size&&w(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&w(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=y(e);if(l.length!==y(t).length)return!1;var f=n.concat([e]),d=r.concat([t]);for(a=l.length-1;a>=0;){var p=l[a];if(!c(p,t)||!b(t[p],e[p],f,d))return!1;a-=1}return!0}const E=i(function(e,t){return b(e,t,[],[])});function O(e){return function t(n,s,a){switch(arguments.length){case 0:return t;case 1:return r(n)?t:i(function(t,r){return e(n,t,r)});case 2:return r(n)&&r(s)?t:r(n)?i(function(t,n){return e(t,s,n)}):r(s)?i(function(t,r){return e(n,t,r)}):o(function(t){return e(n,s,t)});default:return r(n)&&r(s)&&r(a)?t:r(n)&&r(s)?i(function(t,n){return e(t,n,a)}):r(n)&&r(a)?i(function(t,n){return e(t,s,n)}):r(s)&&r(a)?i(function(t,r){return e(n,t,r)}):r(n)?o(function(t){return e(t,s,a)}):r(s)?o(function(t){return e(n,t,a)}):r(a)?o(function(t){return e(n,s,t)}):e(n,s,a)}}}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}const A=O(function(e,t,n){var r,o={};for(r in n=n||{},t=t||{})c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o}),T=O(function e(t,n,r){return A(function(n,r,o){return S(r)&&S(o)?e(t,r,o):t(n,r,o)},n,r)}),j=i(function(e,t){return T(function(e,t,n){return n},e,t)}),P=i(function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n});function _(e,t,n){if(n||(n=new x),o=typeof(r=e),null==r||"object"!=o&&"function"!=o)return e;var r,o,i,s=function(r){var o=n.get(e);if(o)return o;for(var i in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t?_(e[i],!0,n):e[i]);return r};switch(v(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var x=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180){for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1)if((i=n[r])[0]===e)return i[1]}else{var o=this.hash(e);if(n=this.map[o])for(r=0;r<n.length;r+=1){var i;if((i=n[r])[0]===e)return i[1]}}},e}();const R=o(function(e){return null!=e&&"function"==typeof e.clone?e.clone():_(e,!0)}),C=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},N=o(function(e){return!!C(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))});var $="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function I(e,t,n){return function(r,o,i){if(N(i))return e(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return t(r,o,i,"fantasy-land/reduce");if(null!=i[$])return n(r,o,i[$]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return t(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function U(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var D=i(function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,s){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,s,a){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,s,a,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,s,a,c,u){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,s,a,c,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,function(){return e.apply(t,arguments)})});const k=D;function L(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function M(e,t,n,r){return e["@@transducer/result"](n[r](k(e["@@transducer/step"],e),t))}const B=I(U,M,L);var W=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const F=O(function(e,t,n){return B("function"==typeof e?new W(e):e,t,n)});var V=function(e){return e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",e}({});function H(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}const G=H(e=>Array.isArray(e),"must be an array"),z=H(e=>"boolean"==typeof e,"must be a boolean"),Z=H(e=>"number"==typeof e,"must be a number"),q=H(e=>"string"==typeof e,"must be a string"),J=H(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),Y=H(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string");var K=n(5048),Q=n(8101);const X=(0,K.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),ee=(0,K.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});ee.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});const te=(0,K.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function ne(e){return(0,K.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function re(){return(0,K.jf)("config-extension-slots",{slots:{}})}function oe(e){return ie(re().getState(),e)}function ie(e,t){return e.slots[t]??{loaded:!1,config:{}}}function se(){return(0,K.jf)("config-extensions",{configs:{}})}function ae(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");const n=se(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},setState(r,o=!1){n.setState(n=>{n.configs[e]||(n.configs[e]={});const i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n})},subscribe:e=>n.subscribe((t,n)=>{const o=r(t),i=r(n);(0,Q.b)(o,i)||e(o,i)}),destroy(){}}}function ce(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}function ue(e,t,n){const r=e.configure?.[n];return r??null}const le=(0,K.Zd)("config-implementer-tools",{config:{}});function fe(e,t){for(let n of Object.keys(e.schemas)){const r=ne(n);if(e.moduleLoaded[n]){const o=Re(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!0,config:o})}else{const o=Ce(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!1,config:o})}}}function de(e,t){const n=function(e,t){const n=$e(_e(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});!function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Pe(r,t,e)}(r);return Object.keys(r).reduce((e,t)=>({...e,...r[t]}),{})}(e,t),r=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{loaded:!0,config:t}])),o=re(),i=o.getState(),s={slots:{...i.slots,...r}};E(i,s)||o.setState(s)}function pe(e,t){const n=function(e,t){let n=Te(R(e.schemas));const r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]];for(let[e,t]of r)n=$e([n,je(e,t)]);return n}(e,t);le.setState({config:n})}function he(e,t,n){const r={};for(let o of t.mountedExtensions){const t=Ae(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}se().setState({configs:r})}function me(e,t){xe(e,t);const n=j(t,ze);X.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ge(e){X.setState(t=>({...t,schemas:{...t.schemas,[e]:ze}}))}function ye(e){X.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ve(e){X.setState(t=>({...t,schemas:{...t.schemas,[e]:Ge}}))}function we(e,t){xe(e,t);const n=j(t,ze);X.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),X.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function be(e,t="provided"){X.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function Ee(e){return new Promise(t=>{const n=ne(e);function r(e){if(e.loaded&&e.config){const n=P(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function Oe(e,t,n){const r=[new Promise(t=>{const n=ne(e);function r(e){if(e.translationOverridesLoaded&&e.config){const n=e.config["Translation overrides"]??{};t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})];return t&&n&&r.push(new Promise(e=>{const r=ae(t,n);function o(t){if(t.loaded&&t.config){const n=t.config["Translation overrides"]??{};e(n),i&&i()}}o(r.getState());const i=r.subscribe(o)})),Promise.all(r)}function Se(e,t,n){Ie(e,t,n);const r=Me(e,t);return De(e,r,n),r}function Ae(e,t,n,r,o,i){const s=function(e){const[t]=e.split("#");return t}(r),a=o.schemas[s],c=a?s:t,u=_e(o,i),l=Ne(e,u),f=l?.extensionSlots?.[n]?.configure?.[r]??{},d=$e([Ne(c,u),f]),p=a??o.schemas[t];Ie(p,d,c);const h=Me(p,d);return De(p,h,c),delete h.extensionSlots,h}function Te(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:We(e)?Object.keys(e).reduce((t,n)=>(t[n]=Te(e[n]),t),{}):{}}function je(e,t){return We(e)?Object.keys(e).reduce((n,r)=>(n[r]=je(e[r],t),n),{}):{_value:e,_source:t}}function Pe(e,t,n){const r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&Ve(r,o+`' contains invalid keys '${i.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||Ve(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||Ve(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||Ve(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(We(e.configure)||Ve(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function _e(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function xe(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter(e=>!e.startsWith("_"))){const i=n+(n&&".")+o,s=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!We(s)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}s.hasOwnProperty("_default")||xe(e,s,i);const a=s._elements;if(Be(a)&&xe(e,a,i+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const c=s._type;c&&!Object.values(V).includes(c)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(V).join(", ")}. Received '${c}'`),Object.keys(s).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),a&&c&&![V.Array,V.Object].includes(c)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(c)}`)}}function Re(e,t,n){const r=t.schemas[e],o=Ne(e,_e(t,n));Ie(r,o,e);const i=Me(r,o);return De(r,i,e),delete i.extensionSlots,i}function Ce(e,t,n){const r=Ne(e,_e(t,n)),o=Me(ze,r);return De(ze,o,e),delete o.extensionSlots,o}function Ne(e,t){return $e(t.map(({[e]:t})=>t).filter(e=>!!e))}function $e(e){return F(j)({},e)}function Ie(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e.hasOwnProperty(r)?Ue(s,o,i):"extensionSlots"===r&&""!==n||Ve(i,`Unknown config key '${i}' provided. Ignoring.`)}}function Ue(e,t,n){ke(n,e._type,t),We(t)?e._type===V.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ue(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||Ie(e,t,n):e._type===V.Array&&function(e,t,n){if(ke(n,V.Array,t)){if(Be(e._elements))for(let r=0;r<t.length;r++)Ue(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)ke(`${n}[${r}]`,e._elements?._type,t[r])}}(e,t,n)}function De(e,t,n=""){if(e)if(t!==e._default&&Le(n,e._validators,t),We(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e._type===V.Object&&e._elements?De(e._elements,o,i):De(s,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)De(e._elements,t[r],`${n}[${r}]`)}function ke(e,t,n){return!t||Le(e,[{Array:G,Boolean:z,ConceptUuid:Y,Number:Z,Object:J,String:q,UUID:Y,PersonAttributeTypeUuid:Y,PatientIdentifierTypeUuid:Y}[t]],n)}function Le(e,t,n){let r=!0;if(t)try{for(let o of t){const t=o(n);"string"==typeof t&&(Ve(e,"object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`),r=!1)}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}return r}fe(X.getState(),ee.getState()),X.subscribe(e=>fe(e,ee.getState())),ee.subscribe(e=>fe(X.getState(),e)),pe(X.getState(),ee.getState()),X.subscribe(e=>pe(e,ee.getState())),ee.subscribe(e=>pe(X.getState(),e)),de(X.getState(),ee.getState()),X.subscribe(e=>de(e,ee.getState())),ee.subscribe(e=>de(X.getState(),e)),he(X.getState(),te.getState(),ee.getState()),X.subscribe(e=>{he(e,te.getState(),ee.getState())}),te.subscribe(e=>{he(X.getState(),e,ee.getState())}),ee.subscribe(e=>{he(X.getState(),te.getState(),e)});const Me=(e,t)=>{const n=R(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&Be(e))if(o._type===V.Array&&Array.isArray(r)){const o=r.map(t=>Me(e,t));n[t]=o}else if(o._type===V.Object)for(let t of Object.keys(r))r[t]=Me(e,r[t])}else if(We(o)){const e=r??{};We(e)&&(n[t]=Me(o,e))}}return n};function Be(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function We(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let Fe=new Set;function Ve(e,t){const n=`${e}:::${t}`;Fe||(Fe=new Set),Fe.has(n)||(console.error(t),Fe.add(n))}function He(e){e?Fe.forEach(t=>{t.startsWith(e)&&Fe.delete(t)}):Fe.clear()}const Ge={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:V.Object,_default:{},_validators:[H(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)).join(", ")}.`)]}},ze={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:V.Array,_default:[]}},...Ge},Ze=(e,t)=>H(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),qe=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return H(e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},Je=qe([]),Ye=e=>H(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),Ke={inRange:Ze,isUrl:Je,isUrlWithTemplateParameters:qe,oneOf:Ye}},44(e,t,n){"use strict";n.d(t,{J:()=>i,N:()=>o});var r=n(8581);function o(e){const t=s(e);setTimeout(()=>{throw t})}function i(){const e=Error();return t=>{s(t).stack+=`\nAsync stacktrace:\n${e.stack}`,o(t)}}function s(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,r.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,r.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},8581(e,t,n){"use strict";n.d(t,{$3:()=>g,FI:()=>h,LQ:()=>m,Vt:()=>y,Yt:()=>o,bJ:()=>v,bK:()=>w,dX:()=>b,ff:()=>u,gj:()=>i,ls:()=>E,pc:()=>c,sT:()=>s});const r="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(r,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};const t=t=>e(t.detail);return window.addEventListener(r,t),()=>window.removeEventListener(r,t)}function s(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}const a="openmrs:precache-static-dependencies";function c(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",f="openmrs:actionable-notification-shown",d="openmrs:toast-shown",p="openmrs:snack-bar-shown";function h(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function m(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function g(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function v(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function w(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function b(e){const t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function E(e){const t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}},5874(e,t,n){"use strict";function r(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function i(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var i=n.strict,s=void 0!==i&&i,a=n.start,c=void 0===a||a,u=n.end,l=void 0===u||u,f=n.encode,d=void 0===f?function(e){return e}:f,p="["+r(n.endsWith||"")+"]|$",h="["+r(n.delimiter||"/#?")+"]",m=c?"^":"",g=0,y=e;g<y.length;g++){var v=y[g];if("string"==typeof v)m+=r(d(v));else{var w=r(d(v.prefix)),b=r(d(v.suffix));if(v.pattern)if(t&&t.push(v),w||b)if("+"===v.modifier||"*"===v.modifier){var E="*"===v.modifier?"?":"";m+="(?:"+w+"((?:"+v.pattern+")(?:"+b+w+"(?:"+v.pattern+"))*)"+b+")"+E}else m+="(?:"+w+"("+v.pattern+")"+b+")"+v.modifier;else m+="("+v.pattern+")"+v.modifier;else m+="(?:"+w+b+")"+v.modifier}}if(l)s||(m+=h+"?"),m+=n.endsWith?"(?="+p+")":"$";else{var O=e[e.length-1],S="string"==typeof O?h.indexOf(O[O.length-1])>-1:void 0===O;s||(m+="(?:"+h+"(?="+p+"))?"),S||(m+="(?="+h+"|"+p+")")}return new RegExp(m,o(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=t.prefixes,i=void 0===o?"./":o,s="[^"+r(t.delimiter||"/#?")+"]+?",a=[],c=0,u=0,l="",f=function(e){if(u<n.length&&n[u].type===e)return n[u++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var r=n[u],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};u<n.length;){var h=f("CHAR"),m=f("NAME"),g=f("PATTERN");if(m||g){var y=h||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(a.push(l),l=""),a.push({name:m||c++,prefix:y,suffix:"",pattern:g||s,modifier:f("MODIFIER")||""})}else{var v=h||f("ESCAPED_CHAR");if(v)l+=v;else if(l&&(a.push(l),l=""),f("OPEN")){y=p();var w=f("NAME")||"",b=f("PATTERN")||"",E=p();d("CLOSE"),a.push({name:w||(b?c++:""),pattern:w&&!b?s:b,prefix:y,suffix:E,modifier:f("MODIFIER")||""})}else d("END")}}return a}(e,n),t,n)}function s(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map(function(e){return s(e,t,n).source});return new RegExp("(?:"+r.join("|")+")",o(n))}(e,t,n):i(e,t,n)}n.d(t,{g4:()=>A,D_:()=>p,lz:()=>f,qh:()=>h,JK:()=>O,tA:()=>S,zl:()=>y,JG:()=>g,oo:()=>v,vf:()=>u,MY:()=>l,Wh:()=>E});const a=(0,n(5048).Zd)("breadcrumbs",[]);function c(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?s(e.matcher):s(e.path)}function u(e){return l([e])}function l(e){const t=[...f(),...e.map(e=>({matcher:c(e),settings:e}))];a.setState(t,!0)}function f(){return a.getState()}function d(e,t){if(t)return function(e,t){const[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=d(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=d(e,t);if(n){const t=[n];let r=d(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=d(e,r.settings.parent);return t.reverse()}}return[]}function h(e){return p(f(),e)}var m=n(599);function g(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return y(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function y(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function v({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=g(e,t).replace(window.location.origin,"");r.startsWith(n)?(0,m.EH)(r):window.location.assign(r)}const w="openmrs:history";function b(e){let t=JSON.parse(sessionStorage.getItem(w)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(w,JSON.stringify(t))}function E(){0===JSON.parse(sessionStorage.getItem(w)??"[]").length&&document.referrer&&b(document.referrer),window.addEventListener("single-spa:routing-event",e=>{const t=O();"replaceState"==e.detail.originalEvent?.singleSpaTrigger?(t[t.length-1]=window.location.href,sessionStorage.setItem(w,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?S({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&b(window.location.href)})}function O(){return JSON.parse(sessionStorage.getItem(w)??"[]")}function S({toUrl:e}){const t=O(),n=t.lastIndexOf(e);if(-1==n)throw new Error(`URL ${e} not found in history; cannot go back to it.`);{const e=t.slice(0,n+1);v({to:t[n]}),sessionStorage.setItem(w,JSON.stringify(e))}}function A(){sessionStorage.removeItem(w)}},861(e,t,n){"use strict";n.d(t,{z:()=>r});const r=(0,n(6072).createContext)({moduleName:"",featureName:""})},8527(e,t,n){"use strict";n.d(t,{F:()=>f});var r=n(6072),o=n(2076),i=n(9324),s=n(967),a=n(861);const c={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},u=new Map,l={errorRetryCount:3,fetcher:s.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>u};function f(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},c,e),n={...l,...t.swrConfig};return function(e){var s,c,u,l;return c=s=class extends r.Component{componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return r.createElement("div",null,"An error has occurred. Please try reloading the page.");{const s=r.createElement(r.Suspense,{fallback:null},r.createElement(i.BE,{value:n},r.createElement(a.z.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(o.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},r.createElement(e,this.props)))));return t.strictMode&&r.StrictMode?r.createElement(r.StrictMode,null,s):s}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},u="displayName",l=`OpenmrsReactComponent(${t.featureName})`,u in c?Object.defineProperty(c,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[u]=l,s}}},5048(e,t,n){"use strict";n.d(t,{Zd:()=>s,jf:()=>c,CE:()=>a,i7:()=>u});var r=n(8101),o=n(7283);const i={};function s(e,t){const n=i[e];if(n)return n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{const n=(0,o.y)()(()=>t);return i[e]={value:n,active:!0},n}}function a(e,t){const n=i[e];return n?(n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(i[e]={value:t,active:!0},t)}function c(e,t){const n=i[e];if(!n){const n=(0,o.y)()(()=>t??{});return i[e]={value:n,active:!1},n}return n.value}function u(...e){const[t,n,o]=e,i=void 0===o?n:o,s=void 0===o?e=>e:n;return i(s(t.getState())),t.subscribe((e,t)=>{const n=s(e);(0,r.b)(t,n)||i(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=i)},1e3)},8101(e,t,n){"use strict";function r(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>r})},241(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1917).A.Symbol},8496(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(241),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r.A?r.A.toStringTag:void 0;var c=Object.prototype.toString;var u=r.A?r.A.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}(e):function(e){return c.call(e)}(e)}},2136(e,t,n){"use strict";n.d(t,{A:()=>r});const r="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis},5647(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(367).A)(Object.getPrototypeOf,Object)},367(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},1917(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(2136),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.A||o||Function("return this")()},3098(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},4963(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8496),o=n(5647),i=n(3098),s=Function.prototype,a=Object.prototype,c=s.toString,u=a.hasOwnProperty,l=c.call(Object);const f=function(e){if(!(0,i.A)(e)||"[object Object]"!=(0,r.A)(e))return!1;var t=(0,o.A)(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},5684(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n;if("function"!=typeof(n=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 n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,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(a(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))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(a(e)));return e}}n.d(t,{A:()=>f,i:()=>u});var u=null;try{u=require("react").createContext()}catch(r){}var l={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"!==i(e))throw new Error("single-spa-react requires a configuration object");var t,n=o(o({},l),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!u&&n.React.createContext&&(u=n.React.createContext()),n.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}(n);var r={bootstrap:d.bind(null,n),mount:p.bind(null,n),unmount:h.bind(null,n)};return n.parcelCanUpdate&&(r.update=m.bind(null,n)),r}function d(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function p(e,t){return new Promise(function(n,r){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 o=v(e,t,function(){n(this)}),i=c(e,t)(),s=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:g(e),renderType:y(e)});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function h(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():g(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function m(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=v(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=c(e,t)();g(e).render(r,i)}})}function g(e){return e.ReactDOMClient||e.ReactDOM}function y(e){return"function"==typeof e.renderType?e.renderType():e.renderType}function v(e,t,n){var r=e.React.createElement(e.rootComponent,t),i=u?e.React.createElement(u.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),i=e.React.createElement(e.errorBoundaryClass,t,i)),e.React.createElement(e.SingleSpaRoot,o(o({},t),{},{mountFinished:n,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)}},599(e,t,n){"use strict";n.d(t,{AG:()=>Te,EH:()=>re,fz:()=>Ce,xL:()=>F});var r=Object.freeze({__proto__:null,get start(){return Me},get ensureJQuerySupport(){return pe},get setBootstrapMaxTime(){return Z},get setMountMaxTime(){return q},get setUnmountMaxTime(){return J},get setUnloadMaxTime(){return Y},get registerApplication(){return Te},get unregisterApplication(){return Pe},get getMountedApps(){return Ee},get getAppStatus(){return Se},get unloadApplication(){return _e},get checkActivityFunctions(){return je},get getAppNames(){return Oe},get pathToActiveWhen(){return Ce},get navigateToUrl(){return re},get patchHistoryApi(){return le},get triggerAppChange(){return Ue},get addErrorHandler(){return c},get removeErrorHandler(){return u},get mountRootParcel(){return F},get NOT_LOADED(){return d},get LOADING_SOURCE_CODE(){return p},get NOT_BOOTSTRAPPED(){return h},get BOOTSTRAPPING(){return m},get NOT_MOUNTED(){return g},get MOUNTING(){return y},get UPDATING(){return w},get LOAD_ERROR(){return O},get MOUNTED(){return v},get UNLOADING(){return E},get UNMOUNTING(){return b},get SKIP_BECAUSE_BROKEN(){return S}}),o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var e=new o("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n};let s=[];function a(e,t,n){const r=f(e,t,n);s.length?s.forEach(e=>e(r)):setTimeout(()=>{throw r})}function c(e){if("function"!=typeof e)throw Error(l(28,!1));s.push(e)}function u(e){if("function"!=typeof e)throw Error(l(29,!1));let t=!1;return s=s.filter(n=>{const r=n===e;return t=t||r,!r}),t}function l(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function f(e,t,n){const r=`${_(t)} '${j(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=r+e.message}catch(e){}o=e}else{console.warn(l(30,!1,t.status,j(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=j(t),t.status=n,o}const d="NOT_LOADED",p="LOADING_SOURCE_CODE",h="NOT_BOOTSTRAPPED",m="BOOTSTRAPPING",g="NOT_MOUNTED",y="MOUNTING",v="MOUNTED",w="UPDATING",b="UNMOUNTING",E="UNLOADING",O="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function A(e){return e.status===v}function T(e){try{return e.activeWhen(window.location)}catch(t){return a(t,e,S),!1}}function j(e){return e.name}function P(e){return Boolean(e.unmountThisParcel)}function _(e){return P(e)?"parcel":"application"}function x(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function R(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function C(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!R(t,e=>"function"!=typeof e)));var t}function N(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=_(e),o=j(e);return function(e){return n.reduce((n,i,s)=>n.then(()=>{const n=i(e);return $(n)?n:Promise.reject(l(15,!1,r,o,t,s))}),Promise.resolve())}}function $(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let I=[];function U(e,t){return Promise.resolve().then(()=>e.status!==h?e:(e.status=m,e.bootstrap?K(e,"bootstrap").then(n).catch(n=>{if(t)throw f(n,e,S);return a(n,e,S),e}):Promise.resolve().then(n)));function n(){return e.status=g,e}}function D(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;e.status=b;const n=Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel());return Promise.all(n).then(r,n=>r().then(()=>{const r=Error(n.message);if(t)throw f(r,e,S);a(r,e,S)})).then(()=>e);function r(){return K(e,"unmount").then(()=>{e.status=g},n=>{if(t)throw f(n,e,S);a(n,e,S)})}})}let k=!1,L=!1;function M(e,t){return Promise.resolve().then(()=>e.status!==g?e:(k||(window.dispatchEvent(new i("single-spa:before-first-mount")),k=!0),e.status=y,K(e,"mount").then(()=>(e.status=v,L||(window.dispatchEvent(new i("single-spa:first-mount")),L=!0),e)).catch(n=>{return e.status=v,D(e,!0).then(r,r);function r(){if(t)throw f(n,e,S);return a(n,e,S),e}})))}let B=0;const W={parcels:{}};function F(){return V.apply(W,arguments)}function V(e,t){const n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(l(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(l(3,!1,typeof e.name));const r=B++;let o=e.name||`parcel-${r}`;if("object"!=typeof t)throw Error(l(4,!1,o,typeof t));if(!t.domElement)throw Error(l(5,!1,o));const i="function"==typeof e,s=i?e:()=>Promise.resolve(e),a={id:r,parcels:{},status:i?p:h,customProps:t,parentName:j(n),unmountThisParcel:()=>m.then(()=>{if(a.status!==v)throw Error(l(6,!1,o,a.status));return D(a,!0)}).then(e=>(a.parentName&&delete n.parcels[a.id],e)).then(e=>(y(e),e)).catch(e=>{throw a.status=S,b(e),e})};let c;n.parcels[r]=a;let u=s();if(!u||"function"!=typeof u.then)throw Error(l(7,!1));u=u.then(e=>{if(!e)throw Error(l(8,!1));if(o=e.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!C(e.bootstrap))throw Error(l(9,!1,o));if(!C(e.mount))throw Error(l(10,!1,o));if(!C(e.unmount))throw Error(l(11,!1,o));if(e.update&&!C(e.update))throw Error(l(12,!1,o));const t=N(e,"bootstrap"),n=N(e,"mount"),i=N(e,"unmount");a.status=h,a.name=o,a.bootstrap=t,a.mount=n,a.unmount=i,a.timeouts=Q(e.timeouts),e.update&&(a.update=N(e,"update"),c.update=function(e){return a.customProps=e,H((t=a,Promise.resolve().then(()=>{if(t.status!==v)throw Error(l(32,!1,j(t)));return t.status=w,K(t,"update").then(()=>(t.status=v,t)).catch(e=>{throw f(e,t,S)})})));var t})});const d=u.then(()=>U(a,!0)),m=d.then(()=>M(a,!0));let y,b;const E=new Promise((e,t)=>{y=e,b=t});return c={mount:()=>H(Promise.resolve().then(()=>{if(a.status!==g)throw Error(l(13,!1,o,a.status));return n.parcels[r]=a,M(a)})),unmount:()=>H(a.unmountThisParcel()),getStatus:()=>a.status,loadPromise:H(u),bootstrapPromise:H(d),mountPromise:H(m),unmountPromise:H(E)},c}function H(e){return e.then(()=>null)}function G(e){const t=j(e);let n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(l(40,!1),t,n));const o=x({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return P(e)&&(o.unmountSelf=e.unmountThisParcel),o}const z={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(16,!1));z.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function q(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(17,!1));z.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function J(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(18,!1));z.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(19,!1));z.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function K(e,t){const n=e.timeouts[t],r=n.warningMillis,o=_(e);return new Promise((i,s)=>{let a=!1,c=!1;e[t](G(e)).then(e=>{a=!0,i(e)}).catch(e=>{a=!0,s(e)}),setTimeout(()=>f(1),r),setTimeout(()=>f(!0),n.millis);const u=l(31,!1,t,o,j(e),n.millis);function f(e){if(!a)if(!0===e)c=!0,n.dieOnTimeout?s(Error(u)):console.error(u);else if(!c){const t=e,o=t*r;console.warn(u),o+r<n.millis&&setTimeout(()=>f(t+1),r)}}})}function Q(e){const t={};for(let n in z)t[n]=x({},z[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then(()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==d&&e.status!==O)return e;let t,n;return e.status=p,e.loadPromise=Promise.resolve().then(()=>{const r=e.loadApp(G(e));if(!$(r))throw n=!0,Error(l(33,!1,j(e)));return r.then(n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!C(t.bootstrap)&&(r=35),C(t.mount)||(r=36),C(t.unmount)||(r=37);const o=_(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(l(r,!1,o,j(e),n),t),a(void 0,e,S),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=x({},e.devtools.overlays,t.devtools.overlays)),e.status=h,e.bootstrap=N(t,"bootstrap"),e.mount=N(t,"mount"),e.unmount=N(t,"unmount"),e.unload=N(t,"unload"),e.timeouts=Q(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=S:(r=O,e.loadErrorTime=(new Date).getTime()),a(t,e,r),e})})}const ee="undefined"!=typeof window,te={hashchange:[],popstate:[]},ne=["hashchange","popstate"];function re(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(l(14,!1));t=e.currentTarget.href,e.preventDefault()}const n=fe(window.location.href),r=fe(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function oe(e){if(e){const t=e[0].type;ne.indexOf(t)>=0&&te[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}let ie;function se(){De([],arguments)}function ae(e,t){return function(){const n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ie&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let ce=null,ue=!1;function le(e){if(ue)throw Error(l(43,!1));ie=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ue=!0,ce=window.history.replaceState,window.addEventListener("hashchange",se),window.addEventListener("popstate",se);const t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&ne.indexOf(e)>=0)||R(te[e],e=>e===n))return t.apply(this,arguments);te[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&ne.indexOf(e)>=0&&(te[e]=te[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=ae(window.history.pushState,"pushState"),window.history.replaceState=ae(ce,"replaceState")}function fe(e){const t=document.createElement("a");return t.href=e,t}ee&&(window.singleSpaNavigate?console.warn(l(41,!1)):window.singleSpaNavigate=re);let de=!1;function pe(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!de){const t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return he.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return he.call(this,n,window.removeEventListener,e,t,arguments)},de=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach(e=>{ne.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,o))}const me={};function ge(e){return Promise.resolve().then(()=>{const t=me[j(e)];if(!t)return e;if(e.status===d)return ye(e,t),e;if(e.status===E)return t.promise.then(()=>e);if(e.status!==g&&e.status!==O)return e;const n=e.status===O?Promise.resolve():K(e,"unload");return e.status=E,n.then(()=>(ye(e,t),e)).catch(n=>(function(e,t,n){delete me[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,a(n,e,S),t.reject(n)}(e,t,n),e))})}function ye(e,t){delete me[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=d,t.resolve()}function ve(e,t,n,r){me[j(e)]={app:e,resolve:n,reject:r},Object.defineProperty(me[j(e)],"promise",{get:t})}function we(e){return me[e]}const be=[];function Ee(){return be.filter(A).map(j)}function Oe(){return be.map(j)}function Se(e){const t=R(be,t=>j(t)===e);return t?t.status:null}let Ae=!1;function Te(e,t,n,r){const o=function(e,t,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(l(39,!1));const t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(l(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(l(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(l(20,!1));const r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(l(24,!1));if(!Re(e.customProps))throw Error(l(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(l(20,!1));if(!t)throw Error(l(23,!1));if("function"!=typeof n)throw Error(l(24,!1));if(!Re(r))throw Error(l(22,!1))}(e,t,n,r),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map(e=>"function"==typeof e?e:Ce(e)),e=>t.some(t=>t(e))}(o.activeWhen),o;var i}(e,t,n,r);if(Be()||Ae||(Ae=!0,setTimeout(()=>{Be()||console.warn(l(1,!1))},5e3)),-1!==Oe().indexOf(o.name))throw Error(l(21,!1,o.name));be.push(x({loadErrorTime:null,status:d,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ee&&(pe(),De())}function je(e=window.location){return be.filter(t=>t.activeWhen(e)).map(j)}function Pe(e){if(0===be.filter(t=>j(t)===e).length)throw Error(l(25,!1,e));return(ee?_e(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const t=be.map(j).indexOf(e);be.splice(t,1)})}function _e(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(l(26,!1));const n=R(be,t=>j(t)===e);if(!n)throw Error(l(27,!1,e));const r=we(j(n));if(t&&t.waitForUnmount){if(r)return r.promise;{const e=new Promise((t,r)=>{ve(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,xe(n,r.resolve,r.reject)):e=new Promise((t,r)=>{ve(n,()=>e,t,r),xe(n,t,r)}),e}}function xe(e,t,n){Promise.resolve().then(()=>{if(R(je(),t=>t===j(e)))return Ue()}).then(()=>D(e).then(ge).then(()=>{t(),setTimeout(()=>{De()})})).catch(n)}function Re(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ce(e,t){const n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const n=e[t];(!r&&":"===n||r&&"/"===n)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const s=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":s,i===e.length)if(r)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let Ne=!1,$e=[],Ie=ee&&window.location.href;function Ue(){return De()}function De(e=[],t,n=!1){if(Ne)return new Promise((e,n)=>{$e.push({resolve:e,reject:n,eventArguments:t})});const{appsToUnload:r,appsToUnmount:o,appsToLoad:s,appsToMount:a}=function(){const e=[],t=[],n=[],r=[],o=(new Date).getTime();return be.forEach(i=>{const s=i.status!==S&&T(i);switch(i.status){case O:s&&o-i.loadErrorTime>=200&&n.push(i);break;case d:case p:s&&n.push(i);break;case h:case g:!s&&we(j(i))?e.push(i):s&&r.push(i);break;case v:s||t.push(i)}}),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}();let c,u=[],f=Ie,m=Ie=window.location.href;return Be()?(Ne=!0,c=r.concat(s,o,a),Promise.resolve().then(()=>(A(0===c.length?"before-no-app-change":"before-app-change",E(!0)),A("before-routing-event",E(!0,{cancelNavigation:y})),Promise.all(u).then(n=>{if(n.some(e=>e))return ce.call(window.history,history.state,"",f.substring(location.origin.length)),Ie=location.href,Ne=!1,De(e,t,!0);const i=r.map(ge),c=o.map(D).map(e=>e.then(ge)).concat(i),u=Promise.all(c);u.then(()=>{A("before-mount-routing-event",E(!0))},e=>{throw e});const l=s.map(e=>X(e).then(e=>ke(e,u))),d=a.filter(e=>s.indexOf(e)<0).map(e=>ke(e,u));return u.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(l.concat(d)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(w).then(()=>{},e=>{throw e})))})))):(c=s,Promise.resolve().then(()=>{const e=s.map(X);return Promise.all(e).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})}));function y(e=!0){const t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);u.push(t.catch(e=>(console.warn(Error(l(42,!1))),console.warn(e),!1)))}function w(){const t=Ee();e.forEach(e=>e.resolve(t));try{A(0===c.length?"no-app-change":"app-change",E()),A("routing-event",E())}catch(e){setTimeout(()=>{throw e})}if(Ne=!1,$e.length>0){const e=$e;$e=[],De(e)}return t}function b(){n||(e.forEach(e=>{oe(e.eventArguments)}),oe(t))}function E(e=!1,n){const i={},u={[v]:[],[g]:[],[d]:[],[S]:[]};e?(s.concat(a).forEach((e,t)=>{p(e,v)}),r.forEach(e=>{p(e,d)}),o.forEach(e=>{p(e,g)})):c.forEach(e=>{p(e)});const l={detail:{newAppStatuses:i,appsByNewStatus:u,totalAppChanges:c.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:m}};return n&&x(l.detail,n),l;function p(e,t){const n=j(e);t=t||Se(n),i[n]=t,(u[t]=u[t]||[]).push(n)}}function A(e,t){n||window.dispatchEvent(new i(`single-spa:${e}`,t))}}function ke(e,t){return T(e)?U(e).then(e=>t.then(()=>T(e)?M(e):e)):t.then(()=>e)}let Le=!1;function Me(e){Le=!0,ee&&(le(e),De())}function Be(){return Le}var We={getRawAppData:function(){return[...be]},reroute:De,NOT_LOADED:d,toLoadPromise:X,toBootstrapPromise:U,unregisterApplication:Pe,getProfilerData:function(){return I}};ee&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=We)},9324(e,t,n){"use strict";n.d(t,{Ay:()=>u,BE:()=>c});var r=n(6072),o=n(9888),i=n(8465);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),a={dedupe:!0},c=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),u=(0,i.withArgs)((e,t,n)=>{const{cache:c,compare:u,suspense:l,fallbackData:f,revalidateOnMount:d,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:y}=n,[v,w,b,E]=i.SWRGlobalState.get(c),[O,S]=(0,i.serialize)(e),A=(0,r.useRef)(!1),T=(0,r.useRef)(!1),j=(0,r.useRef)(O),P=(0,r.useRef)(t),_=(0,r.useRef)(n),x=()=>_.current,R=()=>x().isVisible()&&x().isOnline(),[C,N,$,I]=(0,i.createCacheHelper)(c,O),U=(0,r.useRef)({}).current,D=(0,i.isUndefined)(f)?n.fallback[O]:f,k=(e,t)=>{for(const n in U){const r=n;if("data"===r){if(!u(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!u(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},L=(0,r.useMemo)(()=>{const e=!!O&&!!t&&((0,i.isUndefined)(d)?!x().isPaused()&&!l&&(!!(0,i.isUndefined)(p)||p):d),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=C(),o=I(),s=n(r),a=r===o?s:n(o);let c=s;return[()=>{const e=n(C());return k(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>a]},[c,O]),M=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>$(O,(t,n)=>{k(n,t)||e()}),[c,O]),L[0],L[1]),B=!A.current,W=v[O]&&v[O].length>0,F=M.data,V=(0,i.isUndefined)(F)?D:F,H=M.error,G=(0,r.useRef)(V),z=y?(0,i.isUndefined)(F)?G.current:F:V,Z=!(W&&!(0,i.isUndefined)(H))&&(B&&!(0,i.isUndefined)(d)?d:!x().isPaused()&&(l?!(0,i.isUndefined)(V)&&p:(0,i.isUndefined)(V)||p)),q=!!(O&&t&&B&&Z),J=(0,i.isUndefined)(M.isValidating)?q:M.isValidating,Y=(0,i.isUndefined)(M.isLoading)?q:M.isLoading,K=(0,r.useCallback)(async e=>{const t=P.current;if(!O||!t||T.current||x().isPaused())return!1;let r,o,s=!0;const a=e||{},c=!b[O]||!a.dedupe,l=()=>i.IS_REACT_LEGACY?!T.current&&O===j.current&&A.current:O===j.current,f={isValidating:!1,isLoading:!1},d=()=>{N(f)},p=()=>{const e=b[O];e&&e[1]===o&&delete b[O]},h={isValidating:!0};(0,i.isUndefined)(C().data)&&(h.isLoading=!0);try{if(c&&(N(h),n.loadingTimeout&&(0,i.isUndefined)(C().data)&&setTimeout(()=>{s&&l()&&x().onLoadingSlow(O,n)},n.loadingTimeout),b[O]=[t(S),(0,i.getTimestamp)()]),[r,o]=b[O],r=await r,c&&setTimeout(p,n.dedupingInterval),!b[O]||b[O][1]!==o)return c&&l()&&x().onDiscarded(O),!1;f.error=i.UNDEFINED;const e=w[O];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),c&&l()&&x().onDiscarded(O),!1;const a=C().data;f.data=u(a,r)?a:r,c&&l()&&x().onSuccess(r,O,n)}catch(e){p();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,c&&l()&&(t.onError(e,O,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!R()||t.onErrorRetry(e,O,t,e=>{const t=v[O];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0}))))}return s=!1,d(),!0},[O,c]),Q=(0,r.useCallback)((...e)=>(0,i.internalMutate)(c,j.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{P.current=t,_.current=n,(0,i.isUndefined)(F)||(G.current=F)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!O)return;const e=K.bind(i.UNDEFINED,a);let t=0;const n=(0,i.subscribeCallback)(O,v,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();x().revalidateOnFocus&&n>t&&R()&&(t=n+x().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)x().revalidateOnReconnect&&R()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return K();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return K(r)}});return T.current=!1,j.current=O,A.current=!0,N({_k:S}),Z&&((0,i.isUndefined)(V)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{T.current=!0,n()}},[O]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(h)?h(C().data):h;t&&-1!==e&&(e=setTimeout(n,t))}function n(){C().error||!m&&!x().isVisible()||!g&&!x().isOnline()?t():K(a).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,O]),(0,r.useDebugValue)(z),l&&(0,i.isUndefined)(V)&&O){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");P.current=t,_.current=n,T.current=!1;const e=E[O];if(!(0,i.isUndefined)(e)){const t=Q(e);s(t)}if(!(0,i.isUndefined)(H))throw H;{const e=K(a);(0,i.isUndefined)(z)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:Q,get data(){return U.data=!0,z},get error(){return U.error=!0,H},get isValidating(){return U.isValidating=!0,J},get isLoading(){return U.isLoading=!0,Y}}})},7283(e,t,n){"use strict";n.d(t,{y:()=>o});const r=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,o,i);return i},o=e=>e?r(e):r}}]);
|
package/dist/68.js.LICENSE.txt
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
package/dist/692.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 692.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[311,692],{8493(e,t,n){"use strict";var r=n(6072),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o(function(){a.value=n,a.getSnapshot=t,l(a)&&u({inst:a})},[e,n,t]),s(function(){return l(a)&&u({inst:a}),e(function(){l(a)&&u({inst:a})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888(e,t,n){"use strict";e.exports=n(8493)},4915(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},3311(e,t,n){"use strict";n.r(t),n.d(t,{I18nContext:()=>K,I18nextProvider:()=>re,IcuTrans:()=>X,IcuTransWithoutContext:()=>Z,Trans:()=>B,TransWithoutContext:()=>z,Translation:()=>ne,composeInitialProps:()=>q,date:()=>se,getDefaults:()=>$,getI18n:()=>C,getInitialProps:()=>M,initReactI18next:()=>D,nodesToString:()=>V,number:()=>ce,plural:()=>ue,select:()=>le,selectOrdinal:()=>pe,setDefaults:()=>k,setI18n:()=>R,time:()=>oe,useSSR:()=>ae,useTranslation:()=>ee,withSSR:()=>ie,withTranslation:()=>te});var r=n(6072),a=n(2635),i=n(4915),s=n.n(i),o=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function c(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(o),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var c=i[1].trim(),l=[c,""];c.indexOf("=")>-1&&(l=c.split("=")),t.attrs[l[0]]=l[1],a.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}var l=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,u=/^\s*$/,p=Object.create(null);function d(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(d,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var g={parse:function(e,t){t||(t={}),t.components||(t.components=p);var n,r=[],a=[],i=-1,s=!1;if(0!==e.indexOf("<")){var o=e.indexOf("<");r.push({type:"text",content:-1===o?e:e.substring(0,o)})}return e.replace(l,function(o,l){if(s){if(o!=="</"+n.name+">")return;s=!1}var p,d="/"!==o.charAt(1),g=o.startsWith("\x3c!--"),f=l+o.length,m=e.charAt(f);if(g){var h=c(o);return i<0?(r.push(h),r):((p=a[i]).children.push(h),r)}if(d&&(i++,"tag"===(n=c(o)).type&&t.components[n.name]&&(n.type="component",s=!0),n.voidElement||s||!m||"<"===m||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===i&&r.push(n),(p=a[i-1])&&p.children.push(n),a[i]=n),(!d||n.voidElement)&&(i>-1&&(n.voidElement||n.name===o.slice(2,-1))&&(i--,n=-1===i?r:a[i]),!s&&"<"!==m&&m)){p=-1===i?r:a[i].children;var y=e.indexOf("<",f),v=e.slice(f,-1===y?void 0:y);u.test(v)&&(v=" "),(y>-1&&i+p.length>=0||" "!==v)&&p.push({type:"text",content:v})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+d("",t)},"")}};const f=g,m=(e,t,n,r)=>{const a=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);x(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},h={},y=(e,t,n,r)=>{x(n)&&h[n]||(x(n)&&(h[n]=new Date),m(e,t,n,r))},v=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},b=(e,t,n)=>{e.loadNamespaces(t,v(e,n))},E=(e,t,n,r)=>{if(x(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return b(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,v(e,r))},N=e=>e.displayName||e.name||(x(e)&&e.length>0?e:"Unknown"),x=e=>"string"==typeof e,O=e=>"object"==typeof e&&null!==e,S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},w=e=>I[e],T=e=>e.replace(S,w);let A={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:T,transDefaultProps:void 0};const k=(e={})=>{A={...A,...e}},$=()=>A;let _;const R=e=>{_=e},C=()=>_,j=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},P=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?L(t):t},L=e=>Array.isArray(e)?e:[e],V=(e,t,n,a)=>{if(!e)return"";let i="";const s=L(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((e,s)=>{if(x(e))i+=`${e}`;else{if((0,r.isValidElement)(e)){const{props:r,type:c}=e,l=Object.keys(r).length,u=o.indexOf(c)>-1,p=r.children;if(!p&&u&&!l)return void(i+=`<${c}/>`);if(!p&&(!u||l)||r.i18nIsDynamicList)return void(i+=`<${s}></${s}>`);if(u&&1===l&&x(p))return void(i+=`<${c}>${p}</${c}>`);const d=V(p,t,n,a);return void(i+=`<${s}>${d}</${s}>`)}if(null!==e){if(O(e)){const{format:t,...r}=e,s=Object.keys(r);if(1===s.length){const e=t?`${s[0]}, ${t}`:s[0];return void(i+=`{{${e}}}`)}return void m(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:a,child:e})}m(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:a,child:e})}else m(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:a})}}),i},U=(e,t,n)=>{const a=e.key||t,i=(0,r.cloneElement)(e,{key:a});return!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0?i:(0,r.createElement)(function(){return(0,r.createElement)(r.Fragment,null,i)},{key:a})};function z({children:e,count:t,parent:n,i18nKey:i,context:s,tOptions:o={},values:c,defaults:l,components:u,ns:p,i18n:d,t:g,shouldUnescape:m,...h}){const v=d||C();if(!v)return y(v,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),e;const b=g||v.t.bind(v)||(e=>e),E={...$(),...v.options?.react};let N=p||b.ns||v.options?.defaultNS;N=x(N)?[N]:N||["translation"];const{transDefaultProps:S}=E,I=S?.tOptions?{...S.tOptions,...o}:o,w=m??S?.shouldUnescape,A=S?.values?{...S.values,...c}:c,k=S?.components?{...S.components,...u}:u,_=V(e,E,v,i),R=l||I?.defaultValue||_||E.transEmptyNodeValue||("function"==typeof i?(0,a.Rm)(i):i),{hashTransKey:z}=E,D=i||(z?z(_||R):_||R);c=v.options?.interpolation?.defaultVariables?A&&Object.keys(A).length>0?{...A,...v.options.interpolation.defaultVariables}:{...v.options.interpolation.defaultVariables}:A;const K=(e=>{const t={};if(!e)return t;const n=e=>{L(e).forEach(e=>{x(e)||(j(e)?n(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t})(e);K&&"number"==typeof K.count&&void 0===t&&(t=K.count);const F=c||void 0!==t&&!v.options?.interpolation?.alwaysFormat||!e?I.interpolation:{interpolation:{...I.interpolation,prefix:"#$?",suffix:"?$#"}},q={...I,context:s||I.context,count:t,...c,...F,defaultValue:R,ns:N};let M=D?b(D,q):R;M===D&&R&&(M=R);const B=((e,t,n,r)=>e?Array.isArray(e)?((e,t)=>e.map((e,n)=>U(e,n,t)))(e,t):O(e)?((e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:U(e[r],r,t)})}),n})(e,t):(y(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null)(k,M,v,i);let W=B||e,H=null;var Y;O(Y=B)&&!Array.isArray(Y)&&Object.keys(Y).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0)&&(H=B,W=e);const Z=((e,t,n,a,i,s,o)=>{if(""===n)return[];const c=i.transKeepBasicHtmlNodesFor||[],l=n&&new RegExp(c.map(e=>`<${e}`).join("|")).test(n);if(!(e||t||l||o))return[n];const u=t??{},p=e=>{L(e).forEach(e=>{x(e)||(j(e)?p(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(u,e))})};p(e);const d=((e,t=[],n={})=>{if(!e)return e;const r=[...t,...Object.keys(n)];let a="",i=0;for(;i<e.length;)if("<"===e[i]){let t=!1;const n=e.slice(i).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}if(!t){const n=e.slice(i).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}}t||(a+="<",i+=1)}else a+=e[i],i+=1;return a})(n,c,u),g=f.parse(`<0>${d}</0>`),m={...u,...s},h=(e,t,n)=>{const a=P(e),i=v(a,t.children,n);return(e=>Array.isArray(e)&&e.every(r.isValidElement))(a)&&0===i.length||e.props?.i18nIsDynamicList?a:i},y=(e,t,n,a,i)=>{e.dummy?(e.children=t,n.push((0,r.cloneElement)(e,{key:a},i?void 0:t))):n.push(...r.Children.map([e],e=>{const n="data-i18n-is-dynamic-list",s={key:a,[n]:void 0};return e&&e.props&&Object.keys(e.props).forEach(t=>{"ref"!==t&&"children"!==t&&"i18nIsDynamicList"!==t&&t!==n&&(s[t]=e.props[t])}),(0,r.cloneElement)(e,s,i?null:t)}))},v=(e,n,s)=>{const u=L(e);return L(n).reduce((e,n,p)=>{const d=n.children?.[0]?.content&&a.services.interpolator.interpolate(n.children[0].content,m,a.language);if("tag"===n.type){let g=u[parseInt(n.name,10)];!g&&t&&(g=t[n.name]),1!==s.length||g||(g=s[0][n.name]),g||(g={});const f={...n.attrs};o&&Object.keys(f).forEach(e=>{const t=f[e];x(t)&&(f[e]=T(t))});const b=0!==Object.keys(f).length?((e,t)=>{const n={...t};return n.props={...t.props,...e.props},n})({props:f},g):g,E=(0,r.isValidElement)(b),N=E&&j(n,!0)&&!n.voidElement,S=l&&O(b)&&b.dummy&&!E,I=O(t)&&Object.hasOwnProperty.call(t,n.name);if(x(b)){const t=a.services.interpolator.interpolate(b,m,a.language);e.push(t)}else if(j(b)||N){const t=h(b,n,s);y(b,t,e,p)}else if(S){const t=v(u,n.children,s);y(b,t,e,p)}else if(Number.isNaN(parseFloat(n.name)))if(I){const t=h(b,n,s);y(b,t,e,p,n.voidElement)}else if(i.transSupportBasicHtmlNodes&&c.indexOf(n.name)>-1)if(n.voidElement)e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`}));else{const t=v(u,n.children,s);e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`},t))}else if(n.voidElement)e.push(`<${n.name} />`);else{const t=v(u,n.children,s);e.push(`<${n.name}>${t}</${n.name}>`)}else if(O(b)&&!E){const t=n.children[0]?d:null;t&&e.push(t)}else y(b,d,e,p,1!==n.children.length||!d)}else if("text"===n.type){const t=i.transWrapTextNodes,s="function"==typeof i.unescape?i.unescape:$().unescape,c=o?s(a.services.interpolator.interpolate(n.content,m,a.language)):a.services.interpolator.interpolate(n.content,m,a.language);t?e.push((0,r.createElement)(t,{key:`${n.name}-${p}`},c)):e.push(c)}return e},[])},b=v([{dummy:!0,children:e||[]}],g,L(e||[]));return P(b[0])})(W,H,M,v,E,q,w),X=n??E.defaultTransParent;return X?(0,r.createElement)(X,h,Z):Z}const D={type:"3rdParty",init(e){k(e.options.react),R(e)}},K=(0,r.createContext)();class F{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const q=e=>async t=>({...await(e.getInitialProps?.(t))??{},...M()}),M=()=>{const e=C();if(!e)return console.warn("react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next"),{};const t=e.reportNamespaces?.getUsedNamespaces()??[],n={},r={};return e.languages.forEach(n=>{r[n]={},t.forEach(t=>{r[n][t]=e.getResourceBundle(n,t)||{}})}),n.initialI18nStore=r,n.initialLanguage=e.language,n};function B({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s={},values:o,defaults:c,components:l,ns:u,i18n:p,t:d,shouldUnescape:g,...f}){const{i18n:m,defaultNS:h}=(0,r.useContext)(K)||{},y=p||m||C(),v=d||y?.t.bind(y);return z({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s,values:o,defaults:c,components:l,ns:u||v?.ns||h||y?.options?.defaultNS,i18n:y,t:d,shouldUnescape:g,...f})}class W extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,W)}}const H={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","©":"©","®":"®","™":"™","…":"…","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′","″":"″","‹":"‹","›":"›","§":"§","¶":"¶","·":"·"," ":" "," ":" "," ":" ","€":"€","£":"£","¥":"¥","¢":"¢","¤":"¤","×":"×","÷":"÷","−":"−","±":"±","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"°","µ":"µ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ","¡":"¡","¿":"¿","ƒ":"ƒ","ˆ":"ˆ","˜":"˜","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ª":"ª","º":"º","¯":"¯","´":"´","¸":"¸","¹":"¹","²":"²","³":"³","¼":"¼","½":"½","¾":"¾","♠":"♠","♣":"♣","♥":"♥","♦":"♦","◊":"◊","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","ℵ":"ℵ"},Y=new RegExp(Object.keys(H).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");function Z({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const c=s||C();if(!c)return y(c,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),r.createElement(r.Fragment,{},t);const l=o||c.t?.bind(c)||(e=>e);let u=a||l.ns||c.options?.defaultNS;u=x(u)?[u]:u||["translation"];let p=i;c.options?.interpolation?.defaultVariables&&(p=i&&Object.keys(i).length>0?{...i,...c.options.interpolation.defaultVariables}:{...c.options.interpolation.defaultVariables});const d=l(e,{defaultValue:t,...p,ns:u});try{const e=((e,t=[])=>{if(!e)return[];const n=(e=>{const t=[];let n=0,r="";const a=()=>{r&&(t.push({type:"Text",value:r,position:n-r.length}),r="")};for(;n<e.length;){const i=e[n];if("<"===i){const s=e.slice(n).match(/^<(\d+)>/);if(s)a(),t.push({type:"TagOpen",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length;else{const s=e.slice(n).match(/^<\/(\d+)>/);s?(a(),t.push({type:"TagClose",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length):(r+=i,n+=1)}}else r+=i,n+=1}return a(),t})(e),a=[],i=[],s=new Set;if(n.forEach(n=>{switch(n.type){case"Text":{const e=n.value.replace(Y,e=>H[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));(i.length>0?i[i.length-1].children:a).push(e)}break;case"TagOpen":{const{tagNumber:e}=n,r=(()=>{if(0===i.length)return t;const e=i[i.length-1];return e.declaration.props?.children&&Array.isArray(e.declaration.props.children)?e.declaration.props.children:e.declarations})(),o=r[e];if(!o){s.add(e);const t=`<${e}>`;(i.length>0?i[i.length-1].children:a).push(t);break}i.push({tagNumber:e,children:[],position:n.position,declaration:o,declarations:r})}break;case"TagClose":{const{tagNumber:t}=n;if(s.has(t)){const e=`</${t}>`;(i.length>0?i[i.length-1].children:a).push(e),s.delete(t);break}if(0===i.length)throw new W(`Unexpected closing tag </${t}> at position ${n.position}`,n.position,e);const o=i.pop();if(o.tagNumber!==t)throw new W(`Mismatched tags: expected </${o.tagNumber}> but got </${t}> at position ${n.position}`,n.position,e);const c=((e,t,n)=>{const{type:a,props:i={}}=e;if(i.children&&Array.isArray(i.children)&&n){const{children:e,...n}=i;return r.createElement(a,n,...t)}return 0===t.length?r.createElement(a,i):1===t.length?r.createElement(a,i,t[0]):r.createElement(a,i,...t)})(o.declaration,o.children,o.declarations);(i.length>0?i[i.length-1].children:a).push(c)}}}),i.length>0){const t=i[i.length-1];throw new W(`Unclosed tag <${t.tagNumber}> at position ${t.position}`,t.position,e)}return a})(d,n);return r.createElement(r.Fragment,{},...e)}catch(t){return m(c,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${t.message}`,{i18nKey:e,error:t}),r.createElement(r.Fragment,{},d)}}function X({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const{i18n:c,defaultNS:l}=(0,r.useContext)(K)||{},u=s||c||C(),p=o||u?.t.bind(u);return Z({i18nKey:e,defaultTranslation:t,content:n,ns:a||p?.ns||l||u?.options?.defaultNS,values:i,i18n:u,t:o})}Z.displayName="IcuTransWithoutContext",X.displayName="IcuTrans";var G=n(9888);const J={t:(e,t)=>{if(x(t))return t;if(O(t)&&x(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},Q=()=>()=>{},ee=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:i}=(0,r.useContext)(K)||{},s=n||a||C();s&&!s.reportNamespaces&&(s.reportNamespaces=new F),s||y(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=(0,r.useMemo)(()=>({...$(),...s?.options?.react,...t}),[s,t]),{useSuspense:c,keyPrefix:l}=o,u=e||i||s?.options?.defaultNS,p=x(u)?[u]:u||["translation"],d=(0,r.useMemo)(()=>p,p);s?.reportNamespaces?.addUsedNamespaces?.(d);const g=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{if(!s)return Q;const{bindI18n:t,bindI18nStore:n}=o,r=()=>{g.current+=1,e()};return t&&s.on(t,r),n&&s.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>s.off(e,r)),n&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,o]),m=(0,r.useRef)(),h=(0,r.useCallback)(()=>{if(!s)return J;const e=!(!s.isInitialized&&!s.initializedStoreOnce)&&d.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(y(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,o)),n=t.lng||s.language,r=g.current,a=m.current;if(a&&a.ready===e&&a.lng===n&&a.keyPrefix===l&&a.revision===r)return a;const i={t:s.getFixedT(n,"fallback"===o.nsMode?d:d[0],l),ready:e,lng:n,keyPrefix:l,revision:r};return m.current=i,i},[s,d,l,o,t.lng]),[v,N]=(0,r.useState)(0),{t:O,ready:S}=(0,G.useSyncExternalStore)(f,h,h);(0,r.useEffect)(()=>{if(s&&!S&&!c){const e=()=>N(e=>e+1);t.lng?E(s,t.lng,d,e):b(s,d,e)}},[s,t.lng,d,S,c,v]);const I=s||{},w=(0,r.useRef)(null),T=(0,r.useRef)(),A=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return n},k=(0,r.useMemo)(()=>{const e=I,t=e?.language;let n=e;e&&(w.current&&w.current.__original===e?T.current!==t?(n=A(e),w.current=n,T.current=t):n=w.current:(n=A(e),w.current=n,T.current=t));const r=[O,n,S];return r.t=O,r.i18n=n,r.ready=S,r},[O,I,S,I.resolvedLanguage,I.language,I.languages]);if(s&&c&&!S)throw new Promise(e=>{const n=()=>e();t.lng?E(s,t.lng,d,n):b(s,d,n)});return k},te=(e,t={})=>function(n){function a({forwardedRef:a,...i}){const[s,o,c]=ee(e,{...i,keyPrefix:t.keyPrefix}),l={...i,t:s,i18n:o,tReady:c};return t.withRef&&a?l.ref=a:!t.withRef&&a&&(l.forwardedRef=a),(0,r.createElement)(n,l)}return a.displayName=`withI18nextTranslation(${N(n)})`,a.WrappedComponent=n,t.withRef?(0,r.forwardRef)((e,t)=>(0,r.createElement)(a,Object.assign({},e,{forwardedRef:t}))):a},ne=({ns:e,children:t,...n})=>{const[r,a,i]=ee(e,n);return t(r,{i18n:a,lng:a?.language},i)};function re({i18n:e,defaultNS:t,children:n}){const a=(0,r.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,r.createElement)(K.Provider,{value:a},n)}const ae=(e,t,n={})=>{const{i18n:a}=n,{i18n:i}=(0,r.useContext)(K)||{},s=a||i||C();if(s){if(!s.options?.isClone){if(e&&!s.initializedStoreOnce){if(!s.services?.resourceStore)return void y(s,"I18N_NOT_INITIALIZED","useSSR: i18n instance was found but not initialized (services.resourceStore is missing). Make sure you call i18next.init() before using useSSR — e.g. at module level, not only in getStaticProps/getServerSideProps.");s.services.resourceStore.data=e,s.options.ns=Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e),s.options.ns),s.initializedStoreOnce=!0,s.isInitialized=!0}t&&!s.initializedLanguageOnce&&(s.changeLanguage(t),s.initializedLanguageOnce=!0)}}else y(s,"NO_I18NEXT_INSTANCE","useSSR: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.")},ie=()=>function(e){function t({initialI18nStore:t,initialLanguage:n,...a}){return ae(t,n),(0,r.createElement)(e,{...a})}return t.getInitialProps=q(e),t.displayName=`withI18nextSSR(${N(e)})`,t.WrappedComponent=e,t},se=()=>"",oe=()=>"",ce=()=>"",le=()=>"",ue=()=>"",pe=()=>""}}]);
|
package/dist/692.js.LICENSE.txt
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|