@kenyaemr/esm-patient-clinical-view-app 5.4.2-pre.2592 → 5.4.2-pre.2598
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/.turbo/turbo-build.log +6 -6
- package/dist/127.js +1 -1
- package/dist/152.js +3 -3
- package/dist/152.js.map +1 -1
- package/dist/481.js +66 -0
- package/dist/481.js.map +1 -0
- package/dist/671.js +1 -1
- package/dist/671.js.map +1 -1
- package/dist/941.js +1 -0
- package/dist/941.js.map +1 -0
- package/dist/kenyaemr-esm-patient-clinical-view-app.js +2 -2
- package/dist/kenyaemr-esm-patient-clinical-view-app.js.buildmanifest.json +55 -55
- package/dist/kenyaemr-esm-patient-clinical-view-app.js.map +1 -1
- package/dist/main.js +87 -14
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/config-schema.ts +144 -0
- package/src/index.ts +2 -2
- package/src/maternal-and-child-health/partography/labour-delivery.scss +6 -7
- package/src/maternal-and-child-health/partography/partograph.component.tsx +487 -151
- package/src/maternal-and-child-health/partography/partography-data-form.component.tsx +434 -0
- package/src/maternal-and-child-health/partography/partography-data-form.scss +50 -0
- package/src/maternal-and-child-health/partography/partography-link.component.tsx +21 -0
- package/src/maternal-and-child-health/partography/partography.resource.ts +1024 -0
- package/src/maternal-and-child-health/partography/partography.scss +378 -0
- package/src/maternal-and-child-health/partography/types/index.ts +980 -0
- package/translations/en.json +11 -1
- package/dist/287.js +0 -1
- package/dist/287.js.map +0 -1
- package/dist/98.js +0 -1
- package/dist/98.js.map +0 -1
- package/src/maternal-and-child-health/partography/cervical-dilation.component.tsx +0 -16
- package/src/maternal-and-child-health/partography/contraction-level.component.tsx +0 -16
- package/src/maternal-and-child-health/partography/descent-of-head.component.tsx +0 -16
- package/src/maternal-and-child-health/partography/foetal-heart-rate.component.tsx +0 -17
- package/src/maternal-and-child-health/partography/membrane-amniotic-fluid-moulding.component.tsx +0 -17
- package/src/maternal-and-child-health/partography/partograph-chart.scss +0 -94
- package/src/maternal-and-child-health/partography/partograph-chart.tsx +0 -176
package/dist/152.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
touch-action: pan-x pan-y pinch-zoom;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
`.trim(),e.head.prepend(t)},[d]),(0,v.useEffect)(()=>{let e=g.current;return()=>{var t;for(let n of(p||tw(null!=(t=e.target)?t:void 0),e.disposables))n();e.disposables=[]}},[p]),{isPressed:l||m,pressProps:eT(f,D,{[tN]:!0})}}function tR(e){return"A"===e.tagName&&e.hasAttribute("href")}function tL(e,t){let{key:n,code:i}=e,r=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===i)&&!(t instanceof eQ(t).HTMLInputElement&&!tU(t,n)||t instanceof eQ(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===r||!r&&tR(t))&&"Enter"!==n)}function tV(e,t){let n=t.clientX,i=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:i}}function tH(e,t){return e instanceof HTMLInputElement?!tU(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!tR(e))}let tG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function tU(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:tG.has(e.type)}let tq=null,tW=new Set,tK=new Map,tY=!1,tJ=!1,tZ={Tab:!0,Escape:!0};function tX(e,t){for(let n of tW)n(e,t)}function tQ(e){tY=!0,e.metaKey||!ts()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(tq="keyboard",tX("keyboard",e))}function t0(e){tq="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(tY=!0,tX("pointer",e))}function t1(e){tP(e)&&(tY=!0,tq="virtual")}function t2(e){e.target!==window&&e.target!==document&&!ti&&e.isTrusted&&(tY||tJ||(tq="virtual",tX("virtual",e)),tY=!1,tJ=!1)}function t3(){ti||(tY=!1,tJ=!0)}function t4(e){if("undefined"==typeof window||"undefined"==typeof document||tK.get(eQ(e)))return;let t=eQ(e),n=eX(e),i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tY=!0,i.apply(this,arguments)},n.addEventListener("keydown",tQ,!0),n.addEventListener("keyup",tQ,!0),n.addEventListener("click",t1,!0),t.addEventListener("focus",t2,!0),t.addEventListener("blur",t3,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",t0,!0),n.addEventListener("pointermove",t0,!0),n.addEventListener("pointerup",t0,!0)),t.addEventListener("beforeunload",()=>{t5(e)},{once:!0}),tK.set(t,{focus:i})}let t5=(e,t)=>{let n=eQ(e),i=eX(e);t&&i.removeEventListener("DOMContentLoaded",t),tK.has(n)&&(n.HTMLElement.prototype.focus=tK.get(n).focus,i.removeEventListener("keydown",tQ,!0),i.removeEventListener("keyup",tQ,!0),i.removeEventListener("click",t1,!0),n.removeEventListener("focus",t2,!0),n.removeEventListener("blur",t3,!1),"undefined"!=typeof PointerEvent&&(i.removeEventListener("pointerdown",t0,!0),i.removeEventListener("pointermove",t0,!0),i.removeEventListener("pointerup",t0,!0)),tK.delete(n))};function t6(){return"pointer"!==tq}"undefined"!=typeof document&&("loading"!==(o=eX(void 0)).readyState?t4(c):(a=()=>{t4(c)},o.addEventListener("DOMContentLoaded",a)),()=>t5(c,a));let t7=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function t8(e){let t=eX(e),n=((e=document)=>e.activeElement)(t);"virtual"===tq?ty(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&e8(e)}):e8(e)}function t9(e){let{isDisabled:t,onFocus:n,onBlur:i,onFocusChange:r}=e,a=(0,v.useCallback)(e=>{if(e.target===e.currentTarget)return i&&i(e),r&&r(!1),!0},[i,r]),o=tn(a),s=(0,v.useCallback)(e=>{let t=eX(e.target),i=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&i===tB(e.nativeEvent)&&(n&&n(e),r&&r(!0),o(e))},[r,n,o]);return{focusProps:{onFocus:!t&&(n||r||i)?s:void 0,onBlur:!t&&(i||r)?a:void 0}}}function ne(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}let nt=v.createContext(null);function nn(e,t){let{focusProps:n}=t9(e),{keyboardProps:i}={keyboardProps:e.isDisabled?{}:{onKeyDown:ne(e.onKeyDown),onKeyUp:ne(e.onKeyUp)}},r=eT(n,i),a=function(e){let t=(0,v.useContext)(nt)||{};tE(t,e);let{ref:n,...i}=t;return i}(t),o=e.isDisabled?{}:a,s=(0,v.useRef)(e.autoFocus);(0,v.useEffect)(()=>{s.current&&t.current&&t8(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:eT({...r,tabIndex:l},o)}}function ni(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:i,onFocusWithinChange:r}=e,a=(0,v.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=tD(),l=(0,v.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),r&&r(!1))},[n,r,a,s]),c=tn(l),u=(0,v.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=eX(e.target),n=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&n===tB(e.nativeEvent)){i&&i(e),r&&r(!0),a.current.isFocusWithin=!0,c(e);let n=e.currentTarget;o(t,"focus",e=>{if(a.current.isFocusWithin&&!tS(n,e.target)){let i=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});tt(i,n),l(te(i))}},{capture:!0})}},[i,r,c,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function nr(e={}){var t;let{autoFocus:n=!1,isTextInput:i,within:r}=e,a=(0,v.useRef)({isFocused:!1,isFocusVisible:n||t6()}),[o,s]=(0,v.useState)(!1),[l,c]=(0,v.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),u=(0,v.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]),p=(0,v.useCallback)(e=>{a.current.isFocused=e,s(e),u()},[u]);t={isTextInput:i},t4(),(0,v.useEffect)(()=>{let e=(e,n)=>{var i;let r,o,s,l,c;i=!!(null==t?void 0:t.isTextInput),r=eX(null==n?void 0:n.target),o="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,s="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLElement:HTMLElement,c="undefined"!=typeof window?eQ(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(i=i||r.activeElement instanceof o&&!t7.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof l&&r.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof c&&!tZ[n.key]||(e=>{a.current.isFocusVisible=e,u()})(t6())};return tW.add(e),()=>{tW.delete(e)}},[]);let{focusProps:d}=t9({isDisabled:r,onFocusChange:p}),{focusWithinProps:f}=ni({isDisabled:!r,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:l,focusProps:r?f:d}}v.forwardRef(function(e,t){let{children:n,...i}=e,r=ew(t),a={...i,ref:r};return v.createElement(nt.Provider,{value:a},n)});let na=!1,no=0;function ns(e){"touch"===e.pointerType&&(na=!0,setTimeout(()=>{na=!1},50))}function nl(){if("undefined"!=typeof document)return 0===no&&"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",ns),no++,()=>{--no>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",ns)}}function nc(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,isDisabled:r}=e,[a,o]=(0,v.useState)(!1),s=(0,v.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,v.useEffect)(nl,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=tD(),{hoverProps:u,triggerHoverEnd:p}=(0,v.useMemo)(()=>{let e=(e,t)=>{let r=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&r&&(s.isHovered=!1,c(),i&&i({type:"hoverend",target:r,pointerType:t}),n&&n(!1),o(!1))},a={};return"undefined"!=typeof PointerEvent&&(a.onPointerEnter=i=>{na&&"mouse"===i.pointerType||((i,a)=>{if(s.pointerType=a,r||"touch"===a||s.isHovered||!i.currentTarget.contains(i.target))return;s.isHovered=!0;let c=i.currentTarget;s.target=c,l(eX(i.target),"pointerover",t=>{s.isHovered&&s.target&&!tS(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:a}),n&&n(!0),o(!0)})(i,i.pointerType)},a.onPointerLeave=t=>{!r&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,n,i,r,s,l,c]);return(0,v.useEffect)(()=>{r&&p({currentTarget:s.target},s.pointerType)},[r]),{hoverProps:u,isHovered:a}}if("undefined"!=typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let nu=(0,v.createContext)(!1);function np(e){let t=(t,n)=>(0,v.useContext)(nu)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,v.forwardRef)(t)}let nd=(0,v.createContext)({}),nf=np(function(e,t){var n;[e,t]=eN(e,t,nd);let i=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:r}=i,{buttonProps:a,isPressed:o}=function(e,t){let n,{elementType:i="button",isDisabled:r,onPress:a,onPressStart:o,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:p,onClick:d,href:f,target:m,rel:h,type:g="button"}=e;n="button"===i?{type:g,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==i||r?void 0:f,target:"a"===i?m:void 0,type:"input"===i?g:void 0,disabled:"input"===i?r:void 0,"aria-disabled":r&&"input"!==i?r:void 0,rel:"a"===i?h:void 0};let{pressProps:y,isPressed:b}=tj({onPressStart:o,onPressEnd:s,onPressChange:c,onPress:a,onPressUp:l,onClick:d,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:v}=nn(e,t);p&&(v.tabIndex=r?-1:v.tabIndex);let A=eT(v,y,eZ(e,{labelable:!0}));return{isPressed:b,buttonProps:eT(n,A,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:c}=nr(e),{hoverProps:u,isHovered:p}=nc({...e,isDisabled:e.isDisabled||r}),d={isHovered:p,isPressed:(i.isPressed||o)&&!r,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=r&&r},f=eF({...e,values:d,defaultClassName:"react-aria-Button"}),m=eB(a.id),h=eB(),g=a["aria-labelledby"];r&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,v.useRef)(r);(0,v.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&r?eH(e,"assertive"):y.current&&l&&!r&&eH(e,"assertive"),y.current=r},[r,l,g,m]);let b=eZ(e,{global:!0});return delete b.onClick,v.createElement("button",{...eT(b,f,a,s,u),type:"submit"===a.type&&r?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":r?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":p||void 0,"data-focused":l||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},v.createElement(eL.Provider,{value:{id:h}},f.children))});(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null);let nm=(0,v.createContext)({}),nh=(0,v.createContext)({}),n_=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,nh);let{elementType:n="span",...i}=e;return v.createElement(n,{className:"react-aria-Text",...i,ref:t})});var ng={};ng={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:`\u{627}\u{646}\u{642}\u{631} \u{644}\u{625}\u{646}\u{647}\u{627}\u{621} \u{639}\u{645}\u{644}\u{64A}\u{629} \u{62A}\u{62D}\u{62F}\u{64A}\u{62F} \u{646}\u{637}\u{627}\u{642} \u{627}\u{644}\u{62A}\u{627}\u{631}\u{64A}\u{62E}`,maximumDate:`\u{622}\u{62E}\u{631} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62A}\u{627}\u{62D}`,minimumDate:`\u{623}\u{648}\u{644} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62A}\u{627}\u{62D}`,next:`\u{627}\u{644}\u{62A}\u{627}\u{644}\u{64A}`,previous:`\u{627}\u{644}\u{633}\u{627}\u{628}\u{642}`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{627}\u{646}\u{642}\u{631} \u{644}\u{628}\u{62F}\u{621} \u{639}\u{645}\u{644}\u{64A}\u{629} \u{62A}\u{62D}\u{62F}\u{64A}\u{62F} \u{646}\u{637}\u{627}\u{642} \u{627}\u{644}\u{62A}\u{627}\u{631}\u{64A}\u{62E}`,todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435}, \u{437}\u{430} \u{434}\u{430} \u{434}\u{43E}\u{432}\u{44A}\u{440}\u{448}\u{438}\u{442}\u{435} \u{438}\u{437}\u{431}\u{43E}\u{440}\u{430} \u{43D}\u{430} \u{432}\u{440}\u{435}\u{43C}\u{435}\u{432}\u{438} \u{438}\u{43D}\u{442}\u{435}\u{440}\u{432}\u{430}\u{43B}`,maximumDate:`\u{41F}\u{43E}\u{441}\u{43B}\u{435}\u{434}\u{43D}\u{430} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{44A}\u{440}\u{432}\u{430} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,next:`\u{41D}\u{430}\u{43F}\u{440}\u{435}\u{434}`,previous:`\u{41D}\u{430}\u{437}\u{430}\u{434}`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435}, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{440}\u{438}\u{441}\u{442}\u{44A}\u{43F}\u{438}\u{442}\u{435} \u{43A}\u{44A}\u{43C} \u{438}\u{437}\u{431}\u{43E}\u{440}\u{430} \u{43D}\u{430} \u{432}\u{440}\u{435}\u{43C}\u{435}\u{432}\u{438} \u{438}\u{43D}\u{442}\u{435}\u{440}\u{432}\u{430}\u{43B}`,todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:`Kliknut\xedm dokon\u{10D}\xedte v\xfdb\u{11B}r rozsahu dat`,maximumDate:`Posledn\xed dostupn\xe9 datum`,minimumDate:`Prvn\xed dostupn\xe9 datum`,next:`Dal\u{161}\xed`,previous:`P\u{159}edchoz\xed`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknut\xedm zah\xe1j\xedte v\xfdb\u{11B}r rozsahu dat`,todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klik for at fuldf\xf8re valg af datoomr\xe5de`,maximumDate:"Sidste ledige dato",minimumDate:`F\xf8rste ledige dato`,next:`N\xe6ste`,previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:`Klik for at starte valg af datoomr\xe5de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:`Letztes verf\xfcgbares Datum`,minimumDate:`Erstes verf\xfcgbares Datum`,next:"Weiter",previous:`Zur\xfcck`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:`\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BF}\u{3BB}\u{3BF}\u{3BA}\u{3BB}\u{3B7}\u{3C1}\u{3CE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C5}\u{3C2} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3B9}\u{3CE}\u{3BD}`,maximumDate:`\u{3A4}\u{3B5}\u{3BB}\u{3B5}\u{3C5}\u{3C4}\u{3B1}\u{3AF}\u{3B1} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}`,minimumDate:`\u{3A0}\u{3C1}\u{3CE}\u{3C4}\u{3B7} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}`,next:`\u{395}\u{3C0}\u{3CC}\u{3BC}\u{3B5}\u{3BD}\u{3BF}`,previous:`\u{3A0}\u{3C1}\u{3BF}\u{3B7}\u{3B3}\u{3BF}\u{3CD}\u{3BC}\u{3B5}\u{3BD}\u{3BF}`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BE}\u{3B5}\u{3BA}\u{3B9}\u{3BD}\u{3AE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C5}\u{3C2} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3B9}\u{3CE}\u{3BD}`,todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:`\xdaltima fecha disponible`,minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:`Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks`,maximumDate:`Viimane saadaolev kuup\xe4ev`,minimumDate:`Esimene saadaolev kuup\xe4ev`,next:`J\xe4rgmine`,previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:`Kl\xf5psake kuup\xe4evavahemiku valimiseks`,todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:`Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.`,maximumDate:`Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4`,minimumDate:`Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4`,next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:`Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.`,todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:`Cliquer pour finir de s\xe9lectionner la plage de dates`,maximumDate:`Derni\xe8re date disponible`,minimumDate:`Premi\xe8re date disponible`,next:"Suivant",previous:`Pr\xe9c\xe9dent`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:`Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates`,todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:`\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E1}\u{5D9}\u{5D9}\u{5DD} \u{5D0}\u{5EA} \u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5EA} \u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DB}\u{5D9}\u{5DD}`,maximumDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E4}\u{5E0}\u{5D5}\u{5D9} \u{5D0}\u{5D7}\u{5E8}\u{5D5}\u{5DF}`,minimumDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E4}\u{5E0}\u{5D5}\u{5D9} \u{5E8}\u{5D0}\u{5E9}\u{5D5}\u{5DF}`,next:`\u{5D4}\u{5D1}\u{5D0}`,previous:`\u{5D4}\u{5E7}\u{5D5}\u{5D3}\u{5DD}`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{5DC}\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5D1}\u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5EA} \u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DB}\u{5D9}\u{5DD}`,todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:`Kliknite da dovr\u{161}ite raspon odabranih datuma`,maximumDate:`Posljednji raspolo\u{17E}ivi datum`,minimumDate:`Prvi raspolo\u{17E}ivi datum`,next:`Sljede\u{107}i`,previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapo\u{10D}nete raspon odabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:`Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez`,maximumDate:`Utols\xf3 el\xe9rhet\u{151} d\xe1tum`,minimumDate:`Az els\u{151} el\xe9rhet\u{151} d\xe1tum`,next:`K\xf6vetkez\u{151}`,previous:`El\u{151}z\u{151}`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:`Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz`,todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:`Fai clic per completare la selezione dell\u{2019}intervallo di date`,maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:`Fai clic per selezionare l\u{2019}intervallo di date`,todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:`\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{65E5}\u{4ED8}\u{7BC4}\u{56F2}\u{306E}\u{9078}\u{629E}\u{3092}\u{7D42}\u{4E86}`,maximumDate:`\u{6700}\u{7D42}\u{5229}\u{7528}\u{53EF}\u{80FD}\u{65E5}`,minimumDate:`\u{6700}\u{521D}\u{306E}\u{5229}\u{7528}\u{53EF}\u{80FD}\u{65E5}`,next:`\u{6B21}\u{3078}`,previous:`\u{524D}\u{3078}`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:`\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{65E5}\u{4ED8}\u{7BC4}\u{56F2}\u{306E}\u{9078}\u{629E}\u{3092}\u{958B}\u{59CB}`,todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:`\u{B0A0}\u{C9DC} \u{BC94}\u{C704} \u{C120}\u{D0DD}\u{C744} \u{C644}\u{B8CC}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C2ED}\u{C2DC}\u{C624}.`,maximumDate:`\u{B9C8}\u{C9C0}\u{B9C9}\u{C73C}\u{B85C} \u{C0AC}\u{C6A9} \u{AC00}\u{B2A5}\u{D55C} \u{C77C}\u{C790}`,minimumDate:`\u{CC98}\u{C74C}\u{C73C}\u{B85C} \u{C0AC}\u{C6A9} \u{AC00}\u{B2A5}\u{D55C} \u{C77C}\u{C790}`,next:`\u{B2E4}\u{C74C}`,previous:`\u{C774}\u{C804}`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{B0A0}\u{C9DC} \u{BC94}\u{C704} \u{C120}\u{D0DD}\u{C744} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C2ED}\u{C2DC}\u{C624}.`,todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:`Spustel\u{117}kite, kad baigtum\u{117}te pasirinkti dat\u{173} interval\u{105}`,maximumDate:`Paskutin\u{117} galima data`,minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:`Spustel\u{117}kite, kad prad\u{117}tum\u{117}te pasirinkti dat\u{173} interval\u{105}`,todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:`Noklik\u{161}\u{137}iniet, lai pabeigtu datumu diapazona atlasi`,maximumDate:`P\u{113}d\u{113}jais pieejamais datums`,minimumDate:"Pirmais pieejamais datums",next:`T\u{101}l\u{101}k`,previous:`Atpaka\u{13C}`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:`Noklik\u{161}\u{137}iniet, lai s\u{101}ktu datumu diapazona atlasi`,todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de`,maximumDate:"Siste tilgjengelige dato",minimumDate:`F\xf8rste tilgjengelige dato`,next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:`Klikk for \xe5 starte valg av datoomr\xe5de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:`Kliknij, aby zako\u{144}czy\u{107} wyb\xf3r zakresu dat`,maximumDate:`Ostatnia dost\u{119}pna data`,minimumDate:`Pierwsza dost\u{119}pna data`,next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknij, aby rozpocz\u{105}\u{107} wyb\xf3r zakresu dat`,todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para concluir a sele\xe7\xe3o do intervalo de datas`,maximumDate:`\xdaltima data dispon\xedvel`,minimumDate:`Primeira data dispon\xedvel`,next:`Pr\xf3ximo`,previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para iniciar a sele\xe7\xe3o do intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:`\xdaltima data dispon\xedvel`,minimumDate:`Primeira data dispon\xedvel`,next:`Pr\xf3ximo`,previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para come\xe7ar a selecionar o intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:`Ap\u{103}sa\u{163}i pentru a finaliza selec\u{163}ia razei pentru dat\u{103}`,maximumDate:`Ultima dat\u{103} disponibil\u{103}`,minimumDate:`Prima dat\u{103} disponibil\u{103}`,next:`Urm\u{103}torul`,previous:`\xcenainte`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:`Ap\u{103}sa\u{163}i pentru a \xeencepe selec\u{163}ia razei pentru dat\u{103}`,todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{438}\u{442}\u{44C} \u{432}\u{44B}\u{431}\u{43E}\u{440} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{430} \u{434}\u{430}\u{442}`,maximumDate:`\u{41F}\u{43E}\u{441}\u{43B}\u{435}\u{434}\u{43D}\u{44F}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{435}\u{440}\u{432}\u{430}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}`,next:`\u{414}\u{430}\u{43B}\u{435}\u{435}`,previous:`\u{41D}\u{430}\u{437}\u{430}\u{434}`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43D}\u{430}\u{447}\u{430}\u{442}\u{44C} \u{432}\u{44B}\u{431}\u{43E}\u{440} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{430} \u{434}\u{430}\u{442}`,todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:`Kliknut\xedm dokon\u{10D}\xedte v\xfdber rozsahu d\xe1tumov`,maximumDate:`Posledn\xfd dostupn\xfd d\xe1tum`,minimumDate:`Prv\xfd dostupn\xfd d\xe1tum`,next:`Nasleduj\xface`,previous:`Predch\xe1dzaj\xface`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov`,todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:`Kliknite za dokon\u{10D}anje izbire datumskega obsega`,maximumDate:`Zadnji razpolo\u{17E}ljivi datum`,minimumDate:`Prvi razpolo\u{17E}ljivi datum`,next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite za za\u{10D}etek izbire datumskega obsega`,todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:`Kliknite da dovr\u{161}ite opseg izabranih datuma`,maximumDate:`Zadnji raspolo\u{17E}ivi datum`,minimumDate:`Prvi raspolo\u{17E}ivi datum`,next:`Slede\u{107}i`,previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapo\u{10D}nete opseg izabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:`Klicka f\xf6r att avsluta val av datumintervall`,maximumDate:`Sista tillg\xe4ngliga datum`,minimumDate:`F\xf6rsta tillg\xe4ngliga datum`,next:`N\xe4sta`,previous:`F\xf6reg\xe5ende`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:`Klicka f\xf6r att v\xe4lja datumintervall`,todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:`Tarih aral\u{131}\u{11F}\u{131} se\xe7imini tamamlamak i\xe7in t\u{131}klay\u{131}n`,maximumDate:`Son m\xfcsait tarih`,minimumDate:`\u{130}lk m\xfcsait tarih`,next:"Sonraki",previous:`\xd6nceki`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:`Tarih aral\u{131}\u{11F}\u{131} se\xe7imini ba\u{15F}latmak i\xe7in t\u{131}klay\u{131}n`,todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{438}\u{442}\u{438} \u{432}\u{438}\u{431}\u{456}\u{440} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{443} \u{434}\u{430}\u{442}`,maximumDate:`\u{41E}\u{441}\u{442}\u{430}\u{43D}\u{43D}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{435}\u{440}\u{448}\u{430} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,next:`\u{41D}\u{430}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{438}\u{439}`,previous:`\u{41F}\u{43E}\u{43F}\u{435}\u{440}\u{435}\u{434}\u{43D}\u{456}\u{439}`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{432}\u{438}\u{431}\u{456}\u{440} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{443} \u{434}\u{430}\u{442}`,todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:`\u{5355}\u{51FB}\u{4EE5}\u{5B8C}\u{6210}\u{9009}\u{62E9}\u{65E5}\u{671F}\u{8303}\u{56F4}`,maximumDate:`\u{6700}\u{540E}\u{4E00}\u{4E2A}\u{53EF}\u{7528}\u{65E5}\u{671F}`,minimumDate:`\u{7B2C}\u{4E00}\u{4E2A}\u{53EF}\u{7528}\u{65E5}\u{671F}`,next:`\u{4E0B}\u{4E00}\u{9875}`,previous:`\u{4E0A}\u{4E00}\u{9875}`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`\u{5355}\u{51FB}\u{4EE5}\u{5F00}\u{59CB}\u{9009}\u{62E9}\u{65E5}\u{671F}\u{8303}\u{56F4}`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:`\u{6309}\u{4E00}\u{4E0B}\u{4EE5}\u{5B8C}\u{6210}\u{9078}\u{53D6}\u{65E5}\u{671F}\u{7BC4}\u{570D}`,maximumDate:`\u{6700}\u{5F8C}\u{4E00}\u{500B}\u{53EF}\u{7528}\u{65E5}\u{671F}`,minimumDate:`\u{7B2C}\u{4E00}\u{500B}\u{53EF}\u{7528}\u{65E5}\u{671F}`,next:`\u{4E0B}\u{4E00}\u{9801}`,previous:`\u{4E0A}\u{4E00}\u{9801}`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`\u{6309}\u{4E00}\u{4E0B}\u{4EE5}\u{958B}\u{59CB}\u{9078}\u{53D6}\u{65E5}\u{671F}\u{7BC4}\u{570D}`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let ny=Symbol.for("react-aria.i18n.locale"),nb=Symbol.for("react-aria.i18n.strings");class nv{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var i;if(t[e])return t[e];let r=(i=e,Intl.Locale?new Intl.Locale(i).language:i.split("-")[0]);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("undefined"==typeof window)return null;let t=window[ny];if(void 0===s){let e=window[nb];if(!e)return null;for(let n in s={},e)s[n]=new nv({[t]:e[n]},t)}let n=null==s?void 0:s[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let nA=new Map,nw=new Map;class n${format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let i=t["="+e];if(i)return"function"==typeof i?i():i;let r=this.locale+":"+n,a=nA.get(r);return a||(a=new Intl.PluralRules(this.locale,{type:n}),nA.set(r,a)),"function"==typeof(i=t[a.select(e)]||t.other)?i():i}number(e){let t=nw.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),nw.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}let nk=new WeakMap;function nx(e,t){let n;return t&&nv.getGlobalDictionaryForPackage(t)||((n=nk.get(e))||(n=new nv(e),nk.set(e,n)),n)}function nC(e,t){let{locale:n}=eA(),i=nx(e,t);return(0,v.useMemo)(()=>new n$(n,i),[n,i])}let nE=new Map;class nD{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==nP&&(nP="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),nP&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=nB(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),i=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===i&&23===r)return"h23";if(24===i&&23===r)return"h24";if(0===i&&11===r)return"h11";if(12===i&&11===r)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=nB(e,t),this.options=t}}let nS={true:{ja:"h11"},false:{}};function nB(e,t={}){if("boolean"==typeof t.hour12&&(null==nz&&(nz="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),nz)){let n=nS[String((t={...t}).hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=null!=n?n:i,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(nE.has(n))return nE.get(n);let i=new Intl.DateTimeFormat(e,t);return nE.set(n,i),i}let nz=null,nP=null;function nT(e,t){let n=(0,v.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function nM(e){e=nT(null!=e?e:{},nO);let{locale:t}=eA();return(0,v.useMemo)(()=>new nD(t,e),[t,e])}function nO(e,t){if(e===t)return!0;let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}function nF(e){return e&&e.__esModule?e.default:e}let nI=new WeakMap;function nN(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function nj(e,t,n,i){let r=nC(nF(ng),"@react-aria/calendar"),a=nN(e)||nN(t),o=nM({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),s=nM({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return(0,v.useMemo)(()=>{if((0,X.ro)(e,(0,X.wH)(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),(0,X.ro)(t,(0,X.p9)(e)))return o.format(a.toDate(n));if((0,X.ro)(t,(0,X.p9)(t)))return i?nR(o,r,a,s,n):o.formatRange(a.toDate(n),s.toDate(n))}return i?nR(s,r,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,r,n,i])}function nR(e,t,n,i,r){let a=e.formatRangeToParts(n.toDate(r),i.toDate(r)),o=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)o=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<o?s+=a[e].value:e>o&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function nL(e,t){let n=(0,v.useRef)(!0),i=(0,v.useRef)(null);(0,v.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,v.useEffect)(()=>{let r=i.current;n.current?n.current=!1:(!r||t.some((e,t)=>!Object.is(e,r[t])))&&e(),i.current=t},t)}function nV(e,t){let{id:n,"aria-label":i,"aria-labelledby":r}=e;return n=eB(n),r&&i?r=[...new Set([n,...r.trim().split(/\s+/)])].join(" "):r&&(r=r.trim().split(/\s+/).join(" ")),i||r||!t||(i=t),{id:n,"aria-label":i,"aria-labelledby":r}}function nH(e,t){var n,i;let r,a,o,s,l,c=nC((n=ng)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=eZ(e),p=nj(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=nj(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);nL(()=>{t.isFocused||eH(d)},[d]);let f=(o=nC(nF(ng),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=null!=(i=t.value)?i:void 0,s=nM({weekday:"long",month:"long",year:"numeric",day:"numeric",era:nN(r)||nN(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,v.useMemo)(()=>{if(!l&&r&&a)if((0,X.ro)(r,a)){let e=s.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=nR(s,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,l,t.timeZone,o,s]));nL(()=>{f&&eH(f,"polite",4e3)},[f]);let m=ez([!!e.errorMessage,e.isInvalid,e.validationState]);nI.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,v.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[b,A]=(0,v.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&b&&(A(!1),t.setFocused(!0)),{calendarProps:eT(u,nV({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":c.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:w,onFocusChange:A},errorMessageProps:{id:m},title:p}}let nG={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function nU(e={}){let{style:t,isFocusable:n}=e,[i,r]=(0,v.useState)(!1),{focusWithinProps:a}=ni({isDisabled:!n,onFocusWithinChange:e=>r(e)}),o=(0,v.useMemo)(()=>i?t:t?{...nG,...t}:nG,[i]);return{visuallyHiddenProps:{...a,style:o}}}function nq(e){let{children:t,elementType:n="div",isFocusable:i,style:r,...a}=e,{visuallyHiddenProps:o}=nU(e);return v.createElement(n,eT(a,o),t)}function nW(e,t,n,i){let r=eE(n),a=null==n;(0,v.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,r,i),()=>{n.removeEventListener(t,r,i)}},[e,t,i,a,r])}let nK=0,nY=new Map;function nJ(e){let[t,n]=(0,v.useState)();return ex(()=>{if(!e)return;let t=nY.get(e);if(t)n(t.element.id);else{let i=`react-aria-description-${nK++}`;n(i);let r=document.createElement("div");r.id=i,r.style.display="none",r.textContent=e,document.body.appendChild(r),t={refCount:0,element:r},nY.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),nY.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function nZ(e,t){if(!e)return!1;let n=window.getComputedStyle(e),i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function nX(e,t,n){let i="left"===n?"offsetLeft":"offsetTop",r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);){if(t.offsetParent.contains(e)){r-=e[i];break}t=t.offsetParent}return r}function nQ(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(o).overflow)for(let t of function(e,t){let n=[];for(;e&&e!==document.documentElement;)nZ(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,t){let n=nX(e,t,"left"),i=nX(e,t,"top"),r=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:u,scrollPaddingRight:p,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),m=o+parseInt(c,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,b=parseInt(u,10)||0,v=parseInt(d,10)||0,A=parseInt(p,10)||0,w=parseInt(f,10)||0;n<=o+w?o=n-parseInt(c,10)-w:n+r>g-A&&(o+=n+r-g+A),i<=h+b?s=i-parseInt(l,10)-b:i+a>y-v&&(s+=i+a-y+v),e.scrollLeft=o,e.scrollTop=s}(t,e);else{var n,i,r,a;let{left:o,top:s}=e.getBoundingClientRect();null==e||null==(n=e.scrollIntoView)||n.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(s-c)>1)&&(null==t||null==(r=t.containingElement)||null==(i=r.scrollIntoView)||i.call(r,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function n0(e,t){let n=e;for(nZ(n,t)&&(n=n.parentElement);n&&!nZ(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function n1(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function n2(e,t,n,i,r){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let o=n3(e,t,n).subtract(a);return n5(e,o,t,n,i,r)}function n3(e,t,n,i,r){let a=e;return t.years?a=(0,X.D)(e):t.months?a=(0,X.wH)(e):t.weeks&&(a=(0,X.kq)(e,n)),n5(e,a,t,n,i,r)}function n4(e,t,n,i,r){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let o=n3(e,t,n).subtract(a);return n5(e,o,t,n,i,r)}function n5(e,t,n,i,r,a){if(r&&e.compare(r)>=0){let e=(0,X.ZI)(t,n3((0,Z.gw)(r),n,i));e&&(t=e)}if(a&&0>=e.compare(a)){let e=(0,X.Py)(t,n4((0,Z.gw)(a),n,i));e&&(t=e)}return t}function n6(e,t,n){if(t){let n=(0,X.ZI)(e,(0,Z.gw)(t));n&&(e=n)}if(n){let t=(0,X.Py)(e,(0,Z.gw)(n));t&&(e=t)}return e}function n7(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}var n8=n(12748);function n9(e,t,n){let[i,r]=(0,v.useState)(e||t),a=(0,v.useRef)(void 0!==e),o=void 0!==e;(0,v.useEffect)(()=>{a.current,a.current=o},[o]);let s=o?e:i,l=(0,v.useCallback)((e,...t)=>{let i=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),o||(s=e)};"function"==typeof e?r((n,...r)=>{let a=e(o?s:n,...r);return(i(a,...t),o)?n:a}):(o||r(e),i(e,...t))},[o,s,n]);return[s,l]}function ie(e){var t,n,i;let r=(0,v.useMemo)(()=>new nD(e.locale),[e.locale]),a=(0,v.useMemo)(()=>r.resolvedOptions(),[r]),{locale:o,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:u,selectionAlignment:p,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,v.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=n9(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),b=(0,v.useMemo)(()=>g?(0,Z.yP)((0,Z.gw)(g),h):null,[g,h]),A=(0,v.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,$]=n9((0,v.useMemo)(()=>e.focusedValue?n6((0,Z.yP)((0,Z.gw)(e.focusedValue),h),c,u):void 0,[e.focusedValue,h,c,u]),(0,v.useMemo)(()=>n6(e.defaultFocusedValue?(0,Z.yP)((0,Z.gw)(e.defaultFocusedValue),h):b||(0,Z.yP)((0,X.Ec)(A),h),c,u),[e.defaultFocusedValue,b,A,h,c,u]),e.onFocusChange),[k,x]=(0,v.useState)(()=>{switch(p){case"start":return n3(w,l,o,c,u);case"end":return n4(w,l,o,c,u);default:return n2(w,l,o,c,u)}}),[C,E]=(0,v.useState)(e.autoFocus||!1),D=(0,v.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,k.add(e)},[k,l]),[S,B]=(0,v.useState)(h);if(!(0,X.Jg)(h,S)){let e=(0,Z.yP)(w,h);x(n2(e,l,o,c,u)),$(e),B(h)}function z(e){$(e=n6(e,c,u))}function P(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=n7(e=n6(e,c,u),k,d))&&(e=(0,Z.yP)(e,(null==g?void 0:g.calendar)||new(0,n8.FG)),g&&"hour"in g?y(g.set(e)):y(e))}}n1(w,c,u)?$(n6(w,c,u)):0>w.compare(k)?x(n4(w,l,o,c,u)):w.compare(D)>0&&x(n3(w,l,o,c,u));let T=(0,v.useMemo)(()=>!!b&&(!!(d&&d(b))||n1(b,c,u)),[b,d,c,u]),M=e.isInvalid||"invalid"===e.validationState||T,O=(0,v.useMemo)(()=>"visible"===f?l:it(l),[f,l]);return{isDisabled:null!=(n=e.isDisabled)&&n,isReadOnly:null!=(i=e.isReadOnly)&&i,value:b,setValue:P,visibleRange:{start:k,end:D},minValue:c,maxValue:u,focusedDate:w,timeZone:A,validationState:M?"invalid":null,isValueInvalid:M,setFocusedDate(e){z(e),E(!0)},focusNextDay(){z(w.add({days:1}))},focusPreviousDay(){z(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&z(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&z(w.subtract({weeks:1}))},focusNextPage(){let e=k.add(O);$(n6(w.add(O),c,u)),x(n3(n5(w,e,O,o,c,u),O,o))},focusPreviousPage(){let e=k.subtract(O);$(n6(w.subtract(O),c,u)),x(n3(n5(w,e,O,o,c,u),O,o))},focusSectionStart(){l.days?z(k):l.weeks?z((0,X.kq)(w,o)):(l.months||l.years)&&z((0,X.wH)(w))},focusSectionEnd(){l.days?z(D):l.weeks?z((0,X.$I)(w,o)):(l.months||l.years)&&z((0,X.p9)(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?z(w.add({months:1})):(l.months||l.years)&&z(w.add({years:1})):z(w.add(it(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?z(w.subtract({months:1})):(l.months||l.years)&&z(w.subtract({years:1})):z(w.subtract(it(l)))},selectFocusedDate(){d&&d(w)||P(w)},selectDate(e){P(e)},isFocused:C,setFocused:E,isInvalid:e=>n1(e,c,u),isSelected(e){return null!=b&&(0,X.ro)(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>C&&w&&(0,X.ro)(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(k)||t.compare(D)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=k.subtract({days:1});return(0,X.ro)(e,k)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=D.add({days:1});return(0,X.ro)(e,D)||this.isInvalid(e)},getDatesInWeek(e,t=k){let n=t.add({weeks:e}),i=[];n=(0,X.kq)(n,o,m);let r=(0,X.SJ)(n,o,m);for(let e=0;e<r;e++)i.push(null);for(;i.length<7;){i.push(n);let e=n.add({days:1});if((0,X.ro)(n,e))break;n=e}for(;i.length<7;)i.push(null);return i}}}function it(e){let t={...e};for(let n in e)t[n]=1;return t}function ii(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:(0,Z.gw)(e),end:(0,Z.gw)(t)}):null}function ir(e,t){return(e=(0,Z.yP)(e,(null==t?void 0:t.calendar)||new(0,n8.FG)),t&&"hour"in t)?t.set(e):e}function ia(e,t,n){let i=e.add({days:n});for(;(n<0?i.compare(t.visibleRange.start)>=0:0>=i.compare(t.visibleRange.end))&&!t.isCellUnavailable(i);)i=i.add({days:n});if(t.isCellUnavailable(i))return i.add({days:-n})}let io=(0,v.createContext)(null),is=(0,v.createContext)(null),il=(0,v.createContext)(null),ic=(0,v.createContext)(null),iu=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,io);let{locale:n}=eA(),i=ie({...e,locale:n,createCalendar:e.createCalendar||J.d}),{calendarProps:r,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:l}=nH(e,i),c=eF({...e,values:{state:i,isDisabled:e.isDisabled||!1,isInvalid:i.isValueInvalid},defaultClassName:"react-aria-Calendar"}),u=eZ(e,{global:!0});return v.createElement("div",{...eT(u,c,r),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":i.isValueInvalid||void 0},v.createElement(eO,{values:[[nd,{slots:{previous:a,next:o}}],[nm,{"aria-hidden":!0,level:2,children:l}],[il,i],[io,e],[nh,{slots:{errorMessage:s}}]]},v.createElement(nq,null,v.createElement("h2",null,r["aria-label"])),c.children,v.createElement(nq,null,v.createElement("button",{"aria-label":o["aria-label"],disabled:o.isDisabled,onClick:()=>i.focusNextPage(),tabIndex:-1}))))}),ip=(0,v.forwardRef)(function(e,t){var n,i;let r,a,o;[e,t]=eN(e,t,is);let{locale:s}=eA(),l=function(e){let{value:t,defaultValue:n,onChange:i,createCalendar:r,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:l,...c}=e,[u,p]=n9(t,n||null,i),[d,f]=(0,v.useState)(null),m="center";if(u&&u.start&&u.end){let e=n2((0,Z.gw)(u.start),o,a,s,l).add(o).subtract({days:1});u.end.compare(e)>0&&(m="start")}let h=(0,v.useRef)(null),[g,y]=(0,v.useState)(null),b=(0,v.useMemo)(()=>(0,X.ZI)(s,null==g?void 0:g.start),[s,g]),A=(0,v.useMemo)(()=>(0,X.Py)(l,null==g?void 0:g.end),[l,g]),w=ie({...c,value:u&&u.start,createCalendar:r,locale:a,visibleDuration:o,minValue:b,maxValue:A,selectionAlignment:m}),$=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:ia(t,w,-1),end:ia(t,w,1)},y(h.current)):(h.current=null,y(null))},[k,x]=(0,v.useState)(w.visibleRange);(0,X.NV)(w.visibleRange.start,k.start)&&(0,X.NV)(w.visibleRange.end,k.end)||($(d),x(w.visibleRange));let C=e=>{e?(f(e),$(e)):(f(null),$(null))},E=d?ii(d,w.focusedDate):u&&ii(u.start,u.end),D=t=>{if(e.isReadOnly)return;let n=n7(n6(t,b,A),w.visibleRange.start,e.isDateUnavailable);if(n)if(d){let e=ii(d,n);e&&p({start:ir(e.start,null==u?void 0:u.start),end:ir(e.end,null==u?void 0:u.end)}),C(null)}else C(n)},[S,B]=(0,v.useState)(!1),{isDateUnavailable:z}=e,P=(0,v.useMemo)(()=>!!u&&!d&&(!!(z&&(z(u.start)||z(u.end)))||n1(u.start,s,l)||n1(u.end,s,l)),[z,u,d,s,l]),T=e.isInvalid||"invalid"===e.validationState||P;return{...w,value:u,setValue:p,anchorDate:d,setAnchorDate:C,highlightedRange:E,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){D(w.focusedDate)},selectDate:D,highlightDate(e){d&&w.setFocusedDate(e)},isSelected:e=>!!(E&&e.compare(E.start)>=0&&0>=e.compare(E.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,n;return w.isInvalid(e)||n1(e,null==(t=h.current)?void 0:t.start,null==(n=h.current)?void 0:n.end)},isDragging:S,setDragging:B}}({...e,locale:s,createCalendar:e.createCalendar||J.d}),{calendarProps:c,prevButtonProps:u,nextButtonProps:p,errorMessageProps:d,title:f}=(n=e,i=t,r=nH(n,l),a=(0,v.useRef)(!1),nW(o=(0,v.useRef)("undefined"!=typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),nW(o,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;i.current&&i.current.contains(document.activeElement)&&(!i.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),r.calendarProps.onBlur=e=>{i.current&&(e.relatedTarget&&i.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},nW(i,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),r),m=eF({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"}),h=eZ(e,{global:!0});return v.createElement("div",{...eT(m,h,c),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},v.createElement(eO,{values:[[nd,{slots:{previous:u,next:p}}],[nm,{"aria-hidden":!0,level:2,children:f}],[ic,l],[is,e],[nh,{slots:{errorMessage:d}}]]},v.createElement(nq,null,v.createElement("h2",null,c["aria-label"])),m.children,v.createElement(nq,null,v.createElement("button",{"aria-label":p["aria-label"],disabled:p.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),id=(0,v.createContext)(null),im=(0,v.forwardRef)(function(e,t){var n,i;let r=(0,v.useContext)(il),a=(0,v.useContext)(ic),o=eI(io),s=eI(is),l=null!=r?r:a,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let u=null!=(n=null==o?void 0:o.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:p,headerProps:d,weekDays:f,weeksInMonth:m}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:i=t.visibleRange.end,firstDayOfWeek:r}=e,{direction:a}=eA(),o=nj(n,i,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=nI.get(t),c=nV({"aria-label":[s,o].filter(Boolean).join(", "),"aria-labelledby":l}),u=nM({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=eA(),d=(0,v.useMemo)(()=>{let e=(0,X.kq)((0,X.Ec)(t.timeZone),p,r);return[...Array(7).keys()].map(n=>{let i=e.add({days:n}).toDate(t.timeZone);return u.format(i)})},[p,t.timeZone,u,r]),f=(0,X.RZ)(n,p,r);return{gridProps:eT(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:d,weeksInMonth:f}}({startDate:c,endDate:(0,X.p9)(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:u},l),h=eZ(e,{global:!0});return v.createElement(id.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:m}},v.createElement("table",{...eT(h,p),ref:t,style:e.style,cellPadding:0,className:null!=(i=e.className)?i:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:v.createElement(v.Fragment,null,v.createElement(ih,null,e=>v.createElement(i_,null,e)),v.createElement(ig,null,e.children))))}),ih=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,{headerProps:a,weekDays:o}=(0,v.useContext)(id),s=eZ(e,{global:!0});return v.createElement("thead",{...eT(s,a),ref:t,style:i,className:r||"react-aria-CalendarGridHeader"},v.createElement("tr",null,o.map((e,t)=>v.cloneElement(n(e),{key:t}))))}),i_=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,a=eZ(e,{global:!0});return v.createElement("th",{...a,ref:t,style:i,className:r||"react-aria-CalendarHeaderCell"},n)}),ig=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,a=(0,v.useContext)(il),o=(0,v.useContext)(ic),s=null!=a?a:o,{startDate:l,weeksInMonth:c}=(0,v.useContext)(id),u=eZ(e,{global:!0});return v.createElement("tbody",{...u,ref:t,style:i,className:r||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>v.createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?v.cloneElement(n(e),{key:t}):v.createElement("td",{key:t})))))}),iy=(0,v.forwardRef)(function({date:e,...t},n){var i;let r=(0,v.useContext)(il),a=(0,v.useContext)(ic),o=null!=r?r:a,{startDate:s}=null!=(i=(0,v.useContext)(id))?i:{startDate:o.visibleRange.start},l=!(0,X.tF)(s,e),c=(0,X.cK)(e,o.timeZone),u=(0,v.useRef)(null),{cellProps:p,buttonProps:d,...f}=function(e,t,n){var i;let r,{date:a,isDisabled:o}=e,{errorMessageId:s,selectedDateDescription:l}=nI.get(t),c=nC((i=ng)&&i.__esModule?i.default:i,"@react-aria/calendar"),u=nM({weekday:"long",day:"numeric",month:"long",year:"numeric",era:nN(a),timeZone:t.timeZone}),p=t.isSelected(a),d=t.isCellFocused(a)&&!e.isOutsideMonth;o=o||t.isCellDisabled(a);let f=t.isCellUnavailable(a),m=!o&&!f,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&(0,X.ro)(t.value,a));h&&(p=!0),a=nT(a,X.NV);let g=(0,v.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=(0,X.cK)(a,t.timeZone),b=(0,v.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&((0,X.ro)(a,t.value.start)||(0,X.ro)(a,t.value.end))&&(e=l+", "),e+=u.format(g),y?e=c.format(p?"todayDateSelected":"todayDate",{date:e}):p&&(e=c.format("dateSelected",{date:e})),t.minValue&&(0,X.ro)(a,t.minValue)?e+=", "+c.format("minimumDate"):t.maxValue&&(0,X.ro)(a,t.maxValue)&&(e+=", "+c.format("maximumDate")),e},[u,g,c,p,y,a,t,l]),A="";"anchorDate"in t&&d&&!t.isReadOnly&&m&&(A=t.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let w=nJ(A),$=(0,v.useRef)(!1),k=(0,v.useRef)(!1),x=(0,v.useRef)(void 0),{pressProps:C,isPressed:E}=tj({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if((0,X.ro)(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),k.current=!0;return}else if((0,X.ro)(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),k.current=!0;return}}let n=()=>{t.setDragging(!0),x.current=void 0,t.selectDate(a),t.setFocusedDate(a),$.current=!0};"touch"===e.pointerType?x.current=setTimeout(n,200):n()}},onPressEnd(){k.current=!1,$.current=!1,clearTimeout(x.current),x.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&x.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(k.current)t.setAnchorDate(a);else if(t.anchorDate&&!$.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});o||(r=(0,X.ro)(a,t.focusedDate)?0:-1),(0,v.useEffect)(()=>{d&&n.current&&(e8(n.current),"pointer"!==tq&&document.activeElement===n.current&&nQ(n.current,{containingElement:n0(n.current)}))},[d,n]);let D=nM({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),S=(0,v.useMemo)(()=>D.formatToParts(g).find(e=>"day"===e.type).value,[D,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":p||void 0,"aria-invalid":h||void 0},buttonProps:eT(C,{onFocus(){o||t.setFocusedDate(a)},tabIndex:r,role:"button","aria-disabled":!m||void 0,"aria-label":b,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:E,isFocused:d,isSelected:p,isDisabled:o,isUnavailable:f,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:S}}({date:e,isOutsideMonth:l},o,u),{hoverProps:m,isHovered:h}=nc({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=nr();y&&(y=f.isFocused);let b=!1,A=!1;"highlightedRange"in o&&o.highlightedRange&&(b=(0,X.ro)(e,o.highlightedRange.start),A=(0,X.ro)(e,o.highlightedRange.end));let w=eF({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:l,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:A,isToday:c,...f}}),$={"data-focused":f.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":l||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":A||void 0,"data-invalid":f.isInvalid||void 0,"data-today":c||void 0},k=eZ(t,{global:!0});return v.createElement("td",{...p,ref:n},v.createElement("div",{...eT(k,d,g,m,$,w),ref:u}))}),ib=(0,v.createContext)({}),iv=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ib);let{isDisabled:r,isInvalid:a,onHoverStart:o,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:u,isHovered:p}=nc({onHoverStart:o,onHoverChange:s,onHoverEnd:l,isDisabled:r}),{isFocused:d,isFocusVisible:f,focusProps:m}=nr({within:!0});null!=r||(r=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=eF({...e,values:{isHovered:p,isFocusWithin:d,isFocusVisible:f,isDisabled:r,isInvalid:a},defaultClassName:"react-aria-Group"});return v.createElement("div",{...eT(c,m,u),...h,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(i=e.slot)?i:void 0,"data-focus-within":d||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0,"data-disabled":r||void 0,"data-invalid":a||void 0},h.children)}),iA=(0,v.createContext)({}),iw=np(function(e,t){[e,t]=eN(e,t,iA);let{hoverProps:n,isHovered:i}=nc(e),{isFocused:r,isFocusVisible:a,focusProps:o}=nr({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=eF({...e,values:{isHovered:i,isFocused:r,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return v.createElement("input",{...eT((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,...r}=e;return r})(e),o,n),...l,ref:t,"data-focused":r||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var i$={};i$={"ar-AE":{calendar:`\u{627}\u{644}\u{62A}\u{642}\u{648}\u{64A}\u{645}`,day:`\u{64A}\u{648}\u{645}`,dayPeriod:`\u{635}/\u{645}`,endDate:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}`,era:`\u{627}\u{644}\u{639}\u{635}\u{631}`,hour:`\u{627}\u{644}\u{633}\u{627}\u{639}\u{627}\u{62A}`,minute:`\u{627}\u{644}\u{62F}\u{642}\u{627}\u{626}\u{642}`,month:`\u{627}\u{644}\u{634}\u{647}\u{631}`,second:`\u{627}\u{644}\u{62B}\u{648}\u{627}\u{646}\u{64A}`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621}`,timeZoneName:`\u{627}\u{644}\u{62A}\u{648}\u{642}\u{64A}\u{62A}`,weekday:`\u{627}\u{644}\u{64A}\u{648}\u{645}`,year:`\u{627}\u{644}\u{633}\u{646}\u{629}`},"bg-BG":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,day:`\u{434}\u{435}\u{43D}`,dayPeriod:`\u{43F}\u{440}.\u{43E}\u{431}./\u{441}\u{43B}.\u{43E}\u{431}.`,endDate:`\u{41A}\u{440}\u{430}\u{439}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,era:`\u{435}\u{440}\u{430}`,hour:`\u{447}\u{430}\u{441}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,month:`\u{43C}\u{435}\u{441}\u{435}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,weekday:`\u{434}\u{435}\u{43D} \u{43E}\u{442} \u{441}\u{435}\u{434}\u{43C}\u{438}\u{446}\u{430}\u{442}\u{430}`,year:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`},"cs-CZ":{calendar:`Kalend\xe1\u{159}`,day:"den",dayPeriod:`\u{10D}\xe1st dne`,endDate:`Kone\u{10D}n\xe9 datum`,era:`letopo\u{10D}et`,hour:"hodina",minute:"minuta",month:`m\u{11B}s\xedc`,second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`Po\u{10D}\xe1te\u{10D}n\xed datum`,timeZoneName:`\u{10D}asov\xe9 p\xe1smo`,weekday:`den v t\xfddnu`,year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:`\xe6ra`,hour:"time",minute:"minut",month:`m\xe5ned`,second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:`\xe5r`},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:`Tagesh\xe4lfte`,endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BB}\u{3CC}\u{3B3}\u{3B9}\u{3BF}`,day:`\u{3B7}\u{3BC}\u{3AD}\u{3C1}\u{3B1}`,dayPeriod:`\u{3C0}.\u{3BC}./\u{3BC}.\u{3BC}.`,endDate:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}`,era:`\u{3C0}\u{3B5}\u{3C1}\u{3AF}\u{3BF}\u{3B4}\u{3BF}\u{3C2}`,hour:`\u{3CE}\u{3C1}\u{3B1}`,minute:`\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3CC}`,month:`\u{3BC}\u{3AE}\u{3BD}\u{3B1}\u{3C2}`,second:`\u{3B4}\u{3B5}\u{3C5}\u{3C4}\u{3B5}\u{3C1}\u{3CC}\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3BF}`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2}`,timeZoneName:`\u{3B6}\u{3CE}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}\u{3C2}`,weekday:`\u{3BA}\u{3B1}\u{3B8}\u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3B9}\u{3BD}\u{3AE}`,year:`\u{3AD}\u{3C4}\u{3BF}\u{3C2}`},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:`d\xeda`,dayPeriod:`a.\xa0m./p.\xa0m.`,endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:`d\xeda de la semana`,year:`a\xf1o`},"et-EE":{calendar:"Kalender",day:`p\xe4ev`,dayPeriod:`enne/p\xe4rast l\xf5unat`,endDate:`L\xf5ppkuup\xe4ev`,era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:`Alguskuup\xe4ev`,timeZoneName:`ajav\xf6\xf6nd`,weekday:`n\xe4dalap\xe4ev`,year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:`p\xe4iv\xe4`,dayPeriod:"vuorokaudenaika",endDate:`P\xe4\xe4ttymisp\xe4iv\xe4`,era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamisp\xe4iv\xe4`,timeZoneName:`aikavy\xf6hyke`,weekday:`viikonp\xe4iv\xe4`,year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:`\xe8re`,hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de d\xe9but`,timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:`ann\xe9e`},"he-IL":{calendar:`\u{5DC}\u{5D5}\u{5D7} \u{5E9}\u{5E0}\u{5D4}`,day:`\u{5D9}\u{5D5}\u{5DD}`,dayPeriod:`\u{5DC}\u{5E4}\u{5E0}\u{5D4}\u{5F4}\u{5E6}/\u{5D0}\u{5D7}\u{5D4}\u{5F4}\u{5E6}`,endDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E1}\u{5D9}\u{5D5}\u{5DD}`,era:`\u{5EA}\u{5E7}\u{5D5}\u{5E4}\u{5D4}`,hour:`\u{5E9}\u{5E2}\u{5D4}`,minute:`\u{5D3}\u{5E7}\u{5D4}`,month:`\u{5D7}\u{5D5}\u{5D3}\u{5E9}`,second:`\u{5E9}\u{5E0}\u{5D9}\u{5D9}\u{5D4}`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4}`,timeZoneName:`\u{5D0}\u{5D6}\u{5D5}\u{5E8} \u{5D6}\u{5DE}\u{5DF}`,weekday:`\u{5D9}\u{5D5}\u{5DD} \u{5D1}\u{5E9}\u{5D1}\u{5D5}\u{5E2}`,year:`\u{5E9}\u{5E0}\u{5D4}`},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:`Datum zavr\u{161}etka`,era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum po\u{10D}etka`,timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:`Napt\xe1r`,day:"nap",dayPeriod:"napszak",endDate:`Befejez\u{151} d\xe1tum`,era:`\xe9ra`,hour:`\xf3ra`,minute:"perc",month:`h\xf3nap`,second:`m\xe1sodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:`Kezd\u{151} d\xe1tum`,timeZoneName:`id\u{151}z\xf3na`,weekday:`h\xe9t napja`,year:`\xe9v`},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:`\u{30AB}\u{30EC}\u{30F3}\u{30C0}\u{30FC}`,day:`\u{65E5}`,dayPeriod:`\u{5348}\u{524D}/\u{5348}\u{5F8C}`,endDate:`\u{7D42}\u{4E86}\u{65E5}`,era:`\u{6642}\u{4EE3}`,hour:`\u{6642}`,minute:`\u{5206}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`\u{958B}\u{59CB}\u{65E5}`,timeZoneName:`\u{30BF}\u{30A4}\u{30E0}\u{30BE}\u{30FC}\u{30F3}`,weekday:`\u{66DC}\u{65E5}`,year:`\u{5E74}`},"ko-KR":{calendar:`\u{B2EC}\u{B825}`,day:`\u{C77C}`,dayPeriod:`\u{C624}\u{C804}/\u{C624}\u{D6C4}`,endDate:`\u{C885}\u{B8CC}\u{C77C}`,era:`\u{C5F0}\u{D638}`,hour:`\u{C2DC}`,minute:`\u{BD84}`,month:`\u{C6D4}`,second:`\u{CD08}`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`\u{C2DC}\u{C791}\u{C77C}`,timeZoneName:`\u{C2DC}\u{AC04}\u{B300}`,weekday:`\u{C694}\u{C77C}`,year:`\u{B144}`},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:`iki piet\u{173} / po piet\u{173}`,endDate:"Pabaigos data",era:"era",hour:"valanda",minute:`minut\u{117}`,month:`m\u{117}nuo`,second:`sekund\u{117}`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Prad\u{17E}ios data`,timeZoneName:"laiko juosta",weekday:`savait\u{117}s diena`,year:"metai"},"lv-LV":{calendar:`Kalend\u{101}rs`,day:"diena",dayPeriod:`priek\u{161}pusdien\u{101}/p\u{113}cpusdien\u{101}`,endDate:"Beigu datums",era:`\u{113}ra`,hour:"stundas",minute:`min\u{16B}tes`,month:`m\u{113}nesis`,second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`S\u{101}kuma datums`,timeZoneName:"laika josla",weekday:`ned\u{113}\u{13C}as diena`,year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:`m\xe5ned`,second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:`\xe5r`},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:`dzie\u{144}`,dayPeriod:`rano / po po\u{142}udniu / wieczorem`,endDate:`Data ko\u{144}cowa`,era:"era",hour:"godzina",minute:"minuta",month:`miesi\u{105}c`,second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data pocz\u{105}tkowa`,timeZoneName:"strefa czasowa",weekday:`dzie\u{144} tygodnia`,year:"rok"},"pt-BR":{calendar:`Calend\xe1rio`,day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:`m\xeas`,second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:`fuso hor\xe1rio`,weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:`Calend\xe1rio`,day:"dia",dayPeriod:"am/pm",endDate:`Data de T\xe9rmino`,era:"era",hour:"hora",minute:"minuto",month:`m\xeas`,second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de In\xedcio`,timeZoneName:`fuso hor\xe1rio`,weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:`Dat\u{103} final`,era:`er\u{103}`,hour:`or\u{103}`,minute:"minut",month:`lun\u{103}`,second:`secund\u{103}`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`Dat\u{103} \xeenceput`,timeZoneName:"fus orar",weekday:`ziua din s\u{103}pt\u{103}m\xe2n\u{103}`,year:"an"},"ru-RU":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}\u{44C}`,day:`\u{434}\u{435}\u{43D}\u{44C}`,dayPeriod:"AM/PM",endDate:`\u{414}\u{430}\u{442}\u{430} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}`,era:`\u{44D}\u{440}\u{430}`,hour:`\u{447}\u{430}\u{441}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,month:`\u{43C}\u{435}\u{441}\u{44F}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{43E}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,weekday:`\u{434}\u{435}\u{43D}\u{44C} \u{43D}\u{435}\u{434}\u{435}\u{43B}\u{438}`,year:`\u{433}\u{43E}\u{434}`},"sk-SK":{calendar:`Kalend\xe1r`,day:`de\u{148}`,dayPeriod:"AM/PM",endDate:`D\xe1tum ukon\u{10D}enia`,era:`letopo\u{10D}et`,hour:"hodina",minute:`min\xfata`,month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`D\xe1tum za\u{10D}atia`,timeZoneName:`\u{10D}asov\xe9 p\xe1smo`,weekday:`de\u{148} t\xfd\u{17E}d\u{148}a`,year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum za\u{10D}etka`,timeZoneName:`\u{10D}asovni pas`,weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:`\u{434}\u{430}\u{43D}`,dayPeriod:`\u{43F}\u{440}\u{435} \u{43F}\u{43E}\u{434}\u{43D}\u{435}/\u{43F}\u{43E} \u{43F}\u{43E}\u{434}\u{43D}\u{435}`,endDate:`Datum zavr\u{161}etka`,era:`\u{435}\u{440}\u{430}`,hour:`\u{441}\u{430}\u{442}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}`,month:`\u{43C}\u{435}\u{441}\u{435}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum po\u{10D}etka`,timeZoneName:`\u{432}\u{440}\u{435}\u{43C}\u{435}\u{43D}\u{441}\u{43A}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,weekday:`\u{434}\u{430}\u{43D} \u{443} \u{43D}\u{435}\u{434}\u{435}\u{459}\u{438}`,year:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:`m\xe5nad`,second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:`\xe5r`},"tr-TR":{calendar:"Takvim",day:`g\xfcn`,dayPeriod:`\xd6\xd6/\xd6S`,endDate:`Biti\u{15F} Tarihi`,era:`\xe7a\u{11F}`,hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`Ba\u{15F}lang\u{131}\xe7 Tarihi`,timeZoneName:"saat dilimi",weekday:`haftan\u{131}n g\xfcn\xfc`,year:`y\u{131}l`},"uk-UA":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,day:`\u{434}\u{435}\u{43D}\u{44C}`,dayPeriod:`\u{434}\u{43F}/\u{43F}\u{43F}`,endDate:`\u{414}\u{430}\u{442}\u{430} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}`,era:`\u{435}\u{440}\u{430}`,hour:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`,minute:`\u{445}\u{432}\u{438}\u{43B}\u{438}\u{43D}\u{430}`,month:`\u{43C}\u{456}\u{441}\u{44F}\u{446}\u{44C}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{438}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,weekday:`\u{434}\u{435}\u{43D}\u{44C} \u{442}\u{438}\u{436}\u{43D}\u{44F}`,year:`\u{440}\u{456}\u{43A}`},"zh-CN":{calendar:`\u{65E5}\u{5386}`,day:`\u{65E5}`,dayPeriod:`\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,endDate:`\u{7ED3}\u{675F}\u{65E5}\u{671F}`,era:`\u{7EAA}\u{5143}`,hour:`\u{5C0F}\u{65F6}`,minute:`\u{5206}\u{949F}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`\u{5F00}\u{59CB}\u{65E5}\u{671F}`,timeZoneName:`\u{65F6}\u{533A}`,weekday:`\u{5DE5}\u{4F5C}\u{65E5}`,year:`\u{5E74}`},"zh-TW":{calendar:`\u{65E5}\u{66C6}`,day:`\u{65E5}`,dayPeriod:`\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,endDate:`\u{7D50}\u{675F}\u{65E5}\u{671F}`,era:`\u{7EAA}\u{5143}`,hour:`\u{5C0F}\u{65F6}`,minute:`\u{5206}\u{949F}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`\u{958B}\u{59CB}\u{65E5}\u{671F}`,timeZoneName:`\u{65F6}\u{533A}`,weekday:`\u{5DE5}\u{4F5C}\u{65E5}`,year:`\u{5E74}`}};let ik=v.createContext(null),ix="react-aria-focus-scope-restore",iC=null;function iE(e){var t,n,i,r,a,o,s,l,c,u;let p,d,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:b}=e,A=(0,v.useRef)(null),w=(0,v.useRef)(null),$=(0,v.useRef)([]),{parentNode:k}=(0,v.useContext)(ik)||{},x=(0,v.useMemo)(()=>new iV({scopeRef:$}),[$]);ex(()=>{let e=k||iH.root;if(iH.getTreeNode(e.scopeRef)&&iC&&!iP(iC,e.scopeRef)){let t=iH.getTreeNode(iC);t&&(e=t)}e.addChild(x),iH.addNode(x)},[x,k]),ex(()=>{let e=iH.getTreeNode($);e&&(e.contain=!!g)},[g]),ex(()=>{var e;let t=null==(e=A.current)?void 0:e.nextSibling,n=[],i=e=>e.stopPropagation();for(;t&&t!==w.current;)n.push(t),t.addEventListener(ix,i),t=t.nextSibling;return $.current=n,()=>{for(let e of n)e.removeEventListener(ix,i)}},[h]),ex(()=>{if(n||i)return;let e=t.current,r=eX(e?e[0]:void 0),a=e=>{let n=tB(e);iB(n,t.current)?iC=t:iz(n)||(iC=null)};return r.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{r.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=$,n=y,i=g]),r=$,a=g,p=(0,v.useRef)(void 0),d=(0,v.useRef)(void 0),ex(()=>{let e=r.current;if(!a){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let t=eX(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!iS(r)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),i=r.current;if(!i||!iB(n,i))return;let a=iN(iD(i),{tabbable:!0},i);if(!n)return;a.currentNode=n;let o=e.shiftKey?a.previousNode():a.nextNode();o||(a.currentNode=e.shiftKey?i[i.length-1].nextElementSibling:i[0].previousElementSibling,o=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),o&&iT(o,!0)},i=e=>{(!iC||iP(iC,r))&&iB(tB(e),r.current)?(iC=r,p.current=tB(e)):iS(r)&&!iz(tB(e),r)?p.current?p.current.focus():iC&&iC.current&&iO(iC.current):iS(r)&&(p.current=tB(e))},o=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let n=tq,i=("virtual"===n||null===n)&&tf()&&td(),a=((e=document)=>e.activeElement)(t);if(!i&&a&&iS(r)&&!iz(a,r)){iC=r;let t=tB(e);if(t&&t.isConnected){var o;p.current=t,null==(o=p.current)||o.focus()}else iC.current&&iO(iC.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",o,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",o,!1))}},[r,a]),ex(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),o=$,s=y,l=g,f=(0,v.useRef)("undefined"!=typeof document?((e=document)=>e.activeElement)(eX(o.current?o.current[0]:void 0)):null),ex(()=>{let e=o.current,t=eX(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!iC||iP(iC,o))&&iB(((e=document)=>e.activeElement)(t),o.current)&&(iC=o)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[o,l]),ex(()=>{let e=eX(o.current?o.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!iS(o)||t.isComposing)return;let n=e.activeElement;if(!iz(n,o)||!iF(o))return;let i=iH.getTreeNode(o);if(!i)return;let r=i.nodeToRestore,a=iN(e.body,{tabbable:!0});a.currentNode=n;let s=t.shiftKey?a.previousNode():a.nextNode();if(r&&r.isConnected&&r!==e.body||(r=void 0,i.nodeToRestore=void 0),(!s||!iz(s,o))&&r){a.currentNode=r;do s=t.shiftKey?a.previousNode():a.nextNode();while(iz(s,o));(t.preventDefault(),t.stopPropagation(),s)?iT(s,!0):iz(r)?iT(r,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[o,s,l]),ex(()=>{var e;let t=eX(o.current?o.current[0]:void 0);if(!s)return;let n=iH.getTreeNode(o);if(n)return n.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=iH.getTreeNode(o);if(!e)return;let n=e.nodeToRestore,i=((e=document)=>e.activeElement)(t);if(s&&n&&(i&&iz(i,o)||i===t.body&&iF(o))){let e=iH.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(o);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void iI(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(o);t;){if(t.scopeRef&&t.scopeRef.current&&iH.getTreeNode(t.scopeRef))return void iI(iM(t.scopeRef.current,!0));t=t.parent}}})}}},[o,s]),c=$,u=b,m=v.useRef(u),(0,v.useEffect)(()=>{m.current&&(iC=c,!iB(((e=document)=>e.activeElement)(eX(c.current?c.current[0]:void 0)),iC.current)&&c.current&&iO(c.current)),m.current=!1},[c]),(0,v.useEffect)(()=>{let e=((e=document)=>e.activeElement)(eX($.current?$.current[0]:void 0)),t=null;if(iB(e,$.current)){for(let n of iH.traverse())n.scopeRef&&iB(e,n.scopeRef.current)&&(t=n);t===iH.getTreeNode($)&&(iC=t.scopeRef)}},[$]),ex(()=>()=>{var e,t,n;let i=null!=(n=null==(t=iH.getTreeNode($))||null==(e=t.parent)?void 0:e.scopeRef)?n:null;($===iC||iP($,iC))&&(!i||iH.getTreeNode(i))&&(iC=i),iH.removeTreeNode($)},[$]);let C=(0,v.useMemo)(()=>{var e;return e=$,{focusNext(t={}){var n;let i=e.current,{from:r,tabbable:a,wrap:o,accept:s}=t,l=r||((e=document)=>e.activeElement)(eX(null!=(n=i[0])?n:void 0)),c=i[0].previousElementSibling,u=iN(iD(i),{tabbable:a,accept:s},i);u.currentNode=iB(l,i)?l:c;let p=u.nextNode();return!p&&o&&(u.currentNode=c,p=u.nextNode()),p&&iT(p,!0),p},focusPrevious(t={}){var n;let i=e.current,{from:r,tabbable:a,wrap:o,accept:s}=t,l=r||((e=document)=>e.activeElement)(eX(null!=(n=i[0])?n:void 0)),c=i[i.length-1].nextElementSibling,u=iN(iD(i),{tabbable:a,accept:s},i);u.currentNode=iB(l,i)?l:c;let p=u.previousNode();return!p&&o&&(u.currentNode=c,p=u.previousNode()),p&&iT(p,!0),p},focusFirst(t={}){let n=e.current,{tabbable:i,accept:r}=t,a=iN(iD(n),{tabbable:i,accept:r},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&iT(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:i,accept:r}=t,a=iN(iD(n),{tabbable:i,accept:r},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&iT(o,!0),o}}},[]),E=(0,v.useMemo)(()=>({focusManager:C,parentNode:x}),[x,C]);return v.createElement(ik.Provider,{value:E},v.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:A}),h,v.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function iD(e){return e[0].parentElement}function iS(e){let t=iH.getTreeNode(iC);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function iB(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function iz(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of iH.traverse(iH.getTreeNode(t)))if(n&&iB(e,n.current))return!0;return!1}function iP(e,t){var n;let i=null==(n=iH.getTreeNode(t))?void 0:n.parent;for(;i;){if(i.scopeRef===e)return!0;i=i.parent}return!1}function iT(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{t8(e)}catch{}}function iM(e,t=!0){let n=e[0].previousElementSibling,i=iD(e),r=iN(i,{tabbable:t},e);r.currentNode=n;let a=r.nextNode();return t&&!a&&((r=iN(i=iD(e),{tabbable:!1},e)).currentNode=n,a=r.nextNode()),a}function iO(e,t=!0){iT(iM(e,t))}function iF(e){let t=iH.getTreeNode(iC);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function iI(e){e.dispatchEvent(new CustomEvent(ix,{bubbles:!0,cancelable:!0}))&&iT(e)}function iN(e,t,n){var i,r,a;let o=(null==t?void 0:t.tabbable)?e6:e5,s=eX((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(i=e||s,r=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var i;return(null==t||null==(i=t.from)?void 0:i.contains(e))||(null==t?void 0:t.tabbable)&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=[];if(e.form){var n,i;let r=null==(i=e.form)||null==(n=i.elements)?void 0:n.namedItem(e.name);t=[...null!=r?r:[]]}else t=[...eX(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(e=>!e.form);return!!t&&!t.some(e=>e.checked)}(e)||"INPUT"===l.currentNode.tagName&&"radio"===l.currentNode.type&&l.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:o(e)&&(!n||iB(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(i,r,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function ij(e,t={}){return{focusNext(n={}){let i=e.current;if(!i)return null;let{from:r,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=r||((e=document)=>e.activeElement)(eX(i)),c=iN(i,{tabbable:a,accept:s});i.contains(l)&&(c.currentNode=l);let u=c.nextNode();return!u&&o&&(c.currentNode=i,u=c.nextNode()),u&&iT(u,!0),u},focusPrevious(n=t){let i=e.current;if(!i)return null;let{from:r,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=r||((e=document)=>e.activeElement)(eX(i)),c=iN(i,{tabbable:a,accept:s});if(i.contains(l))c.currentNode=l;else{let e=iR(c);return e&&iT(e,!0),null!=e?e:null}let u=c.previousNode();if(!u&&o){c.currentNode=i;let e=iR(c);if(!e)return null;u=e}return u&&iT(u,!0),null!=u?u:null},focusFirst(n=t){let i=e.current;if(!i)return null;let{tabbable:r=t.tabbable,accept:a=t.accept}=n,o=iN(i,{tabbable:r,accept:a}).nextNode();return o&&iT(o,!0),o},focusLast(n=t){let i=e.current;if(!i)return null;let{tabbable:r=t.tabbable,accept:a=t.accept}=n,o=iR(iN(i,{tabbable:r,accept:a}));return o&&iT(o,!0),null!=o?o:null}}}function iR(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class iL{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let i=this.fastMap.get(null!=t?t:null);if(!i)return;let r=new iV({scopeRef:e});i.addChild(r),r.parent=i,this.fastMap.set(e,r),n&&(r.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&iB(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let i=t.children;n&&(n.removeChild(t),i.size>0&&i.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let n=new iL;for(let i of this.traverse())n.addTreeNode(i.scopeRef,null!=(t=null==(e=i.parent)?void 0:e.scopeRef)?t:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new iV({scopeRef:null}),this.fastMap.set(null,this.root)}}class iV{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let iH=new iL;function iG(e,t,n){let{direction:i}=eA(),r=(0,v.useMemo)(()=>ij(t),[t]),a=()=>{var e;if(!t.current)return;let n=null==(e=window.event)?void 0:e.target,i=iN(t.current,{tabbable:!0});if(n&&(i.currentNode=n,n=i.previousNode()),!n){let e;do(e=i.lastChild())&&(n=e);while(e)}for(;null==n?void 0:n.hasAttribute("data-placeholder");){let e=i.previousNode();if(e&&e.hasAttribute("data-placeholder"))n=e;else break}n&&n.focus()},{pressProps:o}=tj({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&a()}});return eT(o,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!n))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===i){if(t.current){let e=a.target,n=iU(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else r.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===i){if(t.current){let e=a.target,n=iU(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else r.focusNext()}}})}function iU(e,t,n){let i=iN(e,{tabbable:!0}),r=i.nextNode(),a=null,o=1/0;for(;r;){let e=r.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<o&&(a=r,o=s),r=i.nextNode()}return a}function iq(e,t,n){let i=eE(()=>{n&&n(t)});(0,v.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",i),()=>{null==n||n.removeEventListener("reset",i)}},[e,i])}function iW(e){let{description:t,errorMessage:n,isInvalid:i,validationState:r}=e,{labelProps:a,fieldProps:o}=function(e){let{id:t,label:n,"aria-labelledby":i,"aria-label":r,labelElementType:a="label"}=e;t=eB(t);let o=eB(),s={};return n&&(i=i?`${o} ${i}`:o,s={id:o,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:nV({id:t,"aria-label":r,"aria-labelledby":i})}}(e),s=ez([!!t,!!n,i,r]),l=ez([!!t,!!n,i,r]);return{labelProps:a,fieldProps:o=eT(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function iK(e,t,n){let{validationBehavior:i,focus:r}=e;ex(()=>{if("native"===i&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let i,r=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(r),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(i=e.validity).badInput,customError:i.customError,patternMismatch:i.patternMismatch,rangeOverflow:i.rangeOverflow,rangeUnderflow:i.rangeUnderflow,stepMismatch:i.stepMismatch,tooLong:i.tooLong,tooShort:i.tooShort,typeMismatch:i.typeMismatch,valueMissing:i.valueMissing,valid:i.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=(0,v.useRef)(!1),o=eE(()=>{a.current||t.resetValidation()}),s=eE(e=>{var i,a;t.displayValidation.isInvalid||t.commitValidation();let o=null==n||null==(i=n.current)?void 0:i.form;!e.defaultPrevented&&n&&o&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(o)===n.current&&(r?r():null==(a=n.current)||a.focus(),tq="keyboard",tX("keyboard",null)),e.preventDefault()}),l=eE(()=>{t.commitValidation()});(0,v.useEffect)(()=>{let e=null==n?void 0:n.current;if(!e)return;let t=e.form,i=null==t?void 0:t.reset;return t&&(t.reset=()=>{a.current=!window.event||"message"===window.event.type&&window.event.target instanceof MessagePort,null==i||i.call(t),a.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),null==t||t.addEventListener("reset",o),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),null==t||t.removeEventListener("reset",o),t&&(t.reset=i)}},[n,s,l,o,i])}let iY=new WeakMap,iJ="__role_"+Date.now(),iZ="__focusManager_"+Date.now();function iX(e,t,n){var i,r;let a,{isInvalid:o,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:u,descriptionProps:p,errorMessageProps:d}=iW({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||s}),f=(0,v.useRef)(null),{focusWithinProps:m}=ni({...e,onFocusWithin(n){var i;f.current=t.value,null==(i=e.onFocus)||i.call(e,n)},onBlurWithin:n=>{var i;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(i=e.onBlur)||i.call(e,n)},onFocusWithinChange:e.onFocusChange}),h=nC((r=i$)&&r.__esModule?r.default:r,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",b=nJ(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),A="presentation"===e[iJ]?u["aria-describedby"]:[b["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[iZ],$=(0,v.useMemo)(()=>w||ij(n),[w,n]),k=iG(t,n,"presentation"===e[iJ]);iY.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:A,focusManager:$});let x=(0,v.useRef)(e.autoFocus);a="presentation"===e[iJ]?{role:"presentation"}:eT(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":A}),(0,v.useEffect)(()=>{x.current&&$.focusFirst(),x.current=!1},[$]),iq(e.inputRef,t.defaultValue,t.setValue),iK({...e,focus(){$.focusFirst()}},t,e.inputRef);let C={type:"hidden",name:e.name,form:e.form,value:(null==(i=t.value)?void 0:i.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(C.type="text",C.hidden=!0,C.required=e.isRequired,C.onChange=()=>{});let E=eZ(e);return{labelProps:{...c,onClick:()=>{$.focusFirst()}},fieldProps:eT(E,a,k,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:C,descriptionProps:p,errorMessageProps:d,isInvalid:o,validationErrors:s,validationDetails:l}}var iQ={};iQ={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621} \u{64A}\u{62C}\u{628} \u{623}\u{646} \u{64A}\u{643}\u{648}\u{646} \u{642}\u{628}\u{644} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`\u{627}\u{644}\u{628}\u{64A}\u{627}\u{646}\u{627}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}\u{629} \u{63A}\u{64A}\u{631} \u{645}\u{62A}\u{627}\u{62D}\u{629}.`},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} \u{43F}\u{440}\u{435}\u{434}\u{438} \u{43A}\u{440}\u{430}\u{439}\u{43D}\u{430}\u{442}\u{430}.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435} \u{435} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430}.`},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zah\xe1jen\xed mus\xed p\u{159}edch\xe1zet datu ukon\u{10D}en\xed.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybran\xe9 datum nen\xed k dispozici.`},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal v\xe6re f\xf8r slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilg\xe6ngelig.`},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar.`},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`\u{397} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3C0}\u{3C1}\u{3B9}\u{3BD} \u{3B1}\u{3C0}\u{3CC} \u{3C4}\u{3B7}\u{3BD} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`\u{397} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3B4}\u{3B5}\u{3BD} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7}.`},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuup\xe4ev pole saadaval.`},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4.`},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date s\xe9lectionn\xe9e n\u{2019}est pas disponible.`},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} \u{5DC}\u{5E4}\u{5E0}\u{5D9} \u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E1}\u{5D9}\u{5D5}\u{5DD}.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`\u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E0}\u{5D1}\u{5D7}\u{5E8} \u{5D0}\u{5D9}\u{5E0}\u{5D5} \u{5D6}\u{5DE}\u{5D9}\u{5DF}.`},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum po\u{10D}etka mora biti prije datuma zavr\u{161}etka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezd\u{151} d\xe1tumnak a befejez\u{151} d\xe1tumn\xe1l kor\xe1bbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiv\xe1lasztott d\xe1tum nem \xe9rhet\u{151} el.`},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:`\u{958B}\u{59CB}\u{65E5}\u{306F}\u{7D42}\u{4E86}\u{65E5}\u{3088}\u{308A}\u{524D}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8}\u{306F}\u{4F7F}\u{7528}\u{3067}\u{304D}\u{307E}\u{305B}\u{3093}\u{3002}`},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`\u{C2DC}\u{C791}\u{C77C}\u{C740} \u{C885}\u{B8CC}\u{C77C} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`\u{C120}\u{D0DD}\u{D55C} \u{B0A0}\u{C9DC}\u{B97C} \u{C0AC}\u{C6A9}\u{D560} \u{C218} \u{C5C6}\u{C2B5}\u{B2C8}\u{B2E4}.`},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Prad\u{17E}ios data turi b\u{16B}ti ankstesn\u{117} nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`S\u{101}kuma datumam ir j\u{101}b\u{16B}t pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`Atlas\u{12B}tais datums nav pieejams.`},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpocz\u{119}cia musi by\u{107} wcze\u{15B}niejsza ni\u{17C} data zako\u{144}czenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedost\u{119}pna.`},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior \xe0 data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indispon\xedvel.`},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de in\xedcio deve ser anterior \xe0 data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indispon\xedvel.`},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de \xeenceput trebuie s\u{103} fie anterioar\u{103} datei de sf\xe2r\u{219}it.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectat\u{103} nu este disponibil\u{103}.`},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{430} \u{43F}\u{440}\u{435}\u{434}\u{448}\u{435}\u{441}\u{442}\u{432}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{434}\u{430}\u{442}\u{435} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`D\xe1tum za\u{10D}iatku mus\xed by\u{165} skor\u{161}\xed ako d\xe1tum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybrat\xfd d\xe1tum je nedostupn\xfd.`},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`Za\u{10D}etni datum mora biti pred kon\u{10D}nim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum po\u{10D}etka mora biti pre datuma zavr\u{161}etka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet m\xe5ste vara f\xf6re slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet \xe4r inte tillg\xe4ngligt.`},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`Ba\u{15F}lang\u{131}\xe7 tarihi biti\u{15F} tarihinden \xf6nce olmal\u{131}d\u{131}r.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Se\xe7ilen tarih kullan\u{131}lam\u{131}yor.`},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443} \u{43C}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{434}\u{443}\u{432}\u{430}\u{442}\u{438} \u{434}\u{430}\u{442}\u{456} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`\u{5F00}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{987B}\u{65E9}\u{4E8E}\u{7ED3}\u{675F}\u{65E5}\u{671F}\u{3002}`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`\u{6240}\u{9009}\u{65E5}\u{671F}\u{4E0D}\u{53EF}\u{7528}\u{3002}`},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:`\u{958B}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{9808}\u{5728}\u{7D50}\u{675F}\u{65E5}\u{671F}\u{4E4B}\u{524D}\u{3002}`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`\u{6240}\u{9078}\u{65E5}\u{671F}\u{7121}\u{6CD5}\u{4F7F}\u{7528}\u{3002}`}};var i0=n(27532);let i1={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},i2={...i1,customError:!0,valid:!1},i3={isInvalid:!1,validationDetails:i1,validationErrors:[]},i4=(0,v.createContext)({}),i5="__formValidationState"+Date.now();function i6(e){if(e[i5]){let{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:a}=e[i5];return{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:a}}return function(e){let{isInvalid:t,validationState:n,name:i,value:r,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:i2}:null,c=(0,v.useMemo)(()=>o&&null!=r?i8(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return i7(n)}return[]}(o,r)):null,[o,r]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let u=(0,v.useContext)(i4),p=(0,v.useMemo)(()=>i?Array.isArray(i)?i.flatMap(e=>i7(u[e])):i7(u[i]):[],[u,i]),[d,f]=(0,v.useState)(u),[m,h]=(0,v.useState)(!1);u!==d&&(f(u),h(!1));let g=(0,v.useMemo)(()=>i8(m?[]:p),[m,p]),y=(0,v.useRef)(i3),[b,A]=(0,v.useState)(i3),w=(0,v.useRef)(i3),[$,k]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!$)return;k(!1);let e=c||a||y.current;i9(e,w.current)||(w.current=e,A(e))}),{realtimeValidation:l||g||c||a||i3,displayValidation:"native"===s?l||g||b:l||g||c||a||b,updateValidation(e){"aria"!==s||i9(b,e)?y.current=e:A(e)},resetValidation(){i9(i3,w.current)||(w.current=i3,A(i3)),"native"===s&&k(!1),h(!0)},commitValidation(){"native"===s&&k(!0),h(!0)}}}(e)}function i7(e){return e?Array.isArray(e)?e:[e]:[]}function i8(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:i2}:null}function i9(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function re(...e){let t=new Set,n=!1,i={...i1};for(let r of e){for(let e of r.validationErrors)t.add(e);for(let e in n||(n=r.isInvalid),i)i[e]||(i[e]=r.validationDetails[e])}return i.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:i}}let rt=new nv((u=iQ)&&u.__esModule?u.default:u);function rn(){let e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function ri(e,t,n,i,r){let a=null!=e&&null!=n&&e.compare(n)>0,o=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==i?void 0:i(e))||!1,l=a||o||s,c=[];if(l){let e=rn(),i=new n$(e,nv.getGlobalDictionaryForPackage("@react-stately/datepicker")||rt),l=new nD(e,ro({},r)),u=l.resolvedOptions().timeZone;o&&null!=t&&c.push(i.format("rangeUnderflow",{minValue:l.format(t.toDate(u))})),a&&null!=n&&c.push(i.format("rangeOverflow",{maxValue:l.format(n.toDate(u))})),s&&c.push(i.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let rr={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},ra={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ro(e,t){var n;e={...t.shouldForceLeadingZeros?ra:rr,...e};let i=t.granularity||"minute",r=Object.keys(e),a=r.indexOf(null!=(n=t.maxGranularity)?n:"year");a<0&&(a=0);let o=r.indexOf(i);if(o<0&&(o=2),a>o)throw Error("maxGranularity must be greater than granularity");let s=r.slice(a,o+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===i||"minute"===i||"second"===i)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function rs(e){return e&&"hour"in e?e:new(0,i0.gX)}function rl(e,t){return null===e?null:e?(0,Z.yP)(e,t):void 0}function rc(e,t,n,i){if(e)return rl(e,n);let r=(0,Z.yP)((0,X.tB)(null!=i?i:(0,X.Xj)()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?(0,Z.gw)(r):i?r:(0,Z.tR)(r)}function ru(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,i=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[r,a]=(0,v.useState)([i,n]);return e&&(r[0]!==i||r[1]!==n)&&a([i,n]),t||(t=e?i:r[0]),[t,e?n:r[1]]}let rp=new nv({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),rd={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},rf={year:5,month:2,day:7,hour:2,minute:15,second:15},rm={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function rh(e){var t,n,i;let{locale:r,createCalendar:a,hideTimeZone:o,isDisabled:s=!1,isReadOnly:l=!1,isRequired:c=!1,minValue:u,maxValue:p,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[m,h]=ru(f,e.granularity),g=h||"UTC";if(f&&!(m in f))throw Error("Invalid granularity "+m+" for value "+f.toString());let y=(0,v.useMemo)(()=>new nD(r),[r]),b=(0,v.useMemo)(()=>a(y.resolvedOptions().calendar),[a,y]),[A,w]=n9(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),[$]=(0,v.useState)(A),k=(0,v.useMemo)(()=>{var e;return null!=(e=rl(A,b))?e:null},[A,b]),[x,C]=(0,v.useState)(()=>rc(e.placeholderValue,m,b,h)),E="gregory"===b.identifier&&"BC"===(k||x).era,D=(0,v.useMemo)(()=>{var t;return{granularity:m,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:o,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,m,e.hourCycle,e.shouldForceLeadingZeros,h,o,E]),S=(0,v.useMemo)(()=>ro({},D),[D]),B=(0,v.useMemo)(()=>new nD(r,S),[r,S]),z=(0,v.useMemo)(()=>B.resolvedOptions(),[B]),P=(0,v.useMemo)(()=>B.formatToParts(new Date).filter(e=>rd[e.type]).reduce((e,t)=>(e[rm[t.type]||t.type]=!0,e),{}),[B]),[T,M]=(0,v.useState)(()=>e.value||e.defaultValue?{...P}:{}),O=(0,v.useRef)(null),F=(0,v.useRef)(b);(0,v.useEffect)(()=>{(0,X.Jg)(b,F.current)||(F.current=b,C(t=>Object.keys(T).length>0?(0,Z.yP)(t,b):rc(e.placeholderValue,m,b,h)))},[b,m,T,h,e.placeholderValue]),A&&Object.keys(T).length<Object.keys(P).length&&M(T={...P}),null==A&&Object.keys(T).length===Object.keys(P).length&&(M(T={}),C(rc(e.placeholderValue,m,b,h)));let I=k&&Object.keys(T).length>=Object.keys(P).length?k:x,N=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(T),i=Object.keys(P);null==t?(w(null),C(rc(e.placeholderValue,m,b,h)),M({})):0===n.length&&null==O.current||n.length>=i.length||n.length===i.length-1&&P.dayPeriod&&!T.dayPeriod&&"dayPeriod"!==O.current?(0===n.length&&M(T={...P}),w(t=(0,Z.yP)(t,(null==f?void 0:f.calendar)||new(0,n8.FG)))):C(t),O.current=null},j=(0,v.useMemo)(()=>I.toDate(g),[I,g]),R=(0,v.useMemo)(()=>(function(e,t,n,i,r,a,o,s){let l=["hour","minute","second"],c=n.formatToParts(e),u=[];for(let e of c){var p;let n=rm[e.type]||e.type,c=rd[n];"era"===n&&1===a.getEras().length&&(c=!1);let d=rd[n]&&!t[n],f=rd[n]?(p=e.value,"era"===n||"dayPeriod"===n?p:"year"===n||"month"===n||"day"===n?rp.getStringForLocale(n,o):"––"):null,m={type:n,text:d?f:e.value,...r_(r,n,i),isPlaceholder:d,placeholder:f,isEditable:c};"hour"===n?(u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1}),u.push(m),n===s&&u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(n)&&n===s?(u.push(m),u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1})):u.push(m)}return u})(j,T,B,z,I,b,r,m),[j,T,B,z,I,b,r,m]);P.era&&T.year&&!T.era?(T.era=!0,M({...T})):!P.era&&T.era&&(delete T.era,M({...T}));let L=e=>{T[e]=!0,"year"===e&&P.era&&(T.era=!0),M({...T})},V=(e,t)=>{if(T[e])N(function(e,t,n,i){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:"hour"!==t,hourCycle:i.hour12?12:24})}throw Error("Unknown segment: "+t)}(I,e,t,z));else{L(e);let t=Object.keys(T),n=Object.keys(P);(t.length>=n.length||t.length===n.length-1&&P.dayPeriod&&!T.dayPeriod)&&N(I)}},H=(0,v.useMemo)(()=>ri(A,u,p,d,D),[A,u,p,d,D]),G=i6({...e,value:A,builtinValidation:H}),U=G.displayValidation.isInvalid,q=e.validationState||(U?"invalid":null);return{...G,value:k,defaultValue:null!=(n=e.defaultValue)?n:$,dateValue:j,calendar:b,setValue:N,segments:R,dateFormatter:B,validationState:q,isInvalid:U,granularity:m,maxGranularity:null!=(i=e.maxGranularity)?i:"year",isDisabled:s,isReadOnly:l,isRequired:c,increment(e){V(e,1)},decrement(e){V(e,-1)},incrementPage(e){V(e,rf[e]||1)},decrementPage(e){V(e,-(rf[e]||1))},setSegment(e,t){L(e),N(function(e,t,n,i){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e&&"number"==typeof n)switch(t){case"dayPeriod":{let t=e.hour,i=t>=12;if(n>=12===i)return e;return e.set({hour:i?t-12:t+12})}case"hour":if(i.hour12){let t=e.hour>=12;t||12!==n||(n=0),t&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}throw Error("Unknown segment: "+t)}(I,e,t,z))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(T),n=Object.keys(P);t.length===n.length-1&&P.dayPeriod&&!T.dayPeriod&&(M(T={...P}),N(I.copy()))},clearSegment(t){delete T[t],O.current=t,M({...T});let n=rc(e.placeholderValue,m,b,h),i=I;if("dayPeriod"===t&&"hour"in I&&"hour"in n){let e=I.hour>=12,t=n.hour>=12;e&&!t?i=I.set({hour:I.hour-12}):!e&&t&&(i=I.set({hour:I.hour+12}))}else"hour"===t&&"hour"in I&&I.hour>=12&&T.dayPeriod?i=I.set({hour:n.hour+12}):t in I&&(i=I.set({[t]:n[t]}));w(null),N(i)},formatValue:e=>k?new nD(r,ro(e,D)).format(j):"",getDateFormatter:(e,t)=>new nD(e,ro({},{...D,...t}))}}function r_(e,t,n){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:(0,X.xz)(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:(0,X.oT)(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(n.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let rg=(0,v.createContext)(null),ry=(0,v.createContext)(null),rb=(0,v.createContext)(null),rv=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(ry),i=(0,v.useContext)(rb);return n||i?v.createElement(rw,{...e,ref:t}):v.createElement(rA,{...e,ref:t})}),rA=(0,v.forwardRef)((e,t)=>{let[n,i]=eN({slot:e.slot},t,rg),{locale:r}=eA(),a=rh({...n,locale:r,createCalendar:J.d}),o=(0,v.useRef)(null),{fieldProps:s,inputProps:l}=iX({...n,inputRef:o},a,i);return v.createElement(eO,{values:[[ry,a],[iA,{...l,ref:o}],[ib,{...s,ref:i,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},v.createElement(rw,e))}),rw=(0,v.forwardRef)((e,t)=>{let{className:n,children:i}=e,r=(0,v.useContext)(ry),a=(0,v.useContext)(rb),o=null!=r?r:a;return v.createElement(v.Fragment,null,v.createElement(iv,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:o.isInvalid,isDisabled:o.isDisabled},o.segments.map((e,t)=>(0,v.cloneElement)(i(e),{key:t}))),v.createElement(iw,null))}),r$=(0,v.createContext)({});function rk({children:e}){let t=(0,v.useMemo)(()=>({register:()=>{}}),[]);return v.createElement(t$.Provider,{value:t},e)}v.forwardRef(({children:e,...t},n)=>{let i=(0,v.useRef)(!1),r=(0,v.useContext)(t$);n=ew(n||(null==r?void 0:r.ref));let a=eT(r||{},{...t,ref:n,register(){i.current=!0,r&&r.register()}});return tE(r,n),(0,v.useEffect)(()=>{i.current||(i.current=!0)},[]),v.createElement(t$.Provider,{value:a},e)});let rx=v.createContext(null);function rC(e){var t;let n=eu(),{portalContainer:i=n?null:document.body,isExiting:r}=e,[a,o]=(0,v.useState)(!1),s=(0,v.useMemo)(()=>({contain:a,setContain:o}),[a,o]),{getContainer:l}=null!=(t=(0,v.useContext)(r$))?t:{};if(!e.portalContainer&&l&&(i=l()),!i)return null;let c=e.children;return e.disableFocusManagement||(c=v.createElement(iE,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},c)),c=v.createElement(rx.Provider,{value:s},v.createElement(rk,null,c)),tT.createPortal(c,i)}let rE=(0,v.createContext)(null),rD=(0,v.createContext)(null),rS=(0,v.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=eN(e,t,rE);let{dialogProps:i,titleProps:r}=function(e,t){let n,i,{role:r="dialog"}=e,a=ez();a=e["aria-label"]?void 0:a;let o=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){t8(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(o.current=!0,t.current&&(t.current.blur(),t8(t.current)),o.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),ex(()=>{null==i||i(!0)},[i=null==(n=(0,v.useContext)(rx))?void 0:n.setContain]),{dialogProps:{...eZ(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{o.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":n},t),a=(0,v.useContext)(rD);i["aria-label"]||i["aria-labelledby"]||e["aria-labelledby"]&&(i["aria-labelledby"]=e["aria-labelledby"]);let o=eF({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}}),s=eZ(e,{global:!0});return v.createElement("section",{...eT(s,o,i),ref:t,slot:e.slot||void 0},v.createElement(eO,{values:[[nm,{slots:{[eM]:{},title:{...r,level:2}}}],[nd,{slots:{[eM]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},o.children))}),rB=(0,v.createContext)(null),rz=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(rB);return(null==n?void 0:n.isInvalid)?v.createElement(rP,{...e,ref:t}):null}),rP=(0,v.forwardRef)((e,t)=>{let n=(0,v.useContext)(rB),i=eZ(e,{global:!0}),r=eF({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==r.children?null:v.createElement(n_,{slot:"errorMessage",...i,...r,ref:t})}),rT=(0,v.createContext)(null);var rM=n(68569);let rO=["day","month","year"],rF={hour:1,minute:2,second:3};function rI(e){let{state:t}=e,{containerProps:n,inputProps:i}=function(e,t){let{autoComplete:n,isDisabled:i,name:r}=e,{visuallyHiddenProps:a}=nU({style:{position:"fixed",top:0,left:0}}),o=60;"second"===t.granularity?o=1:"hour"===t.granularity&&(o=3600);let s=null==t.value?"":t.value.toString(),l="day"===t.granularity?"date":"datetime-local",c=["hour","minute","second"],u=0;return c.includes(t.granularity)&&(u=rF[t.granularity],c=c.slice(0,u)),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{tabIndex:-1,autoComplete:n,disabled:i,type:l,form:"",name:r,step:o,value:s,onChange:e=>{let n=e.target.value.toString();if(n)try{let e=(0,rM.DP)(n);if("day"===t.granularity&&(e=(0,rM._U)(n)),"setSegment"in t)for(let n in e)rO.includes(n)&&t.setSegment(n,e[n]),c.includes(n)&&t.setSegment(n,e[n]);t.setValue(e)}catch{}}}}}({...e},t);return v.createElement("div",{...n,"data-testid":"hidden-dateinput-container"},v.createElement("input",i))}let rN=(0,v.createContext)({}),rj=np(function(e,t){[e,t]=eN(e,t,rN);let{elementType:n="label",...i}=e;return v.createElement(n,{className:"react-aria-Label",...i,ref:t})}),rR=(0,v.createContext)({placement:"bottom"}),rL="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,rV=new WeakMap,rH=[];function rG(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function rU(e,t){let n=e,i=0,r=t.toString(),a=r.toLowerCase().indexOf("e-");if(a>0)i=Math.abs(Math.floor(Math.log10(Math.abs(t))))+a;else{let e=r.indexOf(".");e>=0&&(i=r.length-e)}if(i>0){let e=Math.pow(10,i);n=Math.round(n*e)/e}return n}function rq(e,t,n,i){t=Number(t),n=Number(n);let r=(e-(isNaN(t)?0:t))%i,a=rU(2*Math.abs(r)>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r,i);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor(rU(n/i,i))*i):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor(rU((n-t)/i,i))*i),a=rU(a,i)}let rW={top:"top",bottom:"top",left:"left",right:"left"},rK={top:"bottom",bottom:"top",left:"right",right:"left"},rY={top:"left",left:"top"},rJ={top:"height",left:"width"},rZ={width:"totalWidth",height:"totalHeight"},rX={},rQ="undefined"!=typeof document?window.visualViewport:null;function r0(e){var t,n,i,r,a;let o=0,s=0,l=0,c=0,u=0,p=0,d={},f=(null!=(t=null==rQ?void 0:rQ.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,c=t.clientHeight,o=null!=(n=null==rQ?void 0:rQ.width)?n:l,s=null!=(i=null==rQ?void 0:rQ.height)?i:c,d.top=t.scrollTop||e.scrollTop,d.left=t.scrollLeft||e.scrollLeft,rQ&&(u=rQ.offsetTop,p=rQ.offsetLeft)}else({width:o,height:s,top:u,left:p}=r5(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=o,c=s;return tp()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,u=null!=(r=null==rQ?void 0:rQ.pageTop)?r:0,p=null!=(a=null==rQ?void 0:rQ.pageLeft)?a:0),{width:o,height:s,totalWidth:l,totalHeight:c,scroll:d,top:u,left:p}}function r1(e,t,n,i,r,a,o){var s;let l=null!=(s=r.scroll[e])?s:0,c=i[rJ[e]],u=i.scroll[rW[e]]+a,p=c+i.scroll[rW[e]]-a,d=t-l+o[e]-i[rW[e]],f=t-l+n+o[e]-i[rW[e]];return d<u?u-d:f>p?Math.max(p-f,u-d):0}function r2(e){if(rX[e])return rX[e];let[t,n]=e.split(" "),i=rW[t]||"right",r=rY[i];rW[n]||(n="center");let a=rJ[i],o=rJ[r];return rX[e]={placement:t,crossPlacement:n,axis:i,crossAxis:r,size:a,crossSize:o},rX[e]}function r3(e,t,n,i,r,a,o,s,l,c){var u,p,d,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:A}=i,w={};w[b]=null!=(u=e[b])?u:0,"center"===g?w[b]+=((null!=(p=e[A])?p:0)-(null!=(d=n[A])?d:0))/2:g!==b&&(w[b]+=(null!=(f=e[A])?f:0)-(null!=(m=n[A])?m:0)),w[b]+=a;let $=e[b]-n[A]+l+c,k=e[b]+e[A]-l-c;if(w[b]=rG(w[b],$,k),h===y){let n=s?o[v]:t[rZ[v]];w[rK[y]]=Math.floor(n-e[y]+r)}else w[y]=Math.floor(e[y]+e[v]+r);return w}function r4(e,t,n,i,r,a){var o,s,l;let{placement:c,axis:u,size:p}=a;return c===u?Math.max(0,n[u]-e[u]-(null!=(o=e.scroll[u])?o:0)+t[u]-(null!=(s=i[u])?s:0)-i[rK[u]]-r):Math.max(0,e[p]+e[u]+e.scroll[u]-t[u]-n[u]-n[p]-(null!=(l=i[u])?l:0)-i[rK[u]]-r)}function r5(e){let{top:t,left:n,width:i,height:r}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:o,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:n+o-l,width:i,height:r}}function r6(e,t){let n,i=window.getComputedStyle(e);if("fixed"===i.position){let{top:t,left:i,width:r,height:a}=e.getBoundingClientRect();n={top:t,left:i,width:r,height:a}}else{n=r5(e);let i=r5(t),r=window.getComputedStyle(t);i.top+=(parseInt(r.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(r.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=i.top,n.left-=i.left}return n.top-=parseInt(i.marginTop,10)||0,n.left-=parseInt(i.marginLeft,10)||0,n}function r7(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let r8=new WeakMap;function r9(e){let{ref:t,box:n,onResize:i}=e;(0,v.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[i,t,n])}let ae="undefined"!=typeof document?window.visualViewport:null;function at(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let an=[],ai="undefined"!=typeof document&&window.visualViewport,ar=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),aa=0;function ao(e,t,n){let i=e.style[t];return e.style[t]=n,()=>{e.style[t]=i}}function as(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function al(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=n0(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,i=n.getBoundingClientRect().top;i>t+n.clientHeight&&(e.scrollTop+=i-t)}n=e.parentElement}}var ac={};function au(e){var t;let{onDismiss:n,...i}=e,r=nV(i,nC((t=ac)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return v.createElement(nq,null,v.createElement("button",{...r,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function ap(e,t,n){ex(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let i=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{i||(0,tT.flushSync)(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[e,t,n])}function ad(e){let[t,n]=n9(e.isOpen,e.defaultOpen||!1,e.onOpenChange),i=(0,v.useCallback)(()=>{n(!0)},[n]),r=(0,v.useCallback)(()=>{n(!1)},[n]),a=(0,v.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:i,close:r,toggle:a}}ac={"ar-AE":{dismiss:`\u{62A}\u{62C}\u{627}\u{647}\u{644}`},"bg-BG":{dismiss:`\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:`Schlie\xdfen`},"el-GR":{dismiss:`\u{391}\u{3C0}\u{3CC}\u{3C1}\u{3C1}\u{3B9}\u{3C8}\u{3B7}`},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:`L\xf5peta`},"fi-FI":{dismiss:`Hylk\xe4\xe4`},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:`\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}`},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:`Elutas\xedt\xe1s`},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:`\u{9589}\u{3058}\u{308B}`},"ko-KR":{dismiss:`\u{BB34}\u{C2DC}`},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:`Ner\u{101}d\u{12B}t`},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:`\u{41F}\u{440}\u{43E}\u{43F}\u{443}\u{441}\u{442}\u{438}\u{442}\u{44C}`},"sk-SK":{dismiss:`Zru\u{161}i\u{165}`},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:`\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`},"zh-CN":{dismiss:`\u{53D6}\u{6D88}`},"zh-TW":{dismiss:`\u{95DC}\u{9589}`}};let af=(0,v.createContext)(null),am=(0,v.createContext)(null),ah=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,af);let n=(0,v.useContext)(rD),i=ad(e),r=null==e.isOpen&&null==e.defaultOpen&&n?n:i,a=function(e,t){let[n,i]=(0,v.useState)(t?"open":"closed");switch(n){case"open":t||i("exiting");break;case"closed":case"exiting":t&&i("open")}let r="exiting"===n;return ap(e,r,(0,v.useCallback)(()=>{i(e=>"exiting"===e?"closed":e)},[])),r}(t,r.isOpen)||e.isExiting||!1,o=(0,v.useContext)(nu),{direction:s}=eA();if(o){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),v.createElement(v.Fragment,null,t)}return!r||r.isOpen||a?v.createElement(a_,{...e,triggerRef:e.triggerRef,state:r,popoverRef:t,isExiting:a,dir:s}):null});function a_({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:i,...a}){var o,s;let l=(0,v.useRef)(null),c=(0,v.useRef)(null),u=(0,v.useContext)(am),p=u&&"SubmenuTrigger"===a.trigger,{popoverProps:d,underlayProps:f,arrowProps:m,placement:h,triggerAnchorPoint:g}=function(e,t){let{triggerRef:n,popoverRef:i,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l,...c}=e,u="SubmenuTrigger"===c.trigger,{overlayProps:p,underlayProps:d}=function(e,t){let{onClose:n,shouldCloseOnBlur:i,isOpen:r,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e;(0,v.useEffect)(()=>{if(r&&!an.includes(t))return an.push(t),()=>{let e=an.indexOf(t);e>=0&&an.splice(e,1)}},[r,t]);let l=()=>{an[an.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:i,onInteractOutsideStart:r}=e,a=(0,v.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=eE(e=>{n&&at(e,t)&&(r&&r(e),a.current.isPointerDown=!0)}),s=eE(e=>{n&&n(e)});(0,v.useEffect)(()=>{let e=a.current;if(i)return;let n=eX(t.current);if("undefined"!=typeof PointerEvent){let i=n=>{e.isPointerDown&&at(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",o,!0),n.addEventListener("click",i,!0),()=>{n.removeEventListener("pointerdown",o,!0),n.removeEventListener("click",i,!0)}}},[t,i,o,s])}({ref:t,onInteractOutside:a&&r?e=>{(!s||s(e.target))&&(an[an.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&an[an.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=ni({isDisabled:!i,onBlurWithin:e=>{!(!e.relatedTarget||iz(e.relatedTarget,iC))&&(!s||s(e.relatedTarget))&&(null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||o||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||u,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l},null!=a?a:i),{overlayProps:f,arrowProps:m,placement:h,triggerAnchorPoint:g}=function(e){var t,n,i,r;let{direction:a}=eA(),{arrowSize:o,targetRef:s,overlayRef:l,arrowRef:c,scrollRef:u=l,placement:p="bottom",containerPadding:d=12,shouldFlip:f=!0,boundaryElement:m="undefined"!=typeof document?document.body:null,offset:h=0,crossOffset:g=0,shouldUpdatePosition:y=!0,isOpen:b=!0,onClose:A,maxHeight:w,arrowBoundaryOffset:$=0}=e,[k,x]=(0,v.useState)(null),C=[y,p,l.current,s.current,null==c?void 0:c.current,u.current,d,f,m,h,g,b,a,w,$,o],E=(0,v.useRef)(null==ae?void 0:ae.scale);(0,v.useEffect)(()=>{b&&(E.current=null==ae?void 0:ae.scale)},[b]);let D=(0,v.useCallback)(()=>{var e,t,n,i,r,v,A,k,C,D;if(!1===y||!b||!l.current||!s.current||!m||(null==ae?void 0:ae.scale)!==E.current||l.current.querySelector("[data-react-aria-incomplete]")||(null==(e=(t=l.current).getAnimations)?void 0:e.call(t).length)>0)return;let S=null;if(u.current&&u.current.contains(document.activeElement)){let e=null==(i=document.activeElement)?void 0:i.getBoundingClientRect(),t=u.current.getBoundingClientRect();(S={type:"top",offset:(null!=(r=null==e?void 0:e.top)?r:0)-t.top}).offset>t.height/2&&(S.type="bottom",S.offset=(null!=(v=null==e?void 0:e.bottom)?v:0)-t.bottom)}let B=l.current;!w&&l.current&&(B.style.top="0px",B.style.bottom="",B.style.maxHeight=(null!=(k=null==(A=window.visualViewport)?void 0:A.height)?k:window.innerHeight)+"px");let z=function(e){var t,n,i,r;let a,{placement:o,targetNode:s,overlayNode:l,scrollNode:c,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,b=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!r7(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!r7(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=b===document.documentElement,A=window.getComputedStyle(b).position,w=v?r5(s):r6(s,b);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);w.top+=parseInt(e,10)||0,w.left+=parseInt(t,10)||0}let $=r5(l),k={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};$.width+=(null!=(t=k.left)?t:0)+(null!=(n=k.right)?n:0),$.height+=(null!=(i=k.top)?i:0)+(null!=(r=k.bottom)?r:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=r0(d),E=r0(b),D="BODY"===d.tagName?r5(b):r6(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,t,n,i,r,a,o,s,l,c,u,p,d,f,m,h){var g,y,b,v,A,w,$,k,x,C,E,D,S,B;let z,P,T,M=r2(e),{size:O,crossAxis:F,crossSize:I,placement:N,crossPlacement:j}=M,R=r3(t,s,n,M,u,p,c,d,m,h),L=u,V=r4(s,c,t,r,a+u,M);if(o&&i[O]>V){let e=r2(`${rK[N]} ${j}`),i=r3(t,s,n,e,u,p,c,d,m,h);r4(s,c,t,r,a+u,e)>V&&(M=e,R=i,L=u)}let H="bottom";"top"===M.axis?"top"===M.placement?H="top":"bottom"===M.placement&&(H="bottom"):"top"===M.crossAxis&&("top"===M.crossPlacement?H="bottom":"bottom"===M.crossPlacement&&(H="top"));let G=r1(F,R[F],n[I],s,l,a,c);R[F]+=G;let U=(A=R,w=n.height,$=H,z=d?c.height:s[rZ.height],P=null!=A.top?c.top+A.top:c.top+(z-(null!=(k=A.bottom)?k:0)-w),T="top"!==$?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-P-((null!=(C=r.top)?C:0)+(null!=(E=r.bottom)?E:0)+a)):Math.max(0,P+w-(s.top+(null!=(D=s.scroll.top)?D:0))-((null!=(S=r.top)?S:0)+(null!=(B=r.bottom)?B:0)+a)),Math.min(s.height-2*a,T));f&&f<U&&(U=f),n.height=Math.min(n.height,U),G=r1(F,(R=r3(t,s,n,M,L,p,c,d,m,h))[F],n[I],s,l,a,c),R[F]+=G;let q={},W=t[F]-R[F]-r[rW[F]],K=W+.5*t[I],Y=m/2+h,J="left"===rW[F]?(null!=(g=r.left)?g:0)+(null!=(y=r.right)?y:0):(null!=(b=r.top)?b:0)+(null!=(v=r.bottom)?v:0),Z=n[I]-J-m/2-h,X=rG(K,t[F]+m/2-(R[F]+r[rW[F]]),t[F]+t[I]-m/2-(R[F]+r[rW[F]]));q[F]=rG(X,Y,Z),({placement:N,crossPlacement:j}=M),m?W=q[F]:"right"===j?W+=t[I]:"center"===j&&(W+=t[I]/2);let Q="left"===N||"top"===N?n[O]:0,ee={x:"top"===N||"bottom"===N?W:Q,y:"left"===N||"right"===N?W:Q};return{position:R,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:N,triggerAnchorPoint:ee}}(o,w,$,x,k,u,p,C,E,D,f,m,!!A&&"static"!==A,h,g,y)}({placement:(D=p,"rtl"===a?D.replace("start","right").replace("end","left"):D.replace("start","left").replace("end","right")),overlayNode:l.current,targetNode:s.current,scrollNode:u.current||l.current,padding:d,shouldFlip:f,boundaryElement:m,offset:h,crossOffset:g,maxHeight:w,arrowSize:null!=(C=null!=o?o:null==c||null==(n=c.current)?void 0:n.getBoundingClientRect().width)?C:0,arrowBoundaryOffset:$});if(z.position){if(B.style.top="",B.style.bottom="",B.style.left="",B.style.right="",Object.keys(z.position).forEach(e=>B.style[e]=z.position[e]+"px"),B.style.maxHeight=null!=z.maxHeight?z.maxHeight+"px":"",S&&document.activeElement&&u.current){let e=document.activeElement.getBoundingClientRect(),t=u.current.getBoundingClientRect(),n=e[S.type]-t[S.type];u.current.scrollTop+=n-S.offset}x(z)}},C);ex(D,C),ex(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=D]),r9({ref:l,onResize:D}),r9({ref:s,onResize:D});let S=(0,v.useRef)(!1);ex(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),D()},n=()=>{S.current&&t()};return null==ae||ae.addEventListener("resize",t),null==ae||ae.addEventListener("scroll",n),()=>{null==ae||ae.removeEventListener("resize",t),null==ae||ae.removeEventListener("scroll",n)}},[D]);let B=(0,v.useCallback)(()=>{S.current||null==A||A()},[A,S]);return!function(e){let{triggerRef:t,isOpen:n,onClose:i}=e;(0,v.useEffect)(()=>{if(!n||null===i)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let r=i||r8.get(t.current);r&&r()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,i,t])}({triggerRef:s,isOpen:b,onClose:A&&B}),{overlayProps:{style:{position:k?"absolute":"fixed",top:k?void 0:0,left:k?void 0:0,zIndex:1e5,...null==k?void 0:k.position,maxHeight:null!=(t=null==k?void 0:k.maxHeight)?t:"100vh"}},placement:null!=(n=null==k?void 0:k.placement)?n:null,triggerAnchorPoint:null!=(i=null==k?void 0:k.triggerAnchorPoint)?i:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==k?void 0:k.arrowOffsetLeft,top:null==k?void 0:k.arrowOffsetTop}},updatePosition:D}}({...c,targetRef:n,overlayRef:i,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;ex(()=>{if(!t){let e,t,n,i,a;return 1==++aa&&(r=tu()?(n=null,i=ek(as(document,"touchstart",n=>{((e=n0(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=ao(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),as(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),as(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),as(document,"focus",e=>{var t;let i=e.target;((t=i)instanceof HTMLInputElement&&!ar.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=ek(as(window,"scroll",()=>{window.scrollTo(0,0)}),ao(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ao(document.documentElement,"overflow","hidden"),ao(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),i.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{i.style.transform="",ai&&(ai.height<window.innerHeight?requestAnimationFrame(()=>{al(i)}):ai.addEventListener("resize",()=>al(i),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),i()}):ek((a=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?ao(document.documentElement,"scrollbarGutter","stable"):ao(document.documentElement,"paddingRight",`${a}px`)),ao(document.documentElement,"overflow","hidden"))),()=>{0==--aa&&r()}}},[t])}({isDisabled:o||!t.isOpen}),(0,v.useEffect)(()=>{if(t.isOpen&&i.current){let t,u,p,d,f,m,h,g,y,b,v;if(o){var e,n,r,s,l,c=null!=(e=null==a?void 0:a.current)?e:i.current;let t=rH[rH.length-1];return t&&!t.visibleNodes.has(c)?(t.visibleNodes.add(c),()=>{t.visibleNodes.delete(c)}):void 0}return p=null!=(l=null==(u=(s={shouldUseInert:!0})instanceof(t=eQ((r=[null!=(n=null==a?void 0:a.current)?n:i.current],r[0]))).Element?{root:s}:s)?void 0:u.root)?l:document.body,d=(null==u?void 0:u.shouldUseInert)&&rL,f=new Set(r),m=new Set,h=(e,n)=>{d&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},g=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))f.add(t);let t=e=>{if(m.has(e)||f.has(e)||e.parentElement&&m.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of f)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&y(e),i!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)y(e),e=n.nextNode()}},y=e=>{var n;let i=null!=(n=rV.get(e))?n:0;(d&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===i||(0===i&&h(e,!0),m.add(e),rV.set(e,i+1))},rH.length&&rH[rH.length-1].disconnect(),g(p),(b=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&![...f,...m].some(e=>e.contains(t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?f.add(e):e instanceof Element&&g(e)})).observe(p,{childList:!0,subtree:!0}),v={visibleNodes:f,hiddenNodes:m,observe(){b.observe(p,{childList:!0,subtree:!0})},disconnect(){b.disconnect()}},rH.push(v),()=>{for(let e of(b.disconnect(),m)){let t=rV.get(e);null!=t&&(1===t?(h(e,!1),rV.delete(e)):rV.set(e,t-1))}v===rH[rH.length-1]?(rH.pop(),rH.length&&rH[rH.length-1].observe()):rH.splice(rH.indexOf(v),1)}}},[o,t.isOpen,i,a]),{popoverProps:eT(p,f),arrowProps:m,underlayProps:d,placement:h,triggerAnchorPoint:g}}({...a,offset:null!=(o=a.offset)?o:8,arrowRef:l,groupRef:p?u:c},e),y=a.popoverRef,b=function(e,t=!0){let[n,i]=(0,v.useState)(!0),r=n&&t;return ex(()=>{if(r&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,r]),ap(e,r,(0,v.useCallback)(()=>i(!1),[])),r}(y,!!h)||a.isEntering||!1,A=eF({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:h,isEntering:b,isExiting:t}}),w=!a.isNonModal||"SubmenuTrigger"===a.trigger,[$,k]=(0,v.useState)(!1);ex(()=>{y.current&&k(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,v.useEffect)(()=>{$&&"SubmenuTrigger"!==a.trigger&&y.current&&!y.current.contains(document.activeElement)&&t8(y.current)},[$,y,a.trigger]);let x=(0,v.useMemo)(()=>{let e=A.children;if(i)for(let t of i)e=v.createElement(t.Provider,{value:null},e);return e},[A.children,i]),C={...d.style,"--trigger-anchor-point":g?`${g.x}px ${g.y}px`:void 0,...A.style},E=v.createElement("div",{...eT(eZ(a,{global:!0}),d),...A,role:$?"dialog":void 0,tabIndex:$?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:y,slot:a.slot||void 0,style:C,dir:a.dir,"data-trigger":a.trigger,"data-placement":h,"data-entering":b||void 0,"data-exiting":t||void 0},!a.isNonModal&&v.createElement(au,{onDismiss:e.close}),v.createElement(rR.Provider,{value:{...m,placement:h,ref:l}},x),v.createElement(au,{onDismiss:e.close}));return p?v.createElement(rC,{...a,shouldContainFocus:$,isExiting:t,portalContainer:null!=(s=null!=n?n:null==u?void 0:u.current)?s:void 0},E):v.createElement(rC,{...a,shouldContainFocus:$,isExiting:t,portalContainer:n},!a.isNonModal&&e.isOpen&&v.createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),v.createElement("div",{ref:c,style:{display:"contents"}},v.createElement(am.Provider,{value:c},E)))}function ag(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let ay=(0,v.createContext)(null),ab=(0,v.createContext)(null),av=(0,v.createContext)(null),aA=(0,v.createContext)(null),aw=[ib,nd,rN,nh],a$=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ay);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",o=function(e){var t,n;let i=ad(e),[r,a]=n9(e.value,e.defaultValue||null,e.onChange),[o]=(0,v.useState)(r),s=r||e.placeholderValue||null,[l,c]=ru(s,e.granularity),u=null!=r?r.toDate(null!=c?c:"UTC"):null,p="hour"===l||"minute"===l||"second"===l,d=null==(t=e.shouldCloseOnSelect)||t,[f,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null);if(r&&(f=r,"hour"in r&&(h=r)),s&&!(l in s))throw Error("Invalid granularity "+l+" for value "+s.toString());let y=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,b=(0,v.useMemo)(()=>({granularity:l,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:y}),[l,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,y]),{minValue:A,maxValue:w,isDateUnavailable:$}=e,k=(0,v.useMemo)(()=>ri(r,A,w,$,b),[r,A,w,$,b]),x=i6({...e,value:r,builtinValidation:k}),C=x.displayValidation.isInvalid,E=e.validationState||(C?"invalid":null),D=(e,t)=>{a("timeZone"in t?t.set((0,Z.gw)(e)):(0,Z.tR)(e,t)),m(null),g(null),x.commitValidation()};return{...x,value:r,defaultValue:null!=(n=e.defaultValue)?n:o,setValue:a,dateValue:f,timeValue:h,setDateValue:t=>{let n="function"==typeof d?d():d;p?h||n?D(t,h||rs(e.defaultValue||e.placeholderValue)):m(t):(a(t),x.commitValidation()),n&&i.setOpen(!1)},setTimeValue:e=>{f&&e?D(f,e):g(e)},granularity:l,hasTime:p,...i,setOpen(t){!t&&!r&&f&&p&&D(f,h||rs(e.defaultValue||e.placeholderValue)),i.setOpen(t)},validationState:E,isInvalid:C,formatValue:(e,t)=>u?new nD(e,ro(t,b)).format(u):"",getDateFormatter:(e,t)=>new nD(e,ro({},{...b,...t}))}}({...e,validationBehavior:a}),s=(0,v.useRef)(null),[l,c]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,fieldProps:d,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,t,n){var i;let r=eB(),a=eB(),o=eB(),s=nC((i=i$)&&i.__esModule?i.default:i,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:u}=t.displayValidation,{labelProps:p,fieldProps:d,descriptionProps:f,errorMessageProps:m}=iW({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),h=iG(t,n),g=d["aria-labelledby"]||d.id,{locale:y}=eA(),b=t.formatValue(y,{month:"long"}),A=nJ(b?s.format("selectedDateDescription",{date:b}):""),w=[A["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=eZ(e),k=(0,v.useMemo)(()=>ij(n),[n]),x=(0,v.useRef)(!1),{focusWithinProps:C}=ni({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(a);if(!(null==n?void 0:n.contains(t.relatedTarget))){var i,r;x.current=!1,null==(i=e.onBlur)||i.call(e,t),null==(r=e.onFocusChange)||r.call(e,!1)}},onFocusWithin:t=>{if(!x.current){var n,i;x.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(i=e.onFocusChange)||i.call(e,!0)}}});return{groupProps:eT($,h,d,A,C,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},fieldProps:{...d,id:o,[iJ]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[i5]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:m,buttonProps:{...A,id:r,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${r} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${r} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:c,validationDetails:u}}({...eR(e),label:c,validationBehavior:a},o,s),[A,w]=(0,v.useState)(null),$=(0,v.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);r9({ref:s,onResize:$});let{focusProps:k,isFocused:x,isFocusVisible:C}=nr({within:!0}),E=eF({...e,values:{state:o,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen},defaultClassName:"react-aria-DatePicker"}),D=eZ(e,{global:!0});return delete D.id,v.createElement(eO,{values:[[av,o],[ib,{...u,ref:s,isInvalid:o.isInvalid}],[rg,d],[nd,{...f,isPressed:o.isOpen}],[rN,{...p,ref:l,elementType:"span"}],[io,h],[rD,o],[af,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":A},clearContexts:aw}],[rE,m],[nh,{slots:{description:g,errorMessage:y}}],[rB,b]]},v.createElement("div",{...eT(D,E,k),ref:t,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":o.isOpen||void 0}),v.createElement(rI,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:o}))}),ak=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ab);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",o=function(e){var t,n,i,r;let a=ad(e),[o,s]=n9(e.value,e.defaultValue||null,e.onChange),[l]=(0,v.useState)(o),[c,u]=(0,v.useState)(()=>o||{start:null,end:null});null==o&&c.start&&c.end&&u(c={start:null,end:null});let p=o||c,d=e=>{u(p=e||{start:null,end:null}),ag(p)?s(p):s(null)},[f,m]=ru((null==p?void 0:p.start)||(null==p?void 0:p.end)||e.placeholderValue||null,e.granularity),h="hour"===f||"minute"===f||"second"===f,g=null==(i=e.shouldCloseOnSelect)||i,[y,b]=(0,v.useState)(null),[A,w]=(0,v.useState)(null);p&&ag(p)&&(y=p,"hour"in p.start&&(A=p));let $=(e,t)=>{d({start:"timeZone"in t.start?t.start.set((0,Z.gw)(e.start)):(0,Z.tR)(e.start,t.start),end:"timeZone"in t.end?t.end.set((0,Z.gw)(e.end)):(0,Z.tR)(e.end,t.end)}),b(null),w(null),P.commitValidation()},k=t=>{let n="function"==typeof g?g():g;h?ag(t)&&(n||(null==A?void 0:A.start)&&(null==A?void 0:A.end))?$(t,{start:(null==A?void 0:A.start)||rs(e.placeholderValue),end:(null==A?void 0:A.end)||rs(e.placeholderValue)}):b(t):ag(t)?(d(t),P.commitValidation()):b(t),n&&a.setOpen(!1)},x=e=>{ag(y)&&ag(e)?$(y,e):w(e)},C=(null==p||null==(t=p.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===p.start.era||(null==p||null==(n=p.end)?void 0:n.calendar.identifier)==="gregory"&&"BC"===p.end.era,E=(0,v.useMemo)(()=>({granularity:f,timeZone:m,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:C}),[f,e.hourCycle,e.shouldForceLeadingZeros,m,e.hideTimeZone,C]),{minValue:D,maxValue:S,isDateUnavailable:B}=e,z=(0,v.useMemo)(()=>{var e,t,n;let i;return i=re(ri(null!=(t=null==(e=p)?void 0:e.start)?t:null,D,S,B,E),ri(null!=(n=null==e?void 0:e.end)?n:null,D,S,B,E)),(null==e?void 0:e.end)!=null&&null!=e.start&&0>e.end.compare(e.start)&&(i=re(i,{isInvalid:!0,validationErrors:[(nv.getGlobalDictionaryForPackage("@react-stately/datepicker")||rt).getStringForLocale("rangeReversed",rn())],validationDetails:{...i1,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),i},[p,D,S,B,E]),P=i6({...e,value:o,name:(0,v.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:z}),T=P.displayValidation.isInvalid,M=e.validationState||(T?"invalid":null);return{...P,value:p,defaultValue:null!=(r=e.defaultValue)?r:l,setValue:d,dateRange:y,timeRange:A,granularity:f,hasTime:h,setDate(e,t){var n,i;"start"===e?k({start:t,end:null!=(n=null==y?void 0:y.end)?n:null}):k({start:null!=(i=null==y?void 0:y.start)?i:null,end:t})},setTime(e,t){var n,i;"start"===e?x({start:t,end:null!=(n=null==A?void 0:A.end)?n:null}):x({start:null!=(i=null==A?void 0:A.start)?i:null,end:t})},setDateTime(e,t){var n,i;"start"===e?d({start:t,end:null!=(n=null==p?void 0:p.end)?n:null}):d({start:null!=(i=null==p?void 0:p.start)?i:null,end:t})},setDateRange:k,setTimeRange:x,...a,setOpen(t){!t&&!((null==p?void 0:p.start)&&(null==p?void 0:p.end))&&ag(y)&&h&&$(y,{start:(null==A?void 0:A.start)||rs(e.placeholderValue),end:(null==A?void 0:A.end)||rs(e.placeholderValue)}),a.setOpen(t)},validationState:M,isInvalid:T,formatValue(t,n){let i;if(!p||!p.start||!p.end)return null;let r="timeZone"in p.start?p.start.timeZone:void 0,a=e.granularity||(p.start&&"minute"in p.start?"minute":"day"),o="timeZone"in p.end?p.end.timeZone:void 0,s=e.granularity||(p.end&&"minute"in p.end?"minute":"day"),l=ro(n,{granularity:a,timeZone:r,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===p.start.calendar.identifier&&"BC"===p.start.era||"gregory"===p.end.calendar.identifier&&"BC"===p.end.era}),c=p.start.toDate(r||"UTC"),u=p.end.toDate(o||"UTC"),d=new nD(t,l);if(r===o&&a===s&&0!==p.start.compare(p.end)){try{let e=d.formatRangeToParts(c,u),t=-1;for(let n=0;n<e.length;n++){let i=e[n];if("shared"===i.source&&"literal"===i.type)t=n;else if("endRange"===i.source)break}let n="",i="";for(let r=0;r<e.length;r++)r<t?n+=e[r].value:r>t&&(i+=e[r].value);return{start:n,end:i}}catch{}i=d}else i=new nD(t,ro(n,{granularity:s,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(c),end:i.format(u)}},getDateFormatter:(e,t)=>new nD(e,ro({},{...E,...t}))}}({...e,validationBehavior:a}),s=(0,v.useRef)(null),[l,c]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,startFieldProps:d,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:b,...A}=function(e,t,n){var i,r,a,o,s,l,c,u;let p=nC((u=i$)&&u.__esModule?u.default:u,"@react-aria/datepicker"),{isInvalid:d,validationErrors:f,validationDetails:m}=t.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:b}=iW({...e,labelElementType:"span",isInvalid:d,errorMessage:e.errorMessage||f}),A=g["aria-labelledby"]||g.id,{locale:w}=eA(),$=t.formatValue(w,{month:"long"}),k=nJ($?p.format("selectedRangeDescription",{startDate:$.start,endDate:$.end}):""),x={"aria-label":p.format("startDate"),"aria-labelledby":A},C={"aria-label":p.format("endDate"),"aria-labelledby":A},E=eB(),D=eB(),S=iG(t,n),B=[k["aria-describedby"],g["aria-describedby"]].filter(Boolean).join(" ")||void 0,z=(0,v.useMemo)(()=>ij(n,{accept:e=>e.id!==E}),[n,E]),P={[iZ]:z,[iJ]:"presentation","aria-describedby":B,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},T=eZ(e),M=(0,v.useRef)(!1),{focusWithinProps:O}=ni({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(D);if(!(null==n?void 0:n.contains(t.relatedTarget))){var i,r;M.current=!1,null==(i=e.onBlur)||i.call(e,t),null==(r=e.onFocusChange)||r.call(e,!1)}},onFocusWithin:t=>{if(!M.current){var n,i;M.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(i=e.onFocusChange)||i.call(e,!0)}}}),F=(0,v.useRef)(i3),I=(0,v.useRef)(i3);return{groupProps:eT(T,S,g,k,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":B,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...h,onClick:()=>{z.focusFirst()}},buttonProps:{...k,id:E,"aria-haspopup":"dialog","aria-label":p.format("calendar"),"aria-labelledby":`${E} ${A}`,"aria-describedby":B,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${E} ${A}`},startFieldProps:{...x,...P,value:null!=(l=null==(i=t.value)?void 0:i.start)?l:null,defaultValue:null==(r=t.defaultValue)?void 0:r.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[i5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){F.current=e,t.updateValidation(re(e,I.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...C,...P,value:null!=(c=null==(a=t.value)?void 0:a.end)?c:null,defaultValue:null==(o=t.defaultValue)?void 0:o.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[i5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){I.current=e,t.updateValidation(re(F.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:y,errorMessageProps:b,calendarProps:{autoFocus:!0,value:(null==(s=t.dateRange)?void 0:s.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:d,validationErrors:f,validationDetails:m}}({...eR(e),label:c,validationBehavior:a},o,s),[w,$]=(0,v.useState)(null),k=(0,v.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);r9({ref:s,onResize:k});let{focusProps:x,isFocused:C,isFocusVisible:E}=nr({within:!0}),D=eF({...e,values:{state:o,isFocusWithin:C,isFocusVisible:E,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=eZ(e,{global:!0});return delete S.id,v.createElement(eO,{values:[[aA,o],[ib,{...u,ref:s,isInvalid:o.isInvalid}],[nd,{...m,isPressed:o.isOpen}],[rN,{...p,ref:l,elementType:"span"}],[is,g],[rD,o],[af,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w},clearContexts:aw}],[rE,h],[rg,{slots:{start:d,end:f}}],[nh,{slots:{description:y,errorMessage:b}}],[rB,A]]},v.createElement("div",{...eT(S,D,x),ref:t,slot:e.slot||void 0,"data-focus-within":C||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":E||void 0,"data-disabled":e.isDisabled||void 0,"data-open":o.isOpen||void 0}))});var ax=n(42729),aC=n(22613),aE=n(47197),aD={};aD.styleTagTransform=F(),aD.setAttributes=P(),aD.insert=B().bind(null,"head"),aD.domAPI=D(),aD.insertStyleElement=M(),C()(aE.A,aD);let aS=aE.A&&aE.A.locals?aE.A.locals:void 0;var aB=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),az=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-add",iconProps:e})})),aP=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),aT=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),aM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),aO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),aF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),aI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),aN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),aj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),aR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),aL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),aV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),aH=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),aG=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),aU=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),aq=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),aW=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),aK=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),aY=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),aJ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),aZ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),aX=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),aQ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close",iconProps:e})})),a0=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),a1=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-document",iconProps:e})})),a2=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-download",iconProps:e})})),a3=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),a4=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),a5=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),a6=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-events",iconProps:e})})),a7=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),a8=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),a9=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),oe=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),ot=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),on=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-group",iconProps:e})})),oi=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),or=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),oa=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),oo=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),os=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information",iconProps:e})})),ol=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),oc=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),ou=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),op=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),od=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-location",iconProps:e})})),of=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-material-order",iconProps:e})})),om=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),oh=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),o_=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),og=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),oy=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-money",iconProps:e})})),ob=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),ov=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),oA=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),ow=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),o$=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),ok=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),ox=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-print",iconProps:e})})),oC=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-procedure-order",iconProps:e})})),oE=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),oD=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-referral-order",iconProps:e})})),oS=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),oB=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-report",iconProps:e})})),oz=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),oP=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),oT=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-save",iconProps:e})})),oM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-search",iconProps:e})})),oO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),oF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),oI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),oN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),oj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),oR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),oL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-table",iconProps:e})})),oV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-time",iconProps:e})})),oH=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),oG=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),oU=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),oq=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),oW=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),oK=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),oY=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-password",iconProps:e})})),oJ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user",iconProps:e})})),oZ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),oX=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-view",iconProps:e})})),oQ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),o0=oQ,o1=a0,o2=op,o3=oa,o4=oI,o5=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.icon,i=e.fallback,r=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["icon","fallback"]),a=(0,v.useRef)(document.getElementById(n));return(0,v.useEffect)(function(){var e=document.getElementById("omrs-svgs-container"),t=new MutationObserver(function(e){var t=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var l=o.value;"childList"===l.type&&(a.current=document.getElementById(n))}}catch(e){i=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(i)throw r}}});return e&&t.observe(e,{childList:!0}),function(){return t.disconnect()}},[n]),A().createElement(k.fS,{value:a.current,fallback:i},A().createElement(o6,{ref:t,icon:n,iconProps:r}))})),o6=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.icon,i=Object.assign({},{fill:"currentColor",size:20},e.iconProps),r=i.className,a=i.fill,o=i.size;(o<=0||o>72)&&(console.error("Invalid size '".concat(o,"' specified for ").concat(n,". Defaulting to 20.")),o=20);var s=(0,v.useRef)(null);return(0,v.useImperativeHandle)(t,function(){return s.current}),(0,v.useEffect)(function(){s.current&&"currentColor"!==a&&s.current.style.setProperty("--omrs-icon-fill",a)},[]),A().createElement("svg",{ref:s,className:$()("omrs-icon",aS.icon,r),height:o,width:o,viewBox:"0 0 16 16"},A().createElement("use",{href:"#".concat(n)}))})),o7=n(23464),o8=n.n(o7);function o9(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(o9(e,i0.ng)||o9(e,i0._l)||o9(e,i0.Ip))return t?(0,Z.yP)(e,t):e;var i=o8()(e).toDate(),r=new i0.ng(i.getFullYear(),i.getMonth()+1,i.getDate());return t?(0,Z.yP)(r,t):r}function st(e){if(e)return e.toDate((0,X.Xj)())}var sn=(0,v.createContext)(null),si={};function sr(){return"undefined"!=typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}si={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`\u{62D}\u{642}\u{644} \u{631}\u{642}\u{645}\u{64A}`},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`\u{41D}\u{43E}\u{43C}\u{435}\u{440} \u{43D}\u{430} \u{43F}\u{43E}\u{43B}\u{435}\u{442}\u{43E}`},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`\u{10C}\xedseln\xe9 pole`},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`\u{3A0}\u{3B5}\u{3B4}\u{3AF}\u{3BF} \u{3B1}\u{3C1}\u{3B9}\u{3B8}\u{3BC}\u{3BF}\u{3CD}`},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de n\xfamero`},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri v\xe4li`},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokentt\xe4`},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`\u{5E9}\u{5D3}\u{5D4} \u{5DE}\u{5E1}\u{5E4}\u{5E8}`},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Sz\xe1mmez\u{151}`},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`\u{6570}\u{5024}\u{30D5}\u{30A3}\u{30FC}\u{30EB}\u{30C9}`},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`\u{BC88}\u{D638} \u{D544}\u{B4DC}`},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skait\u{13C}u lauks`},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de n\xfamero`},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo num\xe9rico`},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`C\xe2mp numeric`},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`\u{427}\u{438}\u{441}\u{43B}\u{43E}\u{432}\u{43E}\u{435} \u{43F}\u{43E}\u{43B}\u{435}`},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`\u{10C}\xedseln\xe9 pole`},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`\u{160}tevil\u{10D}no polje`},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerf\xe4lt`},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Say\u{131} alan\u{131}`},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`\u{41F}\u{43E}\u{43B}\u{435} \u{43D}\u{43E}\u{43C}\u{435}\u{440}\u{430}`},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`\u{6570}\u{5B57}\u{5B57}\u{6BB5}`},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`\u{6578}\u{5B57}\u{6B04}\u{4F4D}`}};var sa=n(93092);function so(e={}){let{locale:t}=eA();return(0,v.useMemo)(()=>new(0,sa.K)(t,e),[t,e])}var ss={};function sl(e){var t;let n=(0,v.useRef)(void 0),{value:i,textValue:r,minValue:a,maxValue:o,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:u,onIncrementPage:p,onDecrement:d,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=nC((t=ss)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,v.useEffect)(()=>()=>clearTimeout(n.current),[]);let y=(0,v.useRef)(!1),b=()=>{y.current=!0},A=()=>{y.current=!1},w=""===r?g.format("Empty"):(r||`${i}`).replace("-","−");(0,v.useEffect)(()=>{y.current&&(eV&&eV.clear("assertive"),eH(w,"assertive"))},[w]);let $=eE(e=>{clearTimeout(n.current),null==u||u(),n.current=window.setTimeout(()=>{(void 0===o||isNaN(o)||void 0===i||isNaN(i)||i<o)&&$(60)},e)}),k=eE(e=>{clearTimeout(n.current),null==d||d(),n.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===i||isNaN(i)||i>a)&&k(60)},e)}),x=e=>{e.preventDefault()},{addGlobalListener:C,removeAllGlobalListeners:E}=tD();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===i||isNaN(i)?void 0:i,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":o,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(p){e.preventDefault(),null==p||p();break}case"ArrowUp":case"Up":u&&(e.preventDefault(),null==u||u());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:b,onBlur:A},incrementButtonProps:{onPressStart:()=>{$(400),C(window,"contextmenu",x)},onPressEnd:()=>{clearTimeout(n.current),E()},onFocus:b,onBlur:A},decrementButtonProps:{onPressStart:()=>{k(400),C(window,"contextmenu",x)},onPressEnd:()=>{clearTimeout(n.current),E()},onFocus:b,onBlur:A}}}ss={"ar-AE":{Empty:`\u{641}\u{627}\u{631}\u{63A}`},"bg-BG":{Empty:`\u{418}\u{437}\u{43F}\u{440}\u{430}\u{437}\u{43D}\u{438}`},"cs-CZ":{Empty:`Pr\xe1zdn\xe9`},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:`\u{386}\u{3B4}\u{3B5}\u{3B9}\u{3BF}`},"en-US":{Empty:"Empty"},"es-ES":{Empty:`Vac\xedo`},"et-EE":{Empty:`T\xfchjenda`},"fi-FI":{Empty:`Tyhj\xe4`},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:`\u{5E8}\u{5D9}\u{5E7}`},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:`\xdcres`},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:`\u{7A7A}`},"ko-KR":{Empty:`\u{BE44}\u{C5B4} \u{C788}\u{C74C}`},"lt-LT":{Empty:`Tu\u{161}\u{10D}ias`},"lv-LV":{Empty:`Tuk\u{161}s`},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:`\u{41D}\u{435} \u{437}\u{430}\u{43F}\u{43E}\u{43B}\u{43D}\u{435}\u{43D}\u{43E}`},"sk-SK":{Empty:`Pr\xe1zdne`},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:`Bo\u{15F}`},"uk-UA":{Empty:`\u{41F}\u{443}\u{441}\u{442}\u{43E}`},"zh-CN":{Empty:`\u{7A7A}`},"zh-TW":{Empty:`\u{7A7A}\u{767D}`}};var sc=n(95899);function su(e,t,n){let i="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let r=t.toString().split("."),a=n.toString().split("."),o=Math.pow(10,Math.max(r[1]&&r[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*o),n=Math.round(n*o),i=("+"===e?t+n:t-n)/o}return i}let sp=(0,v.createContext)(null),sd=(0,v.createContext)(null),sf=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,sp);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",{locale:o}=eA(),s=function(e){let{minValue:t,maxValue:n,step:i,formatOptions:r,value:a,defaultValue:o=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:u}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===i||isNaN(i)?rG(a,t,n):rq(a,t,n,i)),isNaN(o)||(o=void 0===i||isNaN(i)?rG(o,t,n):rq(o,t,n,i));let[p,d]=n9(a,isNaN(o)?NaN:o,s),[f]=(0,v.useState)(p),[m,h]=(0,v.useState)(()=>isNaN(p)?"":new(0,sa.K)(l,r).format(p)),g=(0,v.useMemo)(()=>new(0,sc.d)(l,r),[l,r]),y=(0,v.useMemo)(()=>g.getNumberingSystem(m),[g,m]),b=(0,v.useMemo)(()=>new(0,sa.K)(l,{...r,numberingSystem:y}),[l,r,y]),A=(0,v.useMemo)(()=>b.resolvedOptions(),[b]),w=(0,v.useCallback)(e=>isNaN(e)||null===e?"":b.format(e),[b]),$=i6({...e,value:p}),k=void 0===i||isNaN(i)?1:i;"percent"===A.style&&(void 0===i||isNaN(i))&&(k=.01);let[x,C]=(0,v.useState)(p),[E,D]=(0,v.useState)(l),[S,B]=(0,v.useState)(r);Object.is(p,x)&&l===E&&r===S||(h(w(p)),C(p),D(l),B(r));let z=(0,v.useMemo)(()=>g.parse(m),[g,m]),P=(e,i=0)=>{if(isNaN(z))return rq(isNaN(i)?0:i,t,n,k);{let i=rq(z,t,n,k);return"+"===e&&i>z||"-"===e&&i<z?i:rq(su(e,z,k),t,n,k)}},T=(0,v.useMemo)(()=>!c&&!u&&(isNaN(z)||void 0===n||isNaN(n)||rq(z,t,n,k)>z||su("+",z,k)<=n),[c,u,t,n,k,z]),M=(0,v.useMemo)(()=>!c&&!u&&(isNaN(z)||void 0===t||isNaN(t)||rq(z,t,n,k)<z||su("-",z,k)>=t),[c,u,t,n,k,z]);return{...$,validate:e=>g.isValidPartialNumber(e,t,n),increment:()=>{let e=P("+",t);e===p&&h(w(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=n&&(d(rq(n,t,n,k)),$.commitValidation())},decrement:()=>{let e=P("-",n);e===p&&h(w(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=t&&(d(t),$.commitValidation())},canIncrement:T,canDecrement:M,minValue:t,maxValue:n,numberValue:z,defaultNumberValue:isNaN(o)?f:o,setNumberValue:d,setInputValue:h,inputValue:m,commit:()=>{let e;if(!m.length){d(NaN),h(void 0===a?"":w(p));return}isNaN(z)?h(w(p)):(e=void 0===i||isNaN(i)?rG(z,t,n):rq(z,t,n,i),d(e=g.parse(w(e))),h(w(void 0===a?e:p)),$.commitValidation())}}}({...e,locale:o,validationBehavior:a}),l=(0,v.useRef)(null),[c,u]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:p,groupProps:d,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,t,n){var i,r;let a,{id:o,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:u,isRequired:p,minValue:d,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:A,onKeyDown:w,onKeyUp:$,description:k,errorMessage:x,isWheelDisabled:C,...E}=e,{increment:D,incrementToMax:S,decrement:B,decrementToMin:z,numberValue:P,inputValue:T,commit:M,commitValidation:O}=t,F=nC((r=si)&&r.__esModule?r.default:r,"@react-aria/numberfield"),I=eB(o),{focusProps:N}=t9({onBlur(){M()}}),j=so(g),R=(0,v.useMemo)(()=>j.resolvedOptions(),[j]),L=so({...g,currencySign:void 0}),V=(0,v.useMemo)(()=>isNaN(P)?"":L.format(P),[L,P]),{spinButtonProps:H,incrementButtonProps:G,decrementButtonProps:U}=sl({isDisabled:c,isReadOnly:u,isRequired:p,maxValue:f,minValue:d,onIncrement:D,onIncrementToMax:S,onDecrement:B,onDecrementToMin:z,value:P,textValue:V}),[q,W]=(0,v.useState)(!1),{focusWithinProps:K}=ni({isDisabled:c,onFocusWithinChange:W});!function(e,t){let{onScroll:n,isDisabled:i}=e,r=(0,v.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);nW(t,"wheel",i?void 0:r)}({onScroll:(0,v.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?D():e.deltaY<0&&B())},[B,D]),isDisabled:C||c||u||!q},n);let Y=(null!=(i=R.maximumFractionDigits)?i:0)>0,J=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Z="numeric";tl()?J?Z="text":Y&&(Z="decimal"):tf()&&(J?Z="numeric":Y&&(Z="decimal"));let X=eZ(e),Q=(0,v.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?(M(),O()):e.continuePropagation())},[M,O]),{isInvalid:ee,validationErrors:et,validationDetails:en}=t.displayValidation,{labelProps:ei,inputProps:er,descriptionProps:ea,errorMessageProps:eo}=function(e,t,n){let i=eE(e=>{let i=n.current;if(!i)return;let r=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":r=i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteContentForward":r=i.selectionEnd===i.selectionStart?i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd+1):i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteContentBackward":r=i.selectionEnd===i.selectionStart?i.value.slice(0,i.selectionStart-1)+i.value.slice(i.selectionStart):i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":r=i.value.slice(i.selectionStart);break;default:null!=e.data&&(r=i.value.slice(0,i.selectionStart)+e.data+i.value.slice(i.selectionEnd))}null!=r&&t.validate(r)||e.preventDefault()});(0,v.useEffect)(()=>{if(!sr()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",i,!1),()=>{e.removeEventListener("beforeinput",i,!1)}},[n,i]);let r=sr()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:l,...c}=function(e,t){var n;let{inputElementType:i="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:o=!1,type:s="text",validationBehavior:l="aria"}=e,[c,u]=n9(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=nn(e,t),d=i6({...e,value:c}),{isInvalid:f,validationErrors:m,validationDetails:h}=d.displayValidation,{labelProps:g,fieldProps:y,descriptionProps:b,errorMessageProps:A}=iW({...e,isInvalid:f,errorMessage:e.errorMessage||m}),w=eZ(e,{labelable:!0}),$={type:s,pattern:e.pattern},[k]=(0,v.useState)(c);return iq(t,null!=(n=e.defaultValue)?n:k,u),iK(e,d,t),(0,v.useEffect)(()=>{if(t.current instanceof eQ(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:g,inputProps:eT(w,"input"===i?$:void 0,{disabled:r,readOnly:o,required:a&&"native"===l,"aria-required":a&&"aria"===l||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:c,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...p,...y}),descriptionProps:b,errorMessageProps:A,isInvalid:f,validationErrors:m,validationDetails:h}}(e,n),u=(0,v.useRef)(null);return{inputProps:eT(o,{onBeforeInput:r,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:i}=n.current;u.current={value:e,selectionStart:t,selectionEnd:i}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:i,selectionEnd:r}=u.current;n.current.value=e,n.current.setSelectionRange(i,r),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...c}}({...E,...X,name:void 0,form:void 0,label:h,autoFocus:m,isDisabled:c,isReadOnly:u,isRequired:p,validate:void 0,[i5]:t,value:T,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Z,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:A,onKeyDown:(0,v.useMemo)(()=>ek(Q,w),[Q,w]),onKeyUp:$,description:k,errorMessage:x},t,n);iq(n,t.defaultNumberValue,t.setNumberValue);let es=eT(H,N,er,{role:null,"aria-roledescription":tu()?null:F.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(es["aria-required"]=void 0);let el=e=>{var t;document.activeElement!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},ec=e["aria-label"]||("string"==typeof e.label?e.label:"");ec||(a=null!=e.label?ei.id:e["aria-labelledby"]);let eu=eB(),ep=eB(),ed=eT(G,{"aria-label":l||F.format("increase",{fieldLabel:ec}).trim(),id:a&&!l?eu:null,"aria-labelledby":a&&!l?`${eu} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:el}),ef=eT(U,{"aria-label":s||F.format("decrease",{fieldLabel:ec}).trim(),id:a&&!s?ep:null,"aria-labelledby":a&&!s?`${ep} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:el});return{groupProps:{...K,role:"group","aria-disabled":c,"aria-invalid":ee?"true":void 0},labelProps:ei,inputProps:es,incrementButtonProps:ed,decrementButtonProps:ef,errorMessageProps:eo,descriptionProps:ea,isInvalid:ee,validationErrors:et,validationDetails:en}}({...eR(e),label:u,validationBehavior:a},s,l),A=eF({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=eZ(e,{global:!0});return delete w.id,v.createElement(eO,{values:[[sd,s],[ib,d],[iA,{...f,ref:l}],[rN,{...p,ref:c}],[nd,{slots:{increment:m,decrement:h}}],[nh,{slots:{description:g,errorMessage:y}}],[rB,b]]},v.createElement("div",{...w,...A,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&v.createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(s.numberValue)?"":s.numberValue}))});function sm(e,t){return parseInt((0,aC.Yq)(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}var sh=(0,v.forwardRef)(function(e,t){var n=e.className,i=(0,v.useContext)(il),r=(0,v.useContext)(ic),a=null!=i?i:r,o=(0,v.useContext)(sn),s=(0,X.Xj)(),l=(0,aC.Yq)(a.visibleRange.start.toDate(s),{calendar:o.calendar,locale:o.baseName,day:!1,year:!1,noToday:!0}),c=sm(a.visibleRange.start.toDate(s),o),u=a.maxValue?sm(a.maxValue.toDate(s),o):void 0,p=a.minValue?sm(a.minValue.toDate(s),o):void 0,d=(0,v.useCallback)(function(e){a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&A().createElement("span",{ref:t,className:n},A().createElement("span",null,l),A().createElement(sf,{formatOptions:{useGrouping:!1},maxValue:u,minValue:p,onChange:d,value:c},A().createElement(iw,null),A().createElement(iv,null,A().createElement(nf,{slot:"increment"},A().createElement(aV,{size:8})),A().createElement(nf,{slot:"decrement"},A().createElement(aj,{size:8})))))});function s_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function sg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sy(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var sb=(0,v.forwardRef)(function(e,t){var n,i=(0,v.useContext)(av),r=(n=eN({slot:e.slot},t,rg),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(n,2)||function(e,t){if(e){if("string"==typeof e)return s_(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s_(e,t)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],o=r[1],s=eA().locale,l=rh(sy(sg({},a),{locale:s,createCalendar:J.d})),c=(0,v.useRef)(null),u=iX(sy(sg({},a),{inputRef:c}),l,o),p=u.fieldProps,d=u.inputProps,f=(0,v.useCallback)(function(){l.isDisabled||i.toggle()},[]);return A().createElement(eO,{values:[[ry,l],[iA,sy(sg({},d),{ref:c})],[ib,sy(sg({},p),{ref:o,isInvalid:l.isInvalid})]]},A().createElement(iv,sy(sg({},e),{id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:l.isDisabled,isInvalid:l.isInvalid,onClick:f}),l.segments.map(function(t,n){return(0,v.cloneElement)(e.children(t),{key:n})})),A().createElement(iw,null))});function sv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}var sA=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(av).isInvalid?A().createElement(oQ,sv({ref:t,size:16},e)):A().createElement(aN,sv({ref:t,size:16},e))});class sw{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let s$=new Map;function sk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sx(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function sC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sE(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var sD=(0,v.forwardRef)(function(e,t){var n,i,r,a,o,s,l,c,u,p,d=e.segment,f=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["segment"]),m=(0,v.useContext)(ry),h=ew(t),g=function(e,t,n){let i,r,a,o,s=(0,v.useRef)(""),{locale:l,direction:c}=eA(),u=function(){var e;let{locale:t}=eA(),n=nx((e=i$)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,v.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new sw(t,n)}},[t,n])}(),{ariaLabel:p,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:m}=iY.get(t),h=e.isPlaceholder?"":e.text,g=(0,v.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=nM({month:"long",timeZone:g.timeZone}),b=nM({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=b.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:A}=sl({value:e.value,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,v.useMemo)(()=>new(0,sc.d)(l,{maximumFractionDigits:0}),[l]),$=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),i=w.parse(n);0===(n=0===i?"":n).length||0===i?t.clearSegment(e.type):t.setSegment(e.type,i),s.current=n}},{startsWith:k}=(i=function(e){let{locale:t}=eA(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(s$.has(n))return s$.get(n);let i=new Intl.Collator(t,e);return s$.set(n,i),i}({usage:"search",sensitivity:"base"}),r=(0,v.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===i.compare(e.slice(0,t.length),t)),[i]),a=(0,v.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===i.compare(e.slice(-t.length),t)),[i]),o=(0,v.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,r=(t=t.normalize("NFC")).length;for(;n+r<=e.length;n++){let a=e.slice(n,n+r);if(0===i.compare(t,a))return!0}return!1},[i]),(0,v.useMemo)(()=>({startsWith:r,endsWith:a,contains:o}),[r,a,o])),x=nM({hour:"numeric",hour12:!0}),C=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(0),x.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[x]),E=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(12),x.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[x]),D=nM({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,v.useMemo)(()=>{if("era"!==e.type)return[];let n=(0,Z.yP)(new(0,i0.ng)(1,1,1),t.calendar),i=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:D.formatToParts(t).find(e=>"era"===e.type).value}}),r=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(i.map(e=>e.formatted));if(r)for(let e of i)e.formatted=e.formatted.slice(r);return i},[D,t.calendar,e.type]),B=n=>{if(t.isDisabled||t.isReadOnly)return;let i=s.current+n;switch(e.type){case"dayPeriod":if(k(C,n))t.setSegment("dayPeriod",0);else if(k(E,n))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=S.find(e=>k(e.formatted,n));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(i))return;let r=w.parse(i),a=r,o=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":r>11&&(a=w.parse(n));break;case"h12":o=!1,r>12&&(a=w.parse(n))}void 0!==e.value&&e.value>=12&&r>1&&(r+=12)}else void 0!==e.maxValue&&r>e.maxValue&&(a=w.parse(n));if(isNaN(r))return;let l=0!==a||o;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(r+"0")>e.maxValue||i.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=i}}};nW((0,v.useRef)("undefined"!=typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=n.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(n.current)});let z=(0,v.useRef)("");nW(n,"beforeinput",i=>{if(n.current)switch(i.preventDefault(),i.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&$();break;case"insertCompositionText":z.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=i.data&&B(i.data)}}),nW(n,"input",e=>{let{inputType:t,data:i}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=z.current),null!=i&&(k(C,i)||k(E,i))&&B(i))}),ex(()=>{let e=n.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[n,m]);let P=tu()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,v.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let T=eB(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,O="literal"===e.type?"":u.of(e.type),F=nV({"aria-label":`${O}${p?`, ${p}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===c){I.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:eT(A,F,{id:T,...P,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(ts()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),$()}},onFocus:()=>{s.current="",n.current&&nQ(n.current,{containingElement:n0(n.current)});let e=window.getSelection();null==e||e.collapse(n.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(d,m,h).segmentProps,y=nr(),b=y.focusProps,w=y.isFocused,$=y.isFocusVisible,k=nc(sE(sC({},f),{isDisabled:m.isDisabled||"literal"===d.type})),x=k.hoverProps,C=k.isHovered,E=(i=(n=sE(sC({},f),{values:sE(sC({},d),{isReadOnly:!d.isEditable,isInvalid:m.isInvalid,isDisabled:m.isDisabled,isHovered:C,isFocused:w,isFocusVisible:$}),defaultChildren:d.text})).className,r=n.style,a=n.children,s=void 0===(o=n.defaultClassName)?void 0:o,c=void 0===(l=n.defaultChildren)?void 0:l,u=n.defaultStyle,p=n.values,(0,v.useMemo)(function(){var e,t,n;return e="function"==typeof i?i(sx(sk({},p),{defaultClassName:s})):i,t="function"==typeof r?r(sx(sk({},p),{defaultStyle:u||{}})):r,n="function"==typeof a?a(sx(sk({},p),{defaultChildren:c})):null==a?c:a,{className:null!=e?e:s,style:t||u?sk({},u,t):void 0,children:null!=n?n:c,"data-rac":""}},[i,r,a,s,c,u,p])),D=(0,v.useCallback)(function(e){e.stopPropagation()},[]);return A().createElement("span",sE(sC({},eT(eZ(f),g,b,x),E),{ref:h,style:g.style,"data-placeholder":d.isPlaceholder||void 0,"data-invalid":m.isInvalid||void 0,"data-readonly":!d.isEditable||void 0,"data-disabled":m.isDisabled||void 0,"data-type":d.type,"data-hovered":C||void 0,"data-focused":w||void 0,"data-focus-visible":$||void 0,onClick:D}))}),sS=n(73335),sB={};sB.styleTagTransform=F(),sB.setAttributes=P(),sB.insert=B().bind(null,"head"),sB.domAPI=D(),sB.insertStyleElement=M(),C()(sS.A,sB);let sz=sS.A&&sS.A.locals?sS.A.locals:void 0;function sP(e){var t=e.children,n=e.isRangePicker,i=(0,v.useContext)(av),r=(0,v.useContext)(aA),a=void 0!==n&&n?r:i,o=(0,U.useOnClickOutside)(function(){return null==a?void 0:a.close()});return A().createElement(rS,{className:sz.dialog,ref:o},t)}function sT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sM={short:!1,size:"md"};function sO(e){return A().createElement(ev,e)}var sF=(0,v.forwardRef)(function(e,t){var n,i,r,a=Object.assign({},sM,e),o=a.className,s=a.defaultValue,l=a.isDisabled,c=a.invalid,u=a.invalidText,p=a.isInvalid,d=a.label,f=a.labelText,m=a.light,h=a.maxDate,g=a.minDate,y=a.onChange,b=a.onChangeRaw,w=a.short,x=a.size,C=a.value,E=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(a,["className","defaultValue","isDisabled","invalid","invalidText","isInvalid","label","labelText","light","maxDate","minDate","onChange","onChangeRaw","short","size","value"]),D=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,S=(0,v.useId)(),B=(0,v.useMemo)(function(){var e=(0,ax.J)();return D[e]&&(e=D[e]),e},[window.i18next.language]),z=(0,v.useMemo)(function(){var e=(0,aC.a7)(B);return void 0!==e?(0,J.d)(e):void 0},[B]),P=(0,v.useMemo)(function(){return new Intl.Locale(B,{calendar:null==z?void 0:z.identifier})},[B,z]),T=(0,v.useMemo)(function(){return se(s,z)},[s]),M=(0,v.useMemo)(function(){return se(C,z,!0)},[C]),O=(0,v.useMemo)(function(){return se(h,z)},[h]),F=(0,v.useMemo)(function(){return se(g,z)},[g]),I=(0,v.useMemo)(function(){return null!=c?c:p},[c,p]),N=z?(0,Z.yP)((0,X.Ec)((0,X.Xj)()),z):(0,X.Ec)((0,X.Xj)()),j=(0,v.useMemo)(function(){return b&&y&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),b||function(e){return null==y?void 0:y(st(e))}},[b,y]);return A().createElement(sO,{locale:P.toString()},A().createElement("div",{className:$()("cds--form-item",o)},A().createElement(eO,{values:[[sn,P]]},A().createElement(a$,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){sT(e,t,n[t])})}return e}({className:$()("cds--date-picker","cds--date-picker--single",(sT(r={},"cds--date-picker--short",w),sT(r,"cds--date-picker--light",m),r)),defaultValue:T,isDisabled:l,isInvalid:I,maxValue:O,minValue:F,value:M,shouldForceLeadingZeros:"en"===P.language||void 0},E),i=i={onChange:j},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n),A().createElement("div",{className:"cds--date-picker-container"},(null!=f?f:d)&&A().createElement(rj,{className:$()("cds--label",{"cds--label--disabled":l}),htmlFor:S},null!=f?f:d),A().createElement(iv,{className:sz.inputGroup},A().createElement(sb,{id:S,ref:t,className:$()("cds--date-picker-input__wrapper",sz.inputWrapper,sT({},sz.inputWrapperMd,"md"===x||!x||0===x.length))},function(e){return"era"!==e.type?A().createElement(sD,{className:sz.inputSegment,segment:e}):A().createElement(A().Fragment,null)}),A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd)},A().createElement(sA,null))),I&&u&&A().createElement(rz,{className:sz.invalidText},u)),A().createElement(ah,{className:sz.popover,placement:"bottom start",offset:1,isNonModal:!0},A().createElement(sP,null,A().createElement(iu,null,A().createElement("header",{className:sz.header},A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd),slot:"previous"},A().createElement(aK,{size:16})),A().createElement(sh,{className:sz.monthYear}),A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd),slot:"next"},A().createElement(aY,{size:16}))),A().createElement(im,{className:sz.calendarGrid},function(e){return A().createElement(iy,{key:e.toString(),className:$()("cds--date-picker__day",sT({},sz.today,0===N.compare(e))),date:e})}))))))))}),sI=n(99939),sN={};sN.styleTagTransform=F(),sN.setAttributes=P(),sN.insert=B().bind(null,"head"),sN.domAPI=D(),sN.insertStyleElement=M(),C()(sI.A,sN);let sj=sI.A&&sI.A.locals?sI.A.locals:void 0;function sR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}var sL=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(aA).isInvalid?A().createElement(oQ,sR({ref:t,size:16},e)):A().createElement(aN,sR({ref:t,size:16},e))});function sV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sH=(0,v.forwardRef)(function(e,t){var n,i,r=e.className,a=e.defaultValue,o=e.invalid,s=e.invalidText,l=e.isDisabled,c=e.isInvalid,u=e.label,p=e.labelText,d=e.light,f=e.maxDate,m=e.minDate,h=e.onChange,g=e.onChangeRaw,y=e.value,b=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","defaultValue","invalid","invalidText","isDisabled","isInvalid","label","labelText","light","maxDate","minDate","onChange","onChangeRaw","value"]),w=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,x=(0,v.useId)(),C=(0,v.useMemo)(function(){var e=(0,ax.J)();return w[e]&&(e=w[e]),e},[window.i18next.language]),E=(0,v.useMemo)(function(){var e=(0,aC.a7)(C);return void 0!==e?(0,J.d)(e):void 0},[C]),D=(0,v.useMemo)(function(){return new Intl.Locale(C,{calendar:null==E?void 0:E.identifier})},[C,E]),S=(0,v.useMemo)(function(){if(y)return{start:se(y[0],E,!0),end:se(y[1],E,!0)}},[y]),B=(0,v.useMemo)(function(){if(a)return{start:se(a[0],E,!0),end:se(a[1],E,!0)}},[a]),z=(0,v.useMemo)(function(){return se(m,E,!0)},[m]),P=(0,v.useMemo)(function(){return se(f,E,!0)},[f]),T=(0,v.useMemo)(function(){return null!=o?o:c},[o,c]),M=E?(0,Z.yP)((0,X.Ec)((0,X.Xj)()),E):(0,X.Ec)((0,X.Xj)()),O=(0,v.useMemo)(function(){return g&&h&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),g||function(e){return null==h?void 0:h([st(e.start),st(e.end)])}},[g,h]);return A().createElement(sO,{locale:D.toString()},A().createElement("div",{className:$()("cds--form-item",r)},A().createElement(eO,{values:[[sn,D]]},A().createElement(ak,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){sV(e,t,n[t])})}return e}({id:x,className:$()("cds--date-picker",{"cds--date-picker--light":d,"cds--date-picker--disabled":l}),isInvalid:T,shouldForceLeadingZeros:"en"===D.language||void 0,maxValue:P,minValue:z,value:S,defaultValue:B,ref:t,isDisabled:l},b),i=i={onChange:O},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n),A().createElement("div",{className:"cds--date-picker-container"},(null!=p?p:u)&&A().createElement(rj,{className:$()("cds--label",{"cds--label--disabled":l})},null!=p?p:u),A().createElement(iv,{className:sj.inputGroup},A().createElement("div",{className:sj.inputsWrapper},A().createElement(rv,{className:$()("cds--date-picker-input__wrapper",sj.startInput,sj.dateInputWrapper),slot:"start"},function(e){return A().createElement(sD,{className:sj.inputSegment,segment:e})}),A().createElement("div",{className:sj.separator},A().createElement("span",{"aria-hidden":"true","data-readonly":!0},"–")),A().createElement(rv,{className:$()("cds--date-picker-input__wrapper",sj.endInput,sj.dateInputWrapper),slot:"end"},function(e){return A().createElement(sD,{className:sj.inputSegment,segment:e})})),A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd)},A().createElement(sL,null))),T&&s&&A().createElement(rz,{className:sj.invalidText},s),A().createElement(ah,{className:sj.popover,placement:"bottom start",offset:1,isNonModal:!0},A().createElement(sP,{isRangePicker:!0},A().createElement(ip,{minValue:z,maxValue:P,className:"cds--date-picker__calendar"},A().createElement("header",{className:sj.header},A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd),slot:"previous"},A().createElement(aK,{size:16})),A().createElement(sh,{className:sj.monthYear}),A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd),slot:"next"},A().createElement(aY,{size:16}))),A().createElement(im,{className:sj.calendarGrid},function(e){return A().createElement(iy,{key:e.toString(),className:$()("cds--date-picker__day",sV({},sj.today,0===M.compare(e))),date:e})})))))))))}),sG=n(70438),sU=function(e){var t=e.diagnoses,n=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).diagnosisTags;return A().createElement(A().Fragment,null,t.map(function(e){var t=e.rank,i=e.uuid,r=e.display,a=n[1===t?"primaryColor":"secondaryColor"];return A().createElement(sG.Tag,{key:i,type:a},r)}))},sq=n(61836),sW=n(30949),sK={};sK.styleTagTransform=F(),sK.setAttributes=P(),sK.insert=B().bind(null,"head"),sK.domAPI=D(),sK.insertStyleElement=M(),C()(sW.A,sK);let sY=sW.A&&sW.A.locals?sW.A.locals:void 0;var sJ=function(e){var t,n,i=e.error,r=e.headerTitle,a="tablet"===(0,k.qv)();return A().createElement(sG.Layer,null,A().createElement(sG.Tile,{className:sY.tile},A().createElement("div",{className:a?sY.tabletHeading:sY.desktopHeading},A().createElement("h4",null,r)),A().createElement("p",{className:sY.errorMessage},(0,sq.V)("error","Error")," ","".concat(null==i||null==(t=i.response)?void 0:t.status,": "),null==i||null==(n=i.response)?void 0:n.statusText),A().createElement("p",{className:sY.errorCopy},(0,sq.V)("errorCopy"))))},sZ=n(81369),sX={};sX.styleTagTransform=F(),sX.setAttributes=P(),sX.insert=B().bind(null,"head"),sX.domAPI=D(),sX.insertStyleElement=M(),C()(sZ.A,sX);let sQ=sZ.A&&sZ.A.locals?sZ.A.locals:void 0;var s0=A().forwardRef(function(e,t){var n,i=(0,k.TA)(),r=i.slotName,a=i.basePath,o=i.componentContext,s=null!=(n=window.location)?n:{pathname:""},l=(0,k.CX)(null!=r?r:"");return e.isChildOfHeader&&r&&l.length>0?A().createElement(sG.SideNav,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({ref:t,expanded:!0,"aria-label":"Left navigation",className:sQ.leftNav},e),A().createElement(k.W3,{name:"global-nav-menu-slot"}),r?A().createElement(k.fS,{value:o,fallback:A().createElement(k.W3,{name:r,state:{basePath:a,currentPath:s}})},A().createElement(k.zq.Provider,{value:o},A().createElement(k.W3,{name:r,state:{basePath:a,currentPath:s}}))):null):A().createElement(A().Fragment,null)}),s1=n(44924),s2=n(82910),s3=n(70937),s4=n(60482),s5=function(e){var t=e.notification,n=t.description,i=t.action,r=t.kind,a=t.critical,o=t.title,s=t.onAction;return A().createElement(sG.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",inline:!0,onActionButtonClick:s})};function s6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function s7(e,t){if(e){if("string"==typeof e)return s6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s6(e,t)}}let s8=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||s7(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return s6(e)})(n=t.filter(function(t){return t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||s7(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(s5,{key:e.id,notification:e})}))};function s9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var le=function(e){var t,n=e.notification,i=n.actionButtonLabel,r=n.onActionButtonClick,a=void 0===r?function(){}:r,o=n.subtitle,s=n.kind,l=n.title,c=n.critical,u=n.progressActionLabel,p=(n.id,function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,["actionButtonLabel","onActionButtonClick","subtitle","kind","title","critical","progressActionLabel","id"])),d=(t=(0,v.useState)(i),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return s9(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s9(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=d[0],m=d[1];return A().createElement(sG.ActionableNotification,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({kind:s||"info",actionButtonLabel:f,ariaLabel:"Closes actionable notification",onActionButtonClick:function(){a(),u&&m(u)},statusIconDescription:"Actionable notification",subtitle:o,title:l,lowContrast:c,inline:!0},p))};function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ln(e,t){if(e){if("string"==typeof e)return lt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lt(e,t)}}let li=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||ln(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return lt(e)})(n=t.filter(function(t){return t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||ln(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(le,{key:e.id,notification:e})}))};var lr=n(62926),la=n(55492),lo=n(17820),ls=n(36820),ll=n(55259),lc=n(75323),lu=n(24956),lp=n(43148),ld=Object.prototype.hasOwnProperty;let lf=function(e){if(null==e)return!0;if((0,ll.A)(e)&&((0,ls.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,lc.A)(e)||(0,lp.A)(e)||(0,lo.A)(e)))return!e.length;var t=(0,la.A)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,lu.A)(e))return!(0,lr.A)(e).length;for(var n in e)if(ld.call(e,n))return!1;return!0};var lm=n(25873);function lh(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function l_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function lg(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ly(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var lb=new s4.B7,lv=0,lA=new s4.B7,lw=0;function l$(e){e&&(0,lm.createRoot)(e).render(A().createElement(s8,{subject:lb}))}function lk(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:(void 0===t?"undefined":ly(t))==="object"&&(lh(t,Error)||!lf(t)))?(lh(e.description,Error)&&(e.description=e.description.toLocaleString()),setTimeout(function(){lb.next(lg(l_({},e),{id:lv++}))},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function lx(e){e&&(0,lm.createRoot)(e).render(A().createElement(li,{subject:lA}))}function lC(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:(void 0===t?"undefined":ly(t))==="object"&&!lf(t))?setTimeout(function(){lA.next(lg(l_({},e),{id:lw++}))},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}var lE=n(8569),lD={};lD.styleTagTransform=F(),lD.setAttributes=P(),lD.insert=B().bind(null,"head"),lD.domAPI=D(),lD.insertStyleElement=M(),C()(lE.A,lD);let lS=lE.A&&lE.A.locals?lE.A.locals:void 0;function lB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function lz(e,t){if(e){if("string"==typeof e)return lB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lB(e,t)}}var lP=function(e){var t,n,i,r,a,o,s=e.selectedLocationUuid,l=e.defaultLocationUuid,c=e.locationTag,u=e.locationsPerRequest,p=void 0===u?50:u,d=e.onChange,f=(0,V.useTranslation)().t,m=(t=(0,v.useState)(""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||lz(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=m[0],g=m[1],y=(n=l?"/ws/fhir2/R4/Location?_id=".concat(l):null,r=(i=(0,s1.A)(n,s3.lo,{shouldRetryOnError:function(e){var t;return null!=e&&null!=(t=e.response)&&!!t.status&&e.response.status>=500}})).data,a=i.error,o=i.isLoading,(0,v.useMemo)(function(){var e;return{location:(null==r||null==(e=r.data)?void 0:e.entry)?r.data.entry[0]:null,error:n?a:null,isLoading:!!n&&o}},[r,o,a,n])).location,b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=(0,V.useTranslation)().t,r=(0,k.d7)(n),a=(0,s2.Ay)(function(n,i){if(i){var a,o,s=null==(o=i.data)||null==(a=o.link)?void 0:a.find(function(e){return"next"===e.relation});if(!s)return null;var l=new URL(s.url);return l.origin===window.location.origin?s.url:new URL("".concat(l.pathname).concat(l.search?"?".concat(l.search):""),window.location.origin).toString()}var c="".concat(s3.IU,"/Location?"),u=new URLSearchParams;return u.append("_summary","data"),t&&u.append("_count",""+t),n&&u.append("_getpagesoffset",""+n*t),e&&u.append("_tag",e),"string"==typeof r&&""!=r&&u.append("name:contains",r),c+u.toString()},s3.lo),o=a.data,s=a.isLoading,l=a.isValidating,c=a.setSize,u=a.error;return u&&lk({title:i("errorLoadingLoginLocations","Error loading login locations"),kind:"error",critical:!0,description:null==u?void 0:u.message}),(0,v.useMemo)(function(){var e,t,n,i,r;return{locations:(null==o?void 0:o.length)?null==o?void 0:o.flatMap(function(e){var t,n;return null!=(n=null==e||null==(t=e.data)?void 0:t.entry)?n:[]}):[],isLoading:s,totalResults:null==o||null==(t=o[0])||null==(e=t.data)?void 0:e.total,hasMore:null!=o&&!!o.length&&(null==o||null==(r=o[o.length-1])||null==(i=r.data)||null==(n=i.link)?void 0:n.some(function(e){return"next"===e.relation})),loadingNewData:l,setPage:c}},[s,o,l,c])}(c,p,h),w=b.locations,$=b.isLoading,x=b.hasMore,C=b.loadingNewData,E=b.setPage,D=(0,v.useMemo)(function(){if(y&&!h){var e;return[y].concat(function(e){if(Array.isArray(e))return lB(e)}(e=null==w?void 0:w.filter(function(e){return e.resource.id!==l}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lz(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return w},[y,w]),S=function(e){d(),g(e)},B=(0,v.useCallback)(function(){C||!x||E(function(e){return e+1})},[C,x,E]),z=(0,U.useOnVisible)(B),P=x?D.length-p/2:-1;return A().createElement("div",null,A().createElement(sG.Search,{labelText:f("searchForLocation","Search for a location"),id:"search-1",placeholder:f("searchForLocation","Search for a location"),onChange:function(e){return S(e.target.value)},size:"lg"}),A().createElement("div",{className:lS.searchResults},$?A().createElement("div",{className:lS.loadingContainer},A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"})):A().createElement(A().Fragment,null,A().createElement("div",{className:lS.locationResultsContainer},(null==D?void 0:D.length)>0?A().createElement(sG.RadioButtonGroup,{name:"loginLocations",onChange:function(e){d(null==e?void 0:e.toString())},orientation:"vertical",valueSelected:s},D.map(function(e,t){return A().createElement(sG.RadioButton,{className:lS.locationRadioButton,key:e.resource.id,id:e.resource.id,name:e.resource.name,labelText:A().createElement("span",{ref:t==P?z:null},e.resource.name),value:e.resource.id})})):A().createElement("div",{className:lS.emptyState},A().createElement("p",{className:lS.locationNotFound},f("noResultsToDisplay","No results to display")))),C&&A().createElement("div",{className:lS.loadingIcon},A().createElement(sG.InlineLoading,{description:f("loading","Loading")})))))},lT=n(22956),lM=n(467),lO=n(11621),lF=n(64201);function lI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function lN(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(i,r)}function lj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function lR(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function lL(e,t){if(e){if("string"==typeof e)return lI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lI(e,t)}}var lV=(0,lM.Zd)("modalState",{modalContainer:null,modalStack:[]}),lH=0,lG=window.getComputedStyle(document.body).overflow;function lU(e){var t=e.modalStack,n=e.modalContainer;n&&(t.length?(n.style.visibility||(addEventListener("keydown",lW),document.body.style.overflow="hidden",n.style.visibility="unset"),t.forEach(function(e,i){switch(e.state){case"NEW":var r,a,o,s,l,c,u,p=(r=({size:null!=(u=null==(c=e.props)?void 0:c.size)?u:"md"}).size,(a=document.createElement("div")).className="cds--modal-container cds--modal-container--".concat(r),a.setAttribute("role","dialog"),a.setAttribute("tabindex","-1"),a.setAttribute("aria-modal","true"),a);e.container=p,(function(e,t){var n;return(n=function(e,t){var n,i,r,a,o,s=arguments;return function(e,t){var n,i,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&c[0]?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,i=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],i=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:if(n=s.length>2&&void 0!==s[2]?s[2]:{},i=(0,lO.Fg)(t),r=null,!e)return[3,2];if(!i)throw Error("No modal named '".concat(t,"' has been registered."));return[4,(0,i.load)()];case 1:return a=l.sent(),o=lH++,r=(0,lT.xL)(lR(lj({},a),{name:"".concat(t,"-").concat(o)}),lR(lj({},n),{domElement:e})),[3,3];case 2:(0,lF.N)("Failed to launch modal. Please notify your administrator. Modal name: ".concat(t)),l.label=3;case 3:return[2,r]}})},function(){var e=this,t=arguments;return new Promise(function(i,r){var a=n.apply(e,t);function o(e){lN(a,i,r,o,s,"next",e)}function s(e){lN(a,i,r,o,s,"throw",e)}o(void 0)})}).apply(this,arguments)})(p,e.modalName,e.props).then(function(t){e.parcel=t,e.state="MOUNTED",n.prepend(p),p.style.visibility="unset"});break;case"MOUNTED":e.container&&(e.container.style.visibility=i?"hidden":"unset");break;case"TO_BE_DELETED":e.onClose(),null==(s=e.parcel)||null==(o=s.unmount)||o.call(s),null==(l=e.container)||l.remove(),setTimeout(function(){lV.setState({modalContainer:n,modalStack:t.filter(function(t){return t!==e})})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=lG,removeEventListener("keydown",lW)))}function lq(e){var t=lV.getState(),n=t.modalStack.map(function(t){return t===e?lR(lj({},t),{state:"TO_BE_DELETED"}):t});lV.setState(lR(lj({},t),{modalStack:n}))}function lW(e){var t,n;"Escape"===e.key&&(n=(t=lV.getState().modalStack,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,1)||lL(t,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0])&&lq(n)}function lK(e){lV.subscribe(lU),lV.setState(lR(lj({},lV.getState()),{modalContainer:e}))}function lY(e){var t,n,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=function(){var e=lV.getState().modalStack.find(function(e){return e.onClose===a});e&&lq(e)};return(0,lO.Fg)(e)?(i=[{state:"NEW",onClose:a,modalName:e,props:lj({close:o},r)}].concat(function(e){if(Array.isArray(e))return lI(e)}(n=(t=lV.getState()).modalStack)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||lL(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),lV.setState(lR(lj({},t),{modalStack:i}))):(0,lF.N)('Failed to launch modal. Please notify your administrator. Modal name: "'.concat(e,'"')),o}var lJ=n(91673),lZ={};lZ.styleTagTransform=F(),lZ.setAttributes=P(),lZ.insert=B().bind(null,"head"),lZ.domAPI=D(),lZ.insertStyleElement=M(),C()(lJ.A,lZ);let lX=lJ.A&&lJ.A.locals?lJ.A.locals:void 0;function lQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function l0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function l1(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l2=function(e){if("children"in e){var t=e.children,n=e.className,i=l1(e,["children","className"]);return A().createElement("div",l0({className:$()(lX.pageHeader,n)},i),t)}var r=e.title,a=e.illustration,o=e.className,s=l1(e,["title","illustration","className"]);return A().createElement("div",l0({className:$()(lX.pageHeader,o)},s),A().createElement(l3,{title:r,illustration:a}))},l3=function(e){var t,n=e.title,i=e.illustration,r=e.className,a=(t=(0,v.useState)(null),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return lQ(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lQ(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],s=a[1];return(0,v.useEffect)(function(){(0,h.zj)("@openmrs/esm-styleguide").then(function(e){s(e)})},[]),A().createElement("div",{className:$()(lX.pageHeaderContent,r)},i,A().createElement("div",{className:lX.pageLabels},(null==o?void 0:o.implementationName)&&A().createElement("p",null,(0,sq.V)(o.implementationName)),A().createElement("p",{className:lX.pageName},n)))},l4=n(67943),l5=n(40785),l6=n(48391),l7={};l7.styleTagTransform=F(),l7.setAttributes=P(),l7.insert=B().bind(null,"head"),l7.domAPI=D(),l7.insertStyleElement=M(),C()(l6.A,l7);let l8=l6.A&&l6.A.locals?l6.A.locals:void 0;function l9(e){var t=e.showIdentifierLabel,n=e.type,i=e.value;return A().createElement("span",{className:l8.primaryIdentifier},A().createElement(sG.Tag,{className:l8.tag,type:"gray"},t&&(null==n?void 0:n.text)&&A().createElement("span",{className:l8.label},n.text,": "),A().createElement("span",{className:l8.value},i)))}function ce(e){var t=e.showIdentifierLabel,n=e.type,i=e.value;return A().createElement(sG.FormLabel,{className:l8.secondaryIdentifier,id:"patient-banner-identifier-".concat(i)},t&&A().createElement("span",{className:l8.label},null==n?void 0:n.text,": "),A().createElement("span",{className:l8.value},i))}function ct(e){var t,n=e.identifiers,i=e.showIdentifierLabel,r=(0,k.UK)().excludePatientIdentifierCodeTypes,a=(0,k.wJ)().primaryIdentifierCode,o=null!=(t=null==n?void 0:n.filter(function(e){var t,n,i,a=null==(i=e.type)||null==(n=i.coding)||null==(t=n[0])?void 0:t.code;return a&&!(null==r?void 0:r.uuids.includes(a))}))?t:[];return A().createElement(A().Fragment,null,(null==o?void 0:o.length)?o.map(function(e,t){var n,r,s=e.value,l=e.type;return A().createElement(A().Fragment,{key:s},A().createElement("span",{className:l8.identifier},(null==l||null==(r=l.coding)||null==(n=r[0])?void 0:n.code)===a?A().createElement(l9,{showIdentifierLabel:i,type:l,value:s}):A().createElement(ce,{showIdentifierLabel:i,type:l,value:s})),t<o.length-1&&A().createElement("span",{className:l8.separator},"\xb7"))}):"")}var cn={Female:a7,Male:a8,Other:a9,Unknown:oe},ci=function(e){var t=cn[e.gender];return t?A().createElement(t,{fill:"#525252"}):null},cr={male:"Male",female:"Female",other:"Other",unknown:"Unknown"},ca=function(e){var t,n=e.toLowerCase(),i=null!=(t=cr[n])?t:"Unknown";return{displayText:(0,sq.V)(n,e),iconKey:i}};function co(e){var t=e.patient,n=e.renderedFrom,i=(0,l4.Vp)(t),r=(null==t?void 0:t.gender)&&ca(t.gender),a=(0,v.useMemo)(function(){return{patientUuid:t.id,patient:t,renderedFrom:n}},[t.id,t,n]);return A().createElement("div",{className:l8.patientInfo},A().createElement("div",{className:$()(l8.row,l8.patientNameRow)},A().createElement("div",{className:l8.flexRow},A().createElement("span",{className:l8.patientName},i),r&&A().createElement("div",{className:l8.gender},A().createElement(ci,{gender:r.iconKey}),A().createElement("span",null,r.displayText)),A().createElement(k.W3,{className:l8.tagsSlot,name:"patient-banner-tags-slot",state:a}))),A().createElement("div",{className:l8.demographics},t.birthDate&&A().createElement(A().Fragment,null,A().createElement("span",null,(0,l5.K)(t.birthDate)),A().createElement("span",{className:l8.separator},"\xb7"),A().createElement("span",null,(0,aC.LW)(t.birthDate,{time:!1})),A().createElement("span",{className:l8.separator},"\xb7")),A().createElement(ct,{identifiers:t.identifier,showIdentifierLabel:!0}),A().createElement(k.W3,{className:l8.extensionSlot,name:"patient-banner-bottom-slot",state:a})))}var cs=n(18282),cl=n(33539),cc={};cc.styleTagTransform=F(),cc.setAttributes=P(),cc.insert=B().bind(null,"head"),cc.domAPI=D(),cc.insertStyleElement=M(),C()(cl.A,cc);let cu=cl.A&&cl.A.locals?cl.A.locals:void 0;function cp(e){var t=e.patient,n=e.patientUuid,i=e.actionsSlotName,r=e.additionalActionsSlotState,a=(0,k.br)(i).extensions,o=(0,v.useMemo)(function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({patientUuid:n,patient:t},r)},[n,r]);return A().createElement(A().Fragment,null,a.length>0?A().createElement("div",{className:cu.overflowMenuContainer},A().createElement(L,{menuTitle:A().createElement(A().Fragment,null,A().createElement("span",{className:cu.actionsButtonText},(0,sq.V)("actions","Actions"))," ",A().createElement(cs.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}}))},A().createElement(k.W3,{name:"patient-actions-slot",key:"patient-actions-slot",state:o}))):null)}var cd=function(e){var t=e.toast,n=e.closeToast,i=t.description,r=t.kind,a=t.critical,o=t.title,s=t.actionButtonLabel,l=t.onActionButtonClick,c=void 0===l?function(){}:l,u=(0,v.useCallback)(function(){c(),n()},[n,c]);return A().createElement("div",null,A().createElement(sG.ActionableNotification,{actionButtonLabel:s,kind:r||"info",lowContrast:a,subtitle:i,title:o||"",onActionButtonClick:u,onClose:n}))};function cf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function cm(e,t){if(e){if("string"==typeof e)return cf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cf(e,t)}}let ch=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||cm(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1],o=(0,v.useCallback)(function(e){a(function(t){return t.filter(function(t){return t!==e})})},[]);return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return cf(e)})(n=t.filter(function(t){return t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||cm(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(cd,{key:e.id,toast:e,closeToast:function(){return o(e)}})}))};var c_=new s4.B7,cg=0;function cy(e){e&&(0,lm.createRoot)(e).render(A().createElement(ch,{subject:c_}))}function cb(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:(void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"&&!lf(t))?setTimeout(function(){var t,n;c_.next((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},e),n=n={id:cg++},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}var cv=n(17744);function cA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function cw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function c$(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ck(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return!0;var n=cS[e];return!n||!n()}function cx(e,t){var n,i=null==(n=cI.getState())?void 0:n.workspaceGroup,r=null==i?void 0:i.name;r&&e===r&&cL(function(){var n=cq(e);n&&(n.setState({},!0),n.subscribe(function(){})()),"function"==typeof(null==i?void 0:i.cleanup)&&i.cleanup(),cI.setState(function(e){return c$(cw({},e),{workspaceGroup:void 0})}),"function"==typeof t&&t()},r?function(e){return e.currentWorkspaceGroup===r}:function(){return!0})}function cC(e,t){var n,i=t.name,r=t.additionalProps;(0,lO.Xb)(i);var a=function(){cM(e.name,{ignoreChanges:!0,onWorkspaceClose:function(){return cE(i,r)},closeWorkspaceGroup:!1})};ck(e.name)?a():cH("closing-workspace-launching-new-workspace",a,null!=(n=e.title)?n:e.name)}function cE(e,t){var n,i,r=(0,lO.Xb)(e),a=cI.getState().workspaceGroup;if(a&&!(null==(n=a.members)?void 0:n.includes(e)))return void cx(a.name,function(){cE(e,t)});var o=null==(i=cI.getState().workspaceGroup)?void 0:i.name,s=c$(cw({},r),{title:cG(r,t),closeWorkspace:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return cM(e,t)},closeWorkspaceWithSavedChanges:function(t){return cM(e,cw({ignoreChanges:!0},t))},promptBeforeClosing:function(t){var n,i;return n=e,i=t,void(cS[n]=i)},setTitle:function(t,n){s.title=t,s.titleNode=n,cI.setState(function(t){var n=t.openWorkspaces.map(function(t){return t.name===e?s:t});return c$(cw({},t),{openWorkspaces:n})})},currentWorkspaceGroup:o,additionalProps:null!=t?t:{}});function l(e,t){cI.setState(function(n){var i,r=[e].concat(function(e){if(Array.isArray(e))return cA(e)}(i=null!=t?t:n.openWorkspaces)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return cA(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cA(e,t)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=cR(e);return c$(cw({},n),{openWorkspaces:r,workspaceWindowState:a})})}o&&cq(o,t);var c=cI.getState().openWorkspaces,u=c.findIndex(function(t){return t.name===e}),p=c.find(function(e){return e.type==s.type});if(0===c.length)l(s);else if(c[0].canHide||0===u)if(u>=0){var d=c[u];d.title===cG(d,d.additionalProps)&&(d.title=cG(s,s.additionalProps)),d.additionalProps=s.additionalProps;var f=c.filter(function(t){return t.name!=e});l(c[u],f)}else p?(l(p,cI.getState().openWorkspaces.filter(function(e){return e.type!=s.type})),cC(p,{name:e,additionalProps:t})):l(s);else cC(c[0],{name:e,additionalProps:t})}function cD(e){var t=e.targetUrl,n=e.contextKey,i=e.workspaceName,r=e.additionalProps;cO(n),cE(i,r),(0,cv.oo)({to:t})}var cS={};function cB(e,t){cS[e]=t}function cz(e){return cS[e]}function cP(){var e=cI.getState();cI.setState(c$(cw({},e),{prompt:null}))}var cT={ignoreChanges:!1,onWorkspaceClose:function(){},closeWorkspaceGroup:!0};function cM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=cw({},cT,n);var i=function(){var t,i,r=cI.getState();r.openWorkspaces.find(function(t){return t.name===e});var a=r.openWorkspaces.filter(function(t){return t.name!=e}),o=null==(t=cI.getState().workspaceGroup)?void 0:t.name;o&&n.closeWorkspaceGroup&&cx(o),cS[e]=function(){return!1},cI.setState(function(e){return c$(cw({},e),{prompt:null,openWorkspaces:a,workspaceWindowState:cR(null==a?void 0:a[0])})}),null==n||null==(i=n.onWorkspaceClose)||i.call(n)};return ck(e,null==n?void 0:n.ignoreChanges)?(i(),!0):(cH("closing-workspace",i,null!=(t=(0,lO.Xb)(e).title)?t:e),!1)}function cO(e){cI.getState().context!=e&&cI.setState({context:e,openWorkspaces:[],prompt:null})}var cF={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},cI=(0,lM.Zd)("workspace",cF);function cN(){return cI}function cj(e){var t=cI.getState();cI.setState(c$(cw({},t),{workspaceWindowState:e}))}function cR(e){var t;return null!=(t=null==e?void 0:e.preferredWindowSize)?t:"normal"}function cL(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=cI.getState().openWorkspaces.filter(t).every(function(e){return ck(e.name)}),i=function(){cU(),null==e||e()};n?i():cH("closing-all-workspaces",i)}function cV(){var e=(0,k.Pj)(cI),t=e.workspaceWindowState,n=e.openWorkspaces,i=e.prompt,r=e.workspaceGroup;return(0,v.useMemo)(function(){return{active:n.length>0,prompt:i,workspaceWindowState:t,workspaces:n,workspaceGroup:r}},[n,t,i,r])}function cH(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";switch(e){case"closing-workspace":t={title:(0,sq.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,sq.V)("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:function(){null==n||n()},confirmText:(0,sq.V)("discard","Discard")};break;case"closing-all-workspaces":var r=cI.getState().openWorkspaces.filter(function(e){return!ck(e.name)}).map(function(e,t){var n=e.title;return"".concat(t+1,". ").concat(n)});t={title:(0,sq.V)("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:(0,sq.V)("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:r.join(",")}),onConfirm:function(){null==n||n()},confirmText:(0,sq.V)("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:r.length})};break;case"closing-workspace-launching-new-workspace":t={title:(0,sq.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,sq.V)("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:i}),onConfirm:function(){cI.setState(function(e){return c$(cw({},e),{prompt:null})}),null==n||n()},confirmText:(0,sq.V)("openAnyway","Open anyway")};break;default:console.error('Workspace system trying to open unknown prompt type "'.concat(e,'" in function "showWorkspacePrompts"')),null==n||n();return}cI.setState(function(e){return c$(cw({},e),{prompt:t})})}function cG(e,t){var n;return null!=(n=null==t?void 0:t.workspaceTitle)?n:e.title}function cU(){cI.setState(cF)}function cq(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&"default"!==e){var n=(0,lM.jf)(e,{});return t&&n.setState(function(e){return cw({},e,t)}),n}}var cW=n(33794),cK={};cK.styleTagTransform=F(),cK.setAttributes=P(),cK.insert=B().bind(null,"head"),cK.domAPI=D(),cK.insertStyleElement=M(),C()(cW.A,cK);let cY=cW.A&&cW.A.locals?cW.A.locals:void 0;function cJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cZ(e){var t=e.getIcon,n=e.formOpenInTheBackground,i=e.tagContent;return A().createElement(A().Fragment,null,t({size:16}),n?A().createElement("span",{className:cY.interruptedTag},"!"):A().createElement("span",{className:cY.countTag},i))}var cX=function(e){var t,n=e.getIcon,i=e.label,r=e.iconDescription,a=e.handler,o=e.type,s=e.tagContent,l=(0,k.qv)(),c=cV(),u=c.workspaces,p=c.workspaceWindowState,d=null!=(t=null==u?void 0:u.findIndex(function(e){return e.type===o}))?t:-1,f="hidden"!==p&&0===d,m=d>0||0===d&&"hidden"===p;return"tablet"===l||"phone"===l?A().createElement(sG.Button,{className:$()(cY.container,cJ({},cY.active,f)),iconDescription:r,kind:"ghost",onClick:a,role:"button",tabIndex:0,size:"md"},A().createElement("span",{className:cY.elementContainer},A().createElement(cZ,{formOpenInTheBackground:m,getIcon:n,tagContent:s})),A().createElement("span",null,i)):A().createElement(sG.IconButton,{align:"left","aria-label":r,className:$()(cY.container,cJ({},cY.active,f)),enterDelayMs:300,kind:"ghost",label:i,onClick:a,size:"md"},A().createElement("div",{className:cY.elementContainer},A().createElement(cZ,{formOpenInTheBackground:m,getIcon:n,tagContent:s})))},cQ=n(54240),c0=n(68622),c1=n(1158),c2=/[\\^$.*+?()[\]{}|]/g,c3=RegExp(c2.source);let c4=function(e){return(e=(0,c1.A)(e))&&c3.test(e)?e.replace(c2,"\\$&"):e};var c5=n(72114),c6={};c6.styleTagTransform=F(),c6.setAttributes=P(),c6.insert=B().bind(null,"head"),c6.domAPI=D(),c6.insertStyleElement=M(),C()(c5.A,c6);let c7=c5.A&&c5.A.locals?c5.A.locals:void 0;function c8(e){var t,n,i=e.contextKey,r=(0,V.useTranslation)().t,a=cV().prompt;return(0,v.useEffect)(function(){new RegExp("/".concat(c4(i),"(/|$)")).test(window.location.pathname)||(0,lF.N)('WorkspaceContainer has provided an invalid context key: "'.concat(i,'". The context key must be part of the URL path, with no initial or trailing slash.'))},[]),(0,v.useEffect)(function(){return cO(i),function(){cO(null)}},[i]),(0,v.useEffect)(function(){var e=function(e){var t=e.detail,n=t.cancelNavigation,r=t.newUrl,a=new RegExp("/".concat(c4(i),"(/|$)")),o=new URL(r),s=a.test(o.pathname),l=cI.getState().openWorkspaces.every(function(e){return ck(e.name)});s||(l?cU():(null==n||n(),cL(function(){(0,cv.oo)({to:r})})))};return window.addEventListener("single-spa:before-routing-event",e),function(){window.removeEventListener("single-spa:before-routing-event",e)}},[]),null!=a?A().createElement(sG.ComposedModal,{open:!0,onClose:cP},A().createElement(sG.ModalHeader,{title:a.title}),A().createElement(sG.ModalBody,null,A().createElement("p",{className:c7.messageBody},a.body)),A().createElement(sG.ModalFooter,null,A().createElement(sG.Button,{kind:"secondary",onClick:cP},null!=(t=a.cancelText)?t:r("cancel","Cancel")),A().createElement(sG.Button,{kind:"danger",onClick:a.onConfirm},null!=(n=a.confirmText)?n:r("confirm","Confirm")))):null}var c9=n(6309);function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(t){ui(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ur(e){return(ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ua(e,t){return(ua=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uo(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var us=function(e){var t=v.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&ua(o,t);var n,i,r,a=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=ur(o);e=n?Reflect.construct(t,arguments,ur(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return uo(this)});function o(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),ui(uo(t=a.call(this,e)),"handleRef",function(e){t.el=e}),ui(uo(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),ui(uo(t),"getParcelProps",function(){var e=ut(ut({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return i=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,ut({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return c9.i&&c9.i.Consumer?v.createElement(c9.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=c9.i&&c9.i.Consumer?v.createElement(c9.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return v.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],un(o.prototype,i),r&&un(o,r),o}();ui(us,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var ul=n(1668),uc={};uc.styleTagTransform=F(),uc.setAttributes=P(),uc.insert=B().bind(null,"head"),uc.domAPI=D(),uc.insertStyleElement=M(),C()(ul.A,uc);let uu=ul.A&&ul.A.locals?ul.A.locals:void 0;function up(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return up(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return up(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function um(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function uh(e){var t,n,i,r,a,o,s,l,c=e.workspace,u=e.additionalPropsFromPage,p=(t=(0,v.useState)(),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return uf(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uf(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=p[0],f=p[1],m=(n=c.currentWorkspaceGroup,r=(i=ud((0,v.useState)({}),2))[0],a=i[1],s=(o=ud((0,v.useState)(n),2))[0],l=o[1],(0,v.useEffect)(function(){s!==n&&l(n)},[n]),(0,v.useEffect)(function(){var e,t=cq(s);return t&&(a(t.getState()),e=t.subscribe(a)),function(){t&&(null==e||e())}},[s]),r);(0,v.useEffect)(function(){var e=!0;return c.load().then(function(t){e&&f(t)}),function(){e=!1}},[c]);var h=(0,v.useMemo)(function(){return c&&um({closeWorkspace:c.closeWorkspace,closeWorkspaceWithSavedChanges:c.closeWorkspaceWithSavedChanges,promptBeforeClosing:c.promptBeforeClosing,setTitle:c.setTitle},u,m,c.additionalProps)},[c,u,m]);return d?A().createElement(us,um({key:c.name,config:d,mountParcel:lT.xL},h)):A().createElement(sG.InlineLoading,{className:uu.loader,description:"".concat((0,sq.V)("loading","Loading")," ...")})}var u_=n(43193),ug={};ug.styleTagTransform=F(),ug.setAttributes=P(),ug.insert=B().bind(null,"head"),ug.domAPI=D(),ug.insertStyleElement=M(),C()(u_.A,ug);let uy=u_.A&&u_.A.locals?u_.A.locals:void 0;function ub(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uA(e){var t,n,i=e.isWithinWorkspace,r=e.name,a=e.actionMenuProps,o=(t=(0,v.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return ub(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ub(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],l=o[1],c=(0,v.useRef)(window.innerHeight),u=(0,v.useContext)(k.zq).featureName,p=(0,k.qv)();return(0,v.useEffect)(function(){var e=function(){l(!(0,k.xl)(p)&&c.current>window.innerHeight),c.current!=window.innerHeight&&(c.current=window.innerHeight)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[c]),A().createElement("aside",{className:$()(uy.sideRail,(uv(n={},uy.withinWorkspace,i),uv(n,uy.sideRailHidden,s),uv(n,uy.sideRailVisible,!s),n))},A().createElement("div",{className:uy.container},A().createElement(k.W3,{className:uy.chartExtensions,name:"action-menu-".concat(r&&"default"!=r?r:u,"-items-slot"),state:void 0===a?{}:a})))}function uw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u$(e){var t,n,i,r=e.contextKey,a=e.overlay,o=e.showSiderailAndBottomNav,s=e.additionalWorkspaceProps,l=e.actionMenuProps,c=(0,k.qv)(),u=cV(),p=u.workspaces,d=u.workspaceWindowState,f=u.workspaceGroup,m=null==f?void 0:f.name,h=p[0],g="hidden"===d||null==h,y=null!=(t=null==h?void 0:h.width)?t:a?"wider":"narrow",b=(0,v.useMemo)(function(){return o||m&&!g},[m,g,o]);return(0,k.yJ)(!g&&!(0,k.xl)(c)),A().createElement(A().Fragment,null,A().createElement("div",{className:o?uu.workspaceContainerWithActionMenu:uu.workspaceContainerWithoutActionMenu},A().createElement("aside",{className:$()(a?uu.workspaceOverlayOuterContainer:uu.workspaceWindowSpacer,(uw(n={},uu.hiddenRelative,g),uw(n,uu.narrowWorkspace,"narrow"===y),uw(n,uu.widerWorkspace,"wider"===y),uw(n,uu.extraWideWorkspace,"extra-wide"===y),n))},A().createElement("div",{className:$()(uu.workspaceFixedContainer,(uw(i={},uu.maximizedWindow,"maximized"===d),uw(i,uu.hiddenFixed,g),i))},p.map(function(e,t){return A().createElement("div",{key:"workspace-container-".concat(e?e.name:"empty-".concat(t)),className:$()(uu.workspaceInnerContainer,uw({},uu.hiddenExtraWorkspace,0!==t))},A().createElement(v.Suspense,{fallback:null},A().createElement(V.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName},A().createElement(uk,{workspaceInstance:e,additionalWorkspaceProps:s}))))}))),A().createElement(c8,{contextKey:r})),b&&A().createElement(uA,{name:m,isWithinWorkspace:!o,actionMenuProps:l}))}function uk(e){var t,n=e.workspaceInstance,i=e.additionalWorkspaceProps,r=(0,V.useTranslation)().t,a=(0,k.qv)(),o=cV(),s=o.workspaceWindowState,l=o.workspaceGroup,c=null==l?void 0:l.name,u="maximized"===s;(0,v.useEffect)(function(){var e=r(n.title);e!==n.title&&n.setTitle(e)},[n.title,r,n.setTitle]);var p=(0,v.useContext)(k.zq).featureName,d=(0,v.useCallback)(function(){cj(u?"normal":"maximized")},[u]),f=(0,v.useMemo)(function(){return null!=n?n:{}},[n]),m=f.canHide,h=void 0!==m&&m,g=f.canMaximize,y=f.currentWorkspaceGroup,b=f.closeWorkspace,w=(0,v.useMemo)(function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){uw(e,t,n[t])})}return e}({},i,null==n?void 0:n.additionalProps)},[i,n]);return n&&A().createElement(A().Fragment,null,A().createElement(sG.Header,{"aria-label":(0,sq.V)("workspaceHeader","Workspace Header"),className:uu.header},!(0,k.xl)(a)&&!h&&A().createElement(sG.HeaderMenuButton,{"aria-label":(0,sq.V)("close","Close"),renderMenuIcon:A().createElement(aT,null),onClick:function(){return b()}}),A().createElement(sG.HeaderName,{prefix:""},null!=(t=n.titleNode)?t:r(n.title)),A().createElement("div",{className:uu.overlayHeaderSpacer}),A().createElement(sG.HeaderGlobalBar,{className:uu.headerButtons},A().createElement(k.W3,{name:"workspace-header-group-".concat(n.currentWorkspaceGroup,"-slot"),state:w}),A().createElement(k.W3,{name:"workspace-header-type-".concat(n.type,"-slot"),state:w}),A().createElement(k.W3,{name:"workspace-header-".concat(p,"-slot"),state:w}),(0,k.xl)(a)&&A().createElement(A().Fragment,null,(void 0!==g&&g||u)&&A().createElement(sG.HeaderGlobalAction,{"aria-label":u?(0,sq.V)("minimize","Minimize"):(0,sq.V)("maximize","Maximize"),onClick:d},u?A().createElement(cQ.Xj,null):A().createElement(cQ.hz,null)),h&&!c?A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("hide","Hide"),onClick:function(){return cj("hidden")}},A().createElement(aM,null)):A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("close","Close"),onClick:function(){return null==b?void 0:b()}},A().createElement(aQ,null))),"tablet"===a&&h&&A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("close","Close"),onClick:function(){return null==b?void 0:b()}},A().createElement(c0.d3,null)))),A().createElement("div",{className:$()(uu.workspaceContent,uw({},uu.marginWorkspaceContent,!!(void 0===y?"":y)))},A().createElement(uh,{key:n.name,workspace:n,additionalPropsFromPage:i})))}var ux=n(94538),uC={};uC.styleTagTransform=F(),uC.setAttributes=P(),uC.insert=B().bind(null,"head"),uC.domAPI=D(),uC.insertStyleElement=M(),C()(ux.A,uC);let uE=ux.A&&ux.A.locals?ux.A.locals:void 0;function uD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uD(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var uz=function(e){var t,n=e.snackbar,i=e.closeSnackbar,r=n.actionButtonLabel,a=n.kind,o=void 0===a?"success":a,s=n.onActionButtonClick,l=void 0===s?function(){}:s,c=n.isLowContrast,u=n.progressActionLabel,p=n.subtitle,d=n.timeoutInMs,f=void 0===d?5e3:d,m=n.autoClose,h=void 0===m?"error"!==o:m,g=n.title,y=(n.id,function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,["actionButtonLabel","kind","onActionButtonClick","isLowContrast","progressActionLabel","subtitle","timeoutInMs","autoClose","title","id"])),b=uB((0,v.useState)(void 0===r?"":r),2),w=b[0],k=b[1],x=uB((0,v.useState)(!0),2),C=x[0],E=x[1],D=uB((0,v.useState)(!1),2),S=D[0],B=D[1],z=(0,v.useCallback)(function(){setTimeout(i,250)},[i]),P=(0,v.useCallback)(function(){B(!0),z()},[z]);return(0,v.useEffect)(function(){if(h){var e=setTimeout(P,f);return function(){return clearTimeout(e)}}},[f,h,P]),(0,v.useEffect)(function(){E(!1),window.setTimeout(function(){E(!0)},0)},[]),A().createElement(sG.ActionableNotification,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){uS(e,t,n[t])})}return e}({actionButtonLabel:w,"aria-label":"Close snackbar",className:$()(uE.slideIn,(uS(t={},uE.animated,C),uS(t,uE.slideOut,S),t)),inline:!0,kind:o,lowContrast:void 0===c?"error"!==o:c,onActionButtonClick:function(){l(),P(),u&&k(u)},onClose:z,statusIconDescription:"Snackbar notification",subtitle:void 0===p?"":p,title:g},y))};function uP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uT(e,t){if(e){if("string"==typeof e)return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}let uM=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||uT(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1],o=(0,v.useCallback)(function(e){a(function(t){return t.filter(function(t){return t!==e})})},[]);return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return uP(e)})(n=t.filter(function(t){return t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||uT(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(uz,{key:e.id,snackbar:e,closeSnackbar:function(){return o(e)}})}))};var uO=new s4.B7,uF=0;function uI(e){e&&(0,lm.createRoot)(e).render(A().createElement(uM,{subject:uO}))}function uN(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(function(){var t,n;uO.next((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},e),n=n={id:uF++},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}var uj=function(e){var t=e.children;return"tablet"===(0,k.qv)()?A().createElement(sG.Layer,null,t):A().createElement(A().Fragment,null,t)},uR=n(25391);let uL="failing",uV=function(){try{return"localStorage"in window&&window.localStorage}catch(e){return!1}}();class uH{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cachePrefix:t="react-avatar/",sourceTTL:n=6048e5,sourceSize:i=20}=e;this.cachePrefix=t,this.sourceTTL=n,this.sourceSize=i}set(e,t){if(uV){t=JSON.stringify(t);try{localStorage.setItem(this.cachePrefix+e,t)}catch(e){console.error(e)}}}get(e){if(!uV)return null;let t=localStorage.getItem(this.cachePrefix+e);return t?JSON.parse(t):null}sourceFailed(e){let t=this.get(uL)||[];return(t=t.filter(t=>{let n=t.expires>0&&t.expires<Date.now(),i=t===e||t.url==e;return!n&&!i})).unshift({url:e,expires:Date.now()+this.sourceTTL}),t=t.slice(0,this.sourceSize-1),this.set(uL,t)}hasSourceFailedBefore(e){return(this.get(uL)||[]).some(t=>{let n=t.expires>0&&t.expires<Date.now();return(t===e||t.url==e)&&!n})}}let uG=new uH;var uU=n(93442),uq=n(39067),uW=n.n(uq),uK=n(18946);let uY=n.n(uK)()(),uJ=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],uZ=/^([-+]?(?:\d+(?:\.\d+)?|\.\d+))([a-z]{2,4}|%)?$/;function uX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uJ;if(!e)return"transparent";let n=function(e,t){let n=[...e].map(e=>e.charCodeAt(0)),i=n.length,r=i%(t-1)+1,a=n.reduce((e,t)=>e+t)%t,o=n[0]%t;for(let e=0;e<i;e++)o=(r*o+a)%t;return o}(e,t.length);return t[n]}function uQ(e){e=""+e;let[,t=0,n="px"]=uZ.exec(e)||[];return{value:parseFloat(t),str:t+n,unit:n}}function u0(e){return e=isNaN((e=uQ(e)).value)?512:"px"===e.unit?e.value:512*(0!==e.value),uY&&(e*=2),e}function u1(e,t){let{maxInitials:n}=t;return e.split(/\s/).map(e=>e.substring(0,1).toUpperCase()).filter(e=>!!e).slice(0,n).join("").toUpperCase()}let u2={};function u3(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e of t){if(e||""===e)return e;if(!1===e||null===e)return null}}function u4(e){return!0===e?"100%":!1!==e?e:void 0}let u5={cache:uG,colors:uJ,initials:u1,avatarRedirectUrl:null},u6=Object.keys(u5),u7=A().createContext&&A().createContext(),u8=!u7,u9=u8?null:u7.Consumer,pe=A().forwardRef||(e=>e);class pt extends A().Component{_getContext(){let e={};return u6.forEach(t=>{void 0!==this.props[t]&&(e[t]=this.props[t])}),e}render(){let{children:e}=this.props;return u8?A().Children.only(e):A().createElement(u7.Provider,{value:this._getContext()},A().Children.only(e))}}(0,uU.A)(pt,"displayName","ConfigProvider"),(0,uU.A)(pt,"propTypes",{cache:uW().object,colors:uW().arrayOf(uW().string),initials:uW().func,avatarRedirectUrl:uW().string,children:uW().node});let pn=e=>{function t(t,n){if(u8){let i=n&&n.reactAvatar;return A().createElement(e,(0,uR.A)({},u5,i,t))}return A().createElement(u9,null,i=>A().createElement(e,(0,uR.A)({ref:n},u5,i,t)))}return t.contextTypes=pt.childContextTypes,pe(t)};u8&&(pt.childContextTypes={reactAvatar:uW().object},pt.prototype.getChildContext=function(){return{reactAvatar:this._getContext()}});class pi{constructor(){this.sourcePointer=0,this.active=!0,this.fetch=null}isActive(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.internal===this&&!!this.fetch&&!0===this.active}}class pr extends A().PureComponent{render(){let{className:e,unstyled:t,round:n,style:i,avatar:r,onClick:a,children:o}=this.props,{sourceName:s}=r,l=uQ(this.props.size),c=t?null:{display:"inline-block",verticalAlign:"middle",width:l.str,height:l.str,borderRadius:u4(n),fontFamily:"Helvetica, Arial, sans-serif",...i},u=[e,"sb-avatar"];if(s){let e=s.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"");u.push("sb-avatar--"+e)}return A().createElement("div",{className:u.join(" "),onClick:a,style:c},o)}}(0,uU.A)(pr,"propTypes",{className:uW().string,round:uW().oneOfType([uW().bool,uW().string]),style:uW().object,size:uW().oneOfType([uW().number,uW().string]),unstyled:uW().bool,avatar:uW().object,onClick:uW().func,children:uW().node});class pa extends A().PureComponent{render(){let{className:e,round:t,unstyled:n,alt:i,title:r,name:a,value:o,avatar:s}=this.props,l=uQ(this.props.size),c=n?null:{maxWidth:"100%",width:l.str,height:l.str,borderRadius:u4(t)};return A().createElement(pr,this.props,A().createElement("img",{className:e+" sb-avatar__image",width:l.str,height:l.str,style:c,src:s.src,alt:u3(i,a||o),title:u3(r,a||o),onError:s.onRenderFailed}))}}(0,uU.A)(pa,"propTypes",{alt:uW().oneOfType([uW().string,uW().bool]),title:uW().oneOfType([uW().string,uW().bool]),name:uW().string,value:uW().string,avatar:uW().object,className:uW().string,unstyled:uW().bool,round:uW().oneOfType([uW().bool,uW().string,uW().number]),size:uW().oneOfType([uW().number,uW().string])}),(0,uU.A)(pa,"defaultProps",{className:"",round:!1,size:100,unstyled:!1});class po extends A().PureComponent{constructor(){var e;super(...arguments),e=this,(0,uU.A)(this,"_scaleTextNode",function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,{unstyled:i,textSizeRatio:r,textMarginRatio:a,avatar:o}=e.props;if(e._node=t,!t||!t.parentNode||i||o.src||!e._mounted)return;let s=t.parentNode,l=s.parentNode,{width:c,height:u}=s.getBoundingClientRect();if(0==c&&0==u){let i=Math.min(1.5*n,500);!function(e,t){if(u2[t])return u2[t].push(e);let n=u2[t]=[e];setTimeout(()=>{delete u2[t],n.forEach(e=>e())},t)}(()=>e._scaleTextNode(t,i),i);return}l.style.fontSize||(l.style.fontSize="".concat(u/r,"px")),s.style.fontSize=null;let{width:p}=t.getBoundingClientRect();if(p<0)return;let d=c*(1-2*a);p>d&&(s.style.fontSize="calc(1em * ".concat(d/p,")"))})}componentDidMount(){this._mounted=!0,this._scaleTextNode(this._node)}componentWillUnmount(){this._mounted=!1}render(){let{className:e,round:t,unstyled:n,title:i,name:r,value:a,avatar:o}=this.props,s=uQ(this.props.size),l=n?null:{width:s.str,height:s.str,lineHeight:"initial",textAlign:"center",color:this.props.fgColor,background:o.color,borderRadius:u4(t)},c=[o.value,this.props.size].join("");return A().createElement(pr,this.props,A().createElement("div",{className:e+" sb-avatar__text",style:l,title:u3(i,r||a)},A().createElement("div",{style:n?null:{display:"table",tableLayout:"fixed",width:"100%",height:"100%"}},A().createElement("span",{style:n?null:{display:"table-cell",verticalAlign:"middle",fontSize:"100%",whiteSpace:"nowrap"}},A().createElement("span",{ref:this._scaleTextNode,key:c},o.value)))))}}(0,uU.A)(po,"propTypes",{name:uW().string,value:uW().string,avatar:uW().object,title:uW().oneOfType([uW().string,uW().bool]),className:uW().string,unstyled:uW().bool,fgColor:uW().string,textSizeRatio:uW().number,textMarginRatio:uW().number,round:uW().oneOfType([uW().bool,uW().string,uW().number]),size:uW().oneOfType([uW().number,uW().string])}),(0,uU.A)(po,"defaultProps",{className:"",fgColor:"#FFF",round:!1,size:100,textSizeRatio:3,textMarginRatio:.15,unstyled:!1});var ps=n(89150),pl=n.n(ps);class pc{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.email||!!this.props.md5Email),(0,uU.A)(this,"get",e=>{let{props:t}=this,n=t.md5Email||pl()(t.email),i=u0(t.size),r="https://secure.gravatar.com/avatar/".concat(n,"?d=404");i&&(r+="&s=".concat(i)),e({sourceName:"gravatar",src:r})}),this.props=e}}(0,uU.A)(pc,"propTypes",{email:uW().string,md5Email:uW().string});class pu{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.facebookId),(0,uU.A)(this,"get",e=>{let{facebookId:t}=this.props,n=u0(this.props.size),i="https://graph.facebook.com/".concat(t,"/picture");n&&(i+="?width=".concat(n,"&height=").concat(n)),e({sourceName:"facebook",src:i})}),this.props=e}}(0,uU.A)(pu,"propTypes",{facebookId:uW().string});class pp{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.githubHandle),(0,uU.A)(this,"get",e=>{let{githubHandle:t}=this.props,n=u0(this.props.size),i="https://avatars.githubusercontent.com/".concat(t,"?v=4");n&&(i+="&s=".concat(n)),e({sourceName:"github",src:i})}),this.props=e}}(0,uU.A)(pp,"propTypes",{githubHandle:uW().string});class pd{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.skypeId),(0,uU.A)(this,"get",e=>{let{skypeId:t}=this.props;e({sourceName:"skype",src:"https://api.skype.com/users/".concat(t,"/profile/avatar")})}),this.props=e}}(0,uU.A)(pd,"propTypes",{skypeId:uW().string});class pf{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!(this.props.name||this.props.value||this.props.email)),(0,uU.A)(this,"get",e=>{let t=this.getValue();if(!t)return e(null);e({sourceName:"text",value:t,color:this.getColor()})}),this.props=e}getInitials(){let{name:e,initials:t}=this.props;return"string"==typeof t?t:"function"==typeof t?t(e,this.props):u1(e,this.props)}getValue(){return this.props.name?this.getInitials():this.props.value?this.props.value:null}getColor(){let{color:e,colors:t,name:n,email:i,value:r}=this.props;return e||uX(n||i||r,t)}}(0,uU.A)(pf,"propTypes",{color:uW().string,name:uW().string,value:uW().string,email:uW().string,maxInitials:uW().number,initials:uW().oneOfType([uW().string,uW().func])});class pm{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.src),(0,uU.A)(this,"get",e=>{e({sourceName:"src",src:this.props.src})}),this.props=e}}(0,uU.A)(pm,"propTypes",{src:uW().string});class ph{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"icon","✷"),(0,uU.A)(this,"isCompatible",()=>!0),(0,uU.A)(this,"get",e=>{let{color:t,colors:n}=this.props;e({sourceName:"icon",value:this.icon,color:t||uX(this.icon,n)})}),this.props=e}}function p_(e,t){var n;return n=class{constructor(n){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.avatarRedirectUrl&&!!this.props[t]),(0,uU.A)(this,"get",n=>{let{avatarRedirectUrl:i}=this.props,r=u0(this.props.size),a=i.replace(/\/*$/,"/"),o=this.props[t],s="".concat(a).concat(e,"/").concat(o,"?").concat(r?"size=".concat(r):"");n({sourceName:e,src:s})}),this.props=n}},(0,uU.A)(n,"propTypes",{[t]:uW().oneOfType([uW().string,uW().number])}),n}(0,uU.A)(ph,"propTypes",{color:uW().string});let pg=p_("twitter","twitterHandle"),py=p_("vkontakte","vkontakteId"),pb=p_("instagram","instagramId"),pv=(l=function(e){let{sources:t=[]}=e,n=t.reduce((e,t)=>Object.assign(e,t.propTypes),{});class i extends v.PureComponent{constructor(e){super(e),(0,uU.A)(this,"_createFetcher",e=>n=>{let{cache:i}=this.props;if(!e.isActive(this.state))return;n&&"error"===n.type&&i.sourceFailed(n.target.src);let r=e.sourcePointer;if(t.length===r)return;let a=t[r];e.sourcePointer++,function(e,t,n){let{cache:i}=t,r=new e(t);if(!r.isCompatible(t))return n();r.get(e=>{!(e&&e.src&&i.hasSourceFailedBefore(e.src))&&e?n(e):n()})}(a,this.props,t=>{if(!t)return setTimeout(e.fetch,0);e.isActive(this.state)&&(t={src:null,value:null,color:null,...t},this.setState(n=>e.isActive(n)?t:{}))})}),(0,uU.A)(this,"fetch",()=>{let e=new pi;e.fetch=this._createFetcher(e),this.setState({internal:e},e.fetch)}),this.state={internal:null,src:null,value:null,color:e.color}}componentDidMount(){this.fetch()}componentDidUpdate(e){let t=!1;for(let i in n)t=t||e[i]!==this.props[i];t&&setTimeout(this.fetch,0)}componentWillUnmount(){this.state.internal&&(this.state.internal.active=!1)}render(){let{children:e,propertyName:t}=this.props,{src:n,value:i,color:r,sourceName:a,internal:o}=this.state,s={src:n,value:i,color:r,sourceName:a,onRenderFailed:()=>o&&o.fetch()};if("function"==typeof e)return e(s);let l=A().Children.only(e);return A().cloneElement(l,{[t]:s})}}return(0,uU.A)(i,"displayName","AvatarDataProvider"),(0,uU.A)(i,"propTypes",{...n,cache:uW().object,propertyName:uW().string}),(0,uU.A)(i,"defaultProps",{propertyName:"avatar"}),(0,uU.A)(i,"Cache",uH),(0,uU.A)(i,"ConfigProvider",pt),Object.assign(pn(i),{ConfigProvider:pt,Cache:uH})}({sources:[pu,p_("google","googleId"),pp,pg,pb,py,pd,pc,pm,pf,ph]}),Object.assign(pn(A().forwardRef((e,t)=>A().createElement(l,(0,uR.A)({},e,{propertyName:"avatar"}),n=>{let i=n.src?pa:po;return A().createElement(i,(0,uR.A)({},e,{avatar:n,ref:t}))}))),{getRandomColor:uX,ConfigProvider:pt,Cache:uH}));var pA=n(35570),pw=n.n(pA),p$=n(13624);function pk(e){var t,n,i,r=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).patientPhotoConceptUuid,a=r?"".concat(s3.Jj,"/obs?patient=").concat(e,"&concept=").concat(r,"&v=full"):null,o=(0,p$.Ay)(e?a:null,s3.lo),s=o.data,l=o.error,c=o.isLoading,u=null==s||null==(t=s.data)?void 0:t.results[0];return{data:u?{dateTime:null==u?void 0:u.obsDatetime,imageSrc:null==u||null==(i=u.value)||null==(n=i.links)?void 0:n.uri}:null,error:l,isLoading:c}}let px=function(e){var t=e.width,n=e.height,i=(0,V.useTranslation)().t;return A().createElement("svg",{"aria-label":i("patientPhotoPlaceholder","Patient photo placeholder"),width:void 0===t?56:t,height:void 0===n?56:n,fill:"none",xmlns:"http://www.w3.org/2000/svg"},A().createElement("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),A().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"}))};var pC=n(20921),pE={};pE.styleTagTransform=F(),pE.setAttributes=P(),pE.insert=B().bind(null,"head"),pE.domAPI=D(),pE.insertStyleElement=M(),C()(pC.A,pE);let pD=pC.A&&pC.A.locals?pC.A.locals:void 0;function pS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function pB(e){var t,n=e.patientUuid,i=e.patientName,r=(0,V.useTranslation)().t,a=pk(n),o=a.data,s=a.isLoading,l=(t=(0,v.useState)(null),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return pS(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pS(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],p=(0,v.useMemo)(function(){return pw().generate(n)},[n]);(0,v.useEffect)(function(){if(null==o?void 0:o.imageSrc){var e=new Image;e.onload=function(){return u(o.imageSrc)},e.onerror=function(){return u(null)},e.src=o.imageSrc}},[null==o?void 0:o.imageSrc]);var d=r("avatarAltText","Profile photo unavailable - grey placeholder image");return s?A().createElement(sG.SkeletonIcon,{className:pD.skeleton,"data-testid":"skeleton-icon"}):(null==o?void 0:o.imageSrc)&&!c?A().createElement(px,null):A().createElement(pv,{alt:d,color:"rgba(0,0,0,0)",maxInitials:3,name:i,size:"56",src:null!=c?c:void 0,style:c?void 0:{backgroundImage:p.toDataUrl(),backgroundRepeat:"round"},textSizeRatio:2})}var pz=n(13489),pP={};pP.styleTagTransform=F(),pP.setAttributes=P(),pP.insert=B().bind(null,"head"),pP.domAPI=D(),pP.insertStyleElement=M(),C()(pz.A,pP);let pT=pz.A&&pz.A.locals?pz.A.locals:void 0;var pM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),pO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-home",pictogramProps:e})})),pF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),pI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),pN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-patient-lists",pictogramProps:e})})),pj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),pR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),pL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),pV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),pH=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.pictogram,i=e.fallback,r=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["pictogram","fallback"]),a=(0,v.useRef)(document.getElementById(n));return(0,v.useEffect)(function(){var e=document.getElementById("omrs-svgs-container"),t=new MutationObserver(function(e){var t=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var l=o.value;"childList"===l.type&&(a.current=document.getElementById(n))}}catch(e){i=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(i)throw r}}});return e&&t.observe(e,{childList:!0}),function(){return t.disconnect()}},[n]),A().createElement(k.fS,{value:a.current,fallback:i},A().createElement(pG,{ref:t,pictogram:n,pictogramProps:r}))})),pG=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.pictogram,i=Object.assign({},{size:92},e.pictogramProps),r=i.className,a=i.size;return(a<=26||a>144)&&(console.error("Invalid size '".concat(a,"' specified for ").concat(n,". Defaulting to 92.")),a=92),A().createElement("svg",{ref:t,className:$()(pT.pictogram,r),height:a,width:a},A().createElement("use",{href:"#".concat(n)}))}));function pU(e){var t=e.showContactDetails,n=e.toggleContactDetails,i=e.className;return A().createElement(sG.Button,{className:i,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:t?aJ:aW},t?(0,sq.V)("showLess","Show less"):(0,sq.V)("showMore","Show more"))}var pq=function(e){var t,n=(0,s1.A)("".concat(s3.Jj,"/patient/").concat(e,"?v=").concat("custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))"),s3.lo),i=n.data,r=n.error;return{isLoading:n.isLoading,attributes:null!=(t=null==i?void 0:i.data.person.attributes)?t:[],error:r}},pW=function(e){var t=(0,k.UK)({externalModuleName:"@openmrs/esm-patient-banner-app"}).contactAttributeTypes,n=void 0===t?[]:t,i=pq(e),r=i.attributes,a=i.error,o=i.isLoading;return{contactAttributes:(0,v.useMemo)(function(){return r.filter(function(e){var t=e.attributeType;return null==n?void 0:n.some(function(e){return t.uuid===e})})},[r,n]),isLoading:o,error:a}},pK=n(25377),pY={};pY.styleTagTransform=F(),pY.setAttributes=P(),pY.insert=B().bind(null,"head"),pY.domAPI=D(),pY.insertStyleElement=M(),C()(pK.A,pY);let pJ=pK.A&&pK.A.locals?pK.A.locals:void 0;function pZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function pX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||pQ(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pQ(e,t){if(e){if("string"==typeof e)return pZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pZ(e,t)}}var p0=function(e){var t,n,i,r,a,o,s,l,c=(r=(n=e.patientUuid)?"".concat(s3.Jj,"/cohortm/cohortmember?patient=").concat(n,"&v=").concat("custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))"):null,o=(a=(0,p$.Ay)(r,s3.lo)).data,s=a.isLoading,l=null==o||null==(i=o.data)?void 0:i.results.map(function(e){return{uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}}),(0,v.useMemo)(function(){return{cohorts:l,isLoading:s}},[s,l])),u=c.cohorts,p=void 0===u?[]:u,d=c.isLoading;return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("patientLists","Patient Lists")," (",null!=(t=null==p?void 0:p.length)?t:0,")"),d?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,function(){if((null==p?void 0:p.length)>0){var e=p.sort(function(e,t){return(0,aC._U)(null==e?void 0:e.startDate).getTime()-(0,aC._U)(null==t?void 0:t.startDate).getTime()}).slice(0,3);return null==e?void 0:e.map(function(e){return A().createElement("li",{key:e.uuid},A().createElement(k.i_,{to:"".concat(window.spaBase,"/home/patient-lists/").concat(e.uuid),key:e.uuid},e.name))})}return A().createElement("li",null,"--")}(),p.length>3&&A().createElement("li",{className:pJ.link},A().createElement(k.i_,{to:"".concat(window.spaBase,"/home/patient-lists")},(0,sq.V)("seeMoreLists","See {{count}} more lists",{count:(null==p?void 0:p.length)-3})))))},p1=function(e){var t,n=e.patientId,i=(0,k.tQ)(n),r=i.patient,a=i.isLoading,o=null==r||null==(t=r.address)?void 0:t.find(function(e){return"home"===e.use}),s=function(e){return e.split("#")[1]};return a?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("address","Address")),A().createElement("ul",null,o?Object.entries(o).filter(function(e){var t=pX(e,1)[0];return"id"!==t&&"use"!==t}).map(function(e){var t,n,i,r=pX(e,2),a=r[0],l=r[1];return"extension"===a?null==(i=o.extension)||null==(n=i[0])||null==(t=n.extension)?void 0:t.map(function(e,t){return A().createElement("li",{key:"address-".concat(a,"-").concat(t)},(0,sq.V)(s(e.url),s(e.url)),": ",e.valueString)}):A().createElement("li",{key:"address-".concat(a)},(0,sq.V)(a,a),": ",l)}):A().createElement("li",null,"--")))},p2=function(e){var t=pW(e.patientUuid),n=t.isLoading,i=t.contactAttributes,r=(0,v.useMemo)(function(){var e;return i?function(e){if(Array.isArray(e))return pZ(e)}(e=null==i?void 0:i.map(function(e){return[e.attributeType.display?(0,sq.V)(e.attributeType.display,e.attributeType.display):"",e.value]}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pQ(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[]},[i]);return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("contactDetails","Contact Details")),n?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,r.length?r.map(function(e,t){var n=pX(e,2),i=n[0],r=n[1];return A().createElement("li",{key:"".concat(i,"-").concat(r,"-").concat(t)},i,": ",r)}):A().createElement("li",null,"--")))},p3=function(e){var t,n,i,r,a,o,s,l,c,u,p=(t=e.patientId,r="".concat(s3.Jj,"/relationship?v=").concat("custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))","&person=").concat(t),o=(a=(0,p$.Ay)(t?r:null,s3.lo)).data,s=a.error,l=a.isLoading,c=a.isValidating,u=(null==o||null==(i=o.data)||null==(n=i.results)?void 0:n.length)?function(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;e===l.personA.uuid?n.push({uuid:"".concat(l.uuid),display:l.personB.display,relativeAge:l.personB.age,relativeUuid:l.personB.uuid,relationshipType:l.relationshipType.bIsToA}):n.push({uuid:"".concat(l.uuid),display:l.personA.display,relativeAge:l.personA.age,relativeUuid:l.personA.uuid,relationshipType:l.relationshipType.aIsToB})}}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,o.data.results):null,{data:o?u:null,error:s,isLoading:l,isValidating:c}),d=p.data,f=p.isLoading;return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("relationships","Relationships")),f?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,d&&d.length>0?A().createElement(A().Fragment,null,d.map(function(e){return A().createElement("li",{key:e.uuid,className:pJ.relationship},A().createElement("div",null,A().createElement(k.i_,{to:"".concat(window.spaBase,"/patient/").concat(e.relativeUuid,"/chart")},e.display)),A().createElement("div",null,e.relationshipType),A().createElement("div",null,"".concat(e.relativeAge?e.relativeAge:"--"," ").concat(e.relativeAge?1===e.relativeAge?"yr":"yrs":"")))})):A().createElement("li",null,"--")))};function p4(e){var t,n,i=e.patientId,r=e.deceased;return A().createElement("div",{className:$()(pJ.contactDetails,(t={},n=pJ.deceased,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t))},A().createElement("div",{className:pJ.row},A().createElement("div",{className:pJ.col},A().createElement(p1,{patientId:i})),A().createElement("div",{className:pJ.col},A().createElement(p2,{patientUuid:i}))),A().createElement("div",{className:pJ.row},A().createElement("div",{className:pJ.col},A().createElement(p3,{patientId:i})),A().createElement("div",{className:pJ.col},A().createElement(p0,{patientUuid:i}))))}function p5(e){var t=document.querySelector("template#loading-spinner");if(t){var n=t.content.cloneNode(!0),i=Array.prototype.map.call(n.childNodes,function(e){return e});return e.appendChild(n),function(){return i.forEach(function(e){return e.remove()})}}return function(){}}},93296:function(e,t,n){"use strict";var i=n(35400),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useState,o=i.useEffect,s=i.useLayoutEffect,l=i.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(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(),i=a({inst:{value:n,getSnapshot:t}}),r=i[0].inst,u=i[1];return s(function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})},[e,n,t]),o(function(){return c(r)&&u({inst:r}),e(function(){c(r)&&u({inst:r})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:u},58139:function(e,t,n){"use strict";e.exports=n(93296)},79736:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{A:()=>i})},36678:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(33780);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,i.A)(r.key),r)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},93442:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(33780);function r(e,t,n){return(t=(0,i.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},33780:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(85761);function r(e){var t=function(e,t){if("object"!=(0,i.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,i.A)(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,i.A)(t)?t:t+""}},85761:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{A:()=>i})},27532:function(e,t,n){"use strict";n.d(t,{Ip:()=>y,_l:()=>h,gX:()=>f,ng:()=>p});var i=n(2385),r=n(34324),a=n(68569),o=n(12748),s=n(31530),l=n(91805);function c(e){let t,n="object"==typeof e[0]?e.shift():new(0,o.FG);if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var u=new WeakMap;class p{copy(){return this.era?new p(this.calendar,this.era,this.year,this.month,this.day):new p(this.calendar,this.year,this.month,this.day)}add(e){return(0,i.WQ)(this,e)}subtract(e){return(0,i.Re)(this,e)}set(e){return(0,i.hZ)(this,e)}cycle(e,t,n){return(0,i.xy)(this,e,t,n)}toDate(e){return(0,s.ay)(this,e)}toString(){return(0,a.$T)(this)}compare(e){return(0,r.SE)(this,e)}constructor(...e){(0,l._)(this,u,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,(0,i.AU)(this)}}var d=new WeakMap;class f{copy(){return new f(this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.tY)(this,e)}subtract(e){return(0,i.YP)(this,e)}set(e){return(0,i.ib)(this,e)}cycle(e,t,n){return(0,i.gt)(this,e,t,n)}toString(){return(0,a.ot)(this)}compare(e){return(0,r.Nu)(this,e)}constructor(e=0,t=0,n=0,r=0){(0,l._)(this,d,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,(0,i.Rb)(this)}}var m=new WeakMap;class h{copy(){return this.era?new h(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new h(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.WQ)(this,e)}subtract(e){return(0,i.Re)(this,e)}set(e){return(0,i.hZ)((0,i.ib)(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return(0,i.xy)(this,e,t,n);default:return(0,i.gt)(this,e,t,n)}}toDate(e,t){return(0,s.ay)(this,e,t)}toString(){return(0,a.qk)(this)}compare(e){let t=(0,r.SE)(this,e);return 0===t?(0,r.Nu)(this,(0,s.tR)(e)):t}constructor(...e){(0,l._)(this,m,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,(0,i.AU)(this)}}var g=new WeakMap;class y{copy(){return this.era?new y(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new y(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.E0)(this,e)}subtract(e){return(0,i.d_)(this,e)}set(e,t){return(0,i.D8)(this,e,t)}cycle(e,t,n){return(0,i.XH)(this,e,t,n)}toDate(){return(0,s.cd)(this)}toString(){return(0,a.e6)(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(0,s.uB)(e,this.timeZone).toDate().getTime()}constructor(...e){(0,l._)(this,g,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e),s=e.shift(),u=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=s,this.offset=u,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,(0,i.AU)(this)}}},12748:function(e,t,n){"use strict";n.d(t,{FG:()=>u,LA:()=>s,U_:()=>o,f5:()=>l,rG:()=>a});var i=n(27532),r=n(36829);function a(e,t,n,i){let r=(t=s(e,t))-1,a=-2;return n<=2?a=0:o(t)&&(a=-1),1721425+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+a+i)}function o(e){return e%4==0&&(e%100!=0||e%400==0)}function s(e,t){return"BC"===e?1-t:t}function l(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let c={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class u{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),s=(0,r.z)(t,146097),c=Math.floor(s/36524),u=(0,r.z)(s,36524),p=Math.floor(u/1461),d=Math.floor((0,r.z)(u,1461)/365),[f,m]=l(400*n+100*c+4*p+d+ +(4!==c&&4!==d)),h=e-a(f,m,1,1),g=2;e<a(f,m,3,1)?g=0:o(m)&&(g=1);let y=Math.floor(((h+g)*12+373)/367),b=e-a(f,m,y,1)+1;return new(0,i.ng)(f,m,y,b)}toJulianDay(e){return a(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return c[o(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return o(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}},31530:function(e,t,n){"use strict";n.d(t,{Tr:()=>d,Yd:()=>m,ay:()=>f,cd:()=>v,gw:()=>h,oU:()=>s,tR:()=>g,uB:()=>b,yP:()=>y});var i=n(27532),r=n(2385),a=n(12748),o=n(34324);function s(e){return e=y(e,new(0,a.FG)),l((0,a.LA)(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function l(e,t,n,i,r,a,o){let s=new Date;return s.setUTCHours(i,r,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function c(e,t){if("UTC"===t)return 0;if(e>0&&t===(0,o.Xj)())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:i,day:r,hour:a,minute:s,second:c}=p(e,t);return l(n,i,r,a,s,c,0)-1e3*Math.floor(e/1e3)}let u=new Map;function p(e,t){let n=u.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),u.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let e of i)"literal"!==e.type&&(r[e.type]=e.value);return{year:"BC"===r.era||"B"===r.era?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:"24"===r.hour?0:+r.hour,minute:+r.minute,second:+r.second}}function d(e,t,n="compatible"){var i,r,l;let u=g(e);if("UTC"===t)return s(u);if(t===(0,o.Xj)()&&"compatible"===n){u=y(u,new(0,a.FG));let e=new Date,t=(0,a.LA)(u.era,u.year);return e.setFullYear(t,u.month-1,u.day),e.setHours(u.hour,u.minute,u.second,u.millisecond),e.getTime()}let f=s(u),m=c(f-864e5,t),h=c(f+864e5,t),b=(i=u,((r=f-m)==(l=f-h)?[r]:[r,l]).filter(e=>{var n;let r;return n=i,r=p(e,t),n.year===r.year&&n.month===r.month&&n.day===r.day&&n.hour===r.hour&&n.minute===r.minute&&n.second===r.second}));if(1===b.length)return b[0];if(b.length>1)switch(n){case"compatible":case"earlier":return b[0];case"later":return b[b.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(f-m,f-h);case"compatible":case"later":return Math.max(f-m,f-h);case"reject":throw RangeError("No such absolute time found")}}function f(e,t,n="compatible"){return new Date(d(e,t,n))}function m(e,t){let n=c(e,t),r=new Date(e+n),a=r.getUTCFullYear(),o=r.getUTCMonth()+1,s=r.getUTCDate(),l=r.getUTCHours(),u=r.getUTCMinutes(),p=r.getUTCSeconds(),d=r.getUTCMilliseconds();return new(0,i.Ip)(a<1?"BC":"AD",a<1?-a+1:a,o,s,t,n,l,u,p,d)}function h(e){return new(0,i.ng)(e.calendar,e.era,e.year,e.month,e.day)}function g(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new(0,i._l)(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function y(e,t){if((0,o.Jg)(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,(0,r.AU)(i),i}function b(e,t,n){if(e instanceof i.Ip){var r,a;return e.timeZone===t?e:(r=e,a=t,y(m(s(r)-r.offset,a),r.calendar))}return m(d(e,t,n),t)}function v(e){return new Date(s(e)-e.offset)}},32878:function(e,t,n){"use strict";let i,r;n.d(t,{d:()=>J});var a=n(27532),o=n(12748);class s extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),n=(0,o.LA)(t.era,t.year);return new(0,a.ng)(this,n- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(l(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(l(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function l(e){let[t,n]=(0,o.f5)(e.year+-543);return new(0,a.ng)(t,n,e.month,e.day)}function c(e,t,n,i){return e+365*t+Math.floor(t/4)+30*(n-1)+i-1}function u(e,t){let n=Math.floor(4*(t-e)/1461),i=1+Math.floor((t-c(e,n,1,1))/30),r=t+1-c(e,n,i,1);return[n,i,r]}function p(e){return Math.floor(e%4/3)}function d(e,t){return t%13!=0?30:p(e)+5}class f{fromJulianDay(e){let[t,n,i]=u(1723856,e),r="AM";return t<=0&&(r="AA",t+=5500),new(0,a.ng)(this,r,t,n,i)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),c(1723856,t,e.month,e.day)}getDaysInMonth(e){return d(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+p(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class m extends f{fromJulianDay(e){let[t,n,i]=u(1723856,e);return t+=5500,new(0,a.ng)(this,"AA",t,n,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class h extends f{fromJulianDay(e){let[t,n,i]=u(1824665,e),r="CE";return t<=0&&(r="BCE",t=1-t),new(0,a.ng)(this,r,t,n,i)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),c(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),d(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}var g=n(36829);let y=765433;function b(e){return 7>(0,g.z)(7*e+1,19)}function v(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>(0,g.z)(3*(n+1),7)&&(n+=1),n}function A(e){let t,n;return v(e)+(t=v(e-1),n=v(e),v(e+1)-n==356?2:+(n-t==382))}function w(e){return A(e+1)-A(e)}function $(e,t){if(t>=6&&!b(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=w(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!b(e):30}class k{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/y*19+234)/235)+1,i=A(n),r=Math.floor(t-i);for(;r<1;)r=Math.floor(t-(i=A(--n)));let o=1,s=0;for(;s<r;)s+=$(n,o),o++;let l=r-(s-=$(n,--o));return new(0,a.ng)(this,n,o,l)}toJulianDay(e){let t=A(e.year);for(let n=1;n<e.month;n++)t+=$(e.year,n);return t+e.day+347997}getDaysInMonth(e){return $(e.year,e.month)}getMonthsInYear(e){return b(e.year)?13:12}getDaysInYear(e){return w(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(b(t.year)&&!b(e.year)&&t.month>6?e.month--:!b(t.year)&&b(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class x extends o.FG{fromJulianDay(e){let t,n,i,r=super.fromJulianDay(e),s=r.year-78,l=e-(0,o.rG)(r.era,r.year,1,1);if(l<80?(s--,l+=(t=(0,o.U_)(r.year-1)?31:30)+155+90+10):(t=(0,o.U_)(r.year)?31:30,l-=80),l<t)n=1,i=l+1;else{let e=l-t;e<155?(n=Math.floor(e/31)+2,i=e%31+1):(e-=155,n=Math.floor(e/30)+7,i=e%30+1)}return new(0,a.ng)(this,s,n,i)}toJulianDay(e){let t,n,i=e.year+78,[r,a]=(0,o.f5)(i);return((0,o.U_)(a)?(t=31,n=(0,o.rG)(r,a,3,21)):(t=30,n=(0,o.rG)(r,a,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&(0,o.U_)(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function C(e,t,n,i){return i+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function E(e,t,n){let i=Math.floor((30*(n-t)+10646)/10631),r=Math.min(12,Math.ceil((n-(29+C(t,i,1,1)))/29.5)+1),o=n-C(t,i,r,1)+1;return new(0,a.ng)(e,i,r,o)}function D(e){return(14+11*e)%30<11}class S{fromJulianDay(e){return E(this,1948440,e)}toJulianDay(e){return C(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&D(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return D(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class B extends S{fromJulianDay(e){return E(this,1948439,e)}toJulianDay(e){return C(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function z(e){return 460322+r[e-1300]}function P(e,t){return(i[e-1300]&1<<11-(t-1))==0?29:30}function T(e,t){let n=z(e);for(let i=1;i<t;i++)n+=P(e,i);return n}function M(e){return r[e+1-1300]-r[e-1300]}class O extends S{fromJulianDay(e){let t=e-1948440,n=z(1300),i=z(1600);if(t<n||t>i)return super.fromJulianDay(e);{let e=1299,n=1,i=1;for(;i>0;){i=t-z(++e)+1;let r=M(e);if(i===r){n=12;break}if(i<r){let t=P(e,n);for(n=1;i>t;)i-=t,t=P(e,++n);break}}return new(0,a.ng)(this,e,n,t-T(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+T(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):P(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):M(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",i||(i=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!r){r=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){r[t-1300]=e;for(let n=1;n<=12;n++)e+=P(t,n)}}}}let F=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],I=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],N=[1867,1911,1925,1988,2018],j=["meiji","taisho","showa","heisei","reiwa"];function R(e){let t=F.findIndex(([t,n,i])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<i));return -1===t?F.length-1:0===t?0:t-1}function L(e){let t=N[j.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new(0,a.ng)(e.year+t,e.month,e.day)}class V extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),n=R(t);return new(0,a.ng)(this,j[n],t.year-N[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(L(e))}balanceDate(e){let t=L(e),n=R(t);j[n]!==e.era&&(e.era=j[n],e.year=t.year-N[n]),this.constrainDate(e)}constrainDate(e){let t=j.indexOf(e.era),n=I[t];if(null!=n){let[i,r,a]=n,o=i-N[t];e.year=Math.max(1,Math.min(o,e.year)),e.year===o&&(e.month=Math.min(r,e.month),e.month===r&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,n,i]=F[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(i,e.day))}}getEras(){return j}getYearsInEra(e){let t=j.indexOf(e.era),n=F[t],i=F[t+1];if(null==i)return 9999-n[0]+1;let r=i[0]-n[0];return(e.month<i[1]||e.month===i[1]&&e.day<i[2])&&r++,r}getDaysInMonth(e){return super.getDaysInMonth(L(e))}getMinimumMonthInYear(e){let t=H(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=H(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function H(e){if(1===e.year)return F[j.indexOf(e.era)]}let G=[0,31,62,93,124,155,186,216,246,276,306,336];class U{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),i=t-(365*(n-1)+Math.floor((8*n+21)/33)),r=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-G[r]+1;return new(0,a.ng)(this,n,r+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=G[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>(0,g.z)(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function q(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function W(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class K extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),[n,i]=W((0,o.LA)(t.era,t.year));return new(0,a.ng)(this,n,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Y(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=W(q(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(Y(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function Y(e){let[t,n]=(0,o.f5)(q(e));return new(0,a.ng)(t,n,e.month,e.day)}function J(e){switch(e){case"buddhist":return new s;case"ethiopic":return new f;case"ethioaa":return new m;case"coptic":return new h;case"hebrew":return new k;case"indian":return new x;case"islamic-civil":return new S;case"islamic-tbla":return new B;case"islamic-umalqura":return new O;case"japanese":return new V;case"persian":return new U;case"roc":return new K;default:return new(0,o.FG)}}},2385:function(e,t,n){"use strict";n.d(t,{AU:()=>c,D8:()=>C,E0:()=>$,Rb:()=>m,Re:()=>p,WQ:()=>a,XH:()=>x,YP:()=>b,d_:()=>k,gt:()=>A,hZ:()=>d,ib:()=>f,tY:()=>y,xy:()=>v});var i=n(31530),r=n(12748);function a(e,t){let n=e.copy(),i="hour"in n?g(n,t):0;o(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,s(n),l(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=i,function(e){for(;e.day<1;)e.month--,s(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,s(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var a,c;let e=null==(a=(c=n.calendar).isInverseEra)?void 0:a.call(c,n);n.year=r,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let u=n.calendar.getMonthsInYear(n);return n.month>u&&(n.month=u,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function o(e,t){var n,i;(null==(n=(i=e.calendar).isInverseEra)?void 0:n.call(i,e))&&(t=-t),e.year+=t}function s(e){for(;e.month<1;)o(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,o(e,1)}function l(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function c(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),l(e)}function u(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function p(e,t){return a(e,u(t))}function d(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),c(n),n}function f(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),m(n),n}function m(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function h(e,t){let n=e%t;return n<0&&(n+=t),n}function g(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=h(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=h(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=h(e.minute,60),n=Math.floor(e.hour/24),e.hour=h(e.hour,24),n}function y(e,t){let n=e.copy();return g(n,t),n}function b(e,t){return y(e,u(t))}function v(e,t,n,i){let r=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=w(a,n,0,t.length-1,null==i?void 0:i.round),r.era=t[a],c(r);break}case"year":var a,o;(null==(a=(o=r.calendar).isInverseEra)?void 0:a.call(o,r))&&(n=-n),r.year=w(e.year,n,-1/0,9999,null==i?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=w(e.month,n,1,e.calendar.getMonthsInYear(e),null==i?void 0:i.round);break;case"day":r.day=w(e.day,n,1,e.calendar.getDaysInMonth(e),null==i?void 0:i.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),c(r),r}function A(e,t,n,i){let r=e.copy();switch(t){case"hour":{let t=e.hour,a=0,o=23;if((null==i?void 0:i.hourCycle)===12){let e=t>=12;a=12*!!e,o=e?23:11}r.hour=w(t,n,a,o,null==i?void 0:i.round);break}case"minute":r.minute=w(e.minute,n,0,59,null==i?void 0:i.round);break;case"second":r.second=w(e.second,n,0,59,null==i?void 0:i.round);break;case"millisecond":r.millisecond=w(e.millisecond,n,0,999,null==i?void 0:i.round);break;default:throw Error("Unsupported field "+t)}return r}function w(e,t,n,i,r=!1){if(r){(e+=Math.sign(t))<n&&(e=i);let r=Math.abs(t);(e=t>0?Math.ceil(e/r)*r:Math.floor(e/r)*r)>i&&(e=n)}else(e+=t)<n?e=i-(n-e-1):e>i&&(e=n+(e-i-1));return e}function $(e,t){let n;if(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days){let r=a((0,i.tR)(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=(0,i.Tr)(r,e.timeZone)}else n=(0,i.oU)(e)-e.offset;n+=t.milliseconds||0,n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),n+=36e5*(t.hours||0);let r=(0,i.Yd)(n,e.timeZone);return(0,i.yP)(r,e.calendar)}function k(e,t){return $(e,u(t))}function x(e,t,n,a){switch(t){case"hour":{let t=0,o=23;if((null==a?void 0:a.hourCycle)===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let s=(0,i.tR)(e),l=(0,i.yP)(f(s,{hour:t}),new(0,r.FG)),c=[(0,i.Tr)(l,e.timeZone,"earlier"),(0,i.Tr)(l,e.timeZone,"later")].filter(t=>(0,i.Yd)(t,e.timeZone).day===l.day)[0],u=(0,i.yP)(f(s,{hour:o}),new(0,r.FG)),p=[(0,i.Tr)(u,e.timeZone,"earlier"),(0,i.Tr)(u,e.timeZone,"later")].filter(t=>(0,i.Yd)(t,e.timeZone).day===u.day).pop(),d=(0,i.oU)(e)-e.offset,m=Math.floor(d/36e5),h=d%36e5;return d=36e5*w(m,n,Math.floor(c/36e5),Math.floor(p/36e5),null==a?void 0:a.round)+h,(0,i.yP)((0,i.Yd)(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return A(e,t,n,a);case"era":case"year":case"month":case"day":{let r=v((0,i.tR)(e),t,n,a),o=(0,i.Tr)(r,e.timeZone);return(0,i.yP)((0,i.Yd)(o,e.timeZone),e.calendar)}default:throw Error("Unsupported field "+t)}}function C(e,t,n){let r=(0,i.tR)(e),a=f(d(r,t),t);if(0===a.compare(r))return e;let o=(0,i.Tr)(a,e.timeZone,n);return(0,i.yP)((0,i.Yd)(o,e.timeZone),e.calendar)}},34324:function(e,t,n){"use strict";n.d(t,{p9:()=>A,$I:()=>C,xz:()=>$,RZ:()=>D,oT:()=>k,tB:()=>d,kq:()=>x,Jg:()=>l,Py:()=>S,tF:()=>o,Xj:()=>b,Nu:()=>h,SJ:()=>p,SE:()=>m,ro:()=>a,D:()=>w,ZI:()=>B,Ec:()=>f,cK:()=>c,NV:()=>s,wH:()=>v});var i=n(31530);let r={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function a(e,t){return t=(0,i.yP)(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function o(e,t){return t=(0,i.yP)(t,e.calendar),e=v(e),t=v(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function s(e,t){return l(e.calendar,t.calendar)&&a(e,t)}function l(e,t){var n,i,r,a;return null!=(a=null!=(r=null==(n=e.isEqual)?void 0:n.call(e,t))?r:null==(i=t.isEqual)?void 0:i.call(t,e))?a:e.identifier===t.identifier}function c(e,t){return a(e,f(t))}let u={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function p(e,t,n){let i,a=Math.ceil(e.calendar.toJulianDay(e)+1-(n?u[n]:(i=function(e){if(Intl.Locale){let t=E.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&E.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&r[i]||0))%7;return a<0&&(a+=7),a}function d(e){return(0,i.Yd)(Date.now(),e)}function f(e){return(0,i.gw)(d(e))}function m(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function h(e,t){return g(e)-g(t)}function g(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let y=null;function b(){return null==y&&(y=new Intl.DateTimeFormat().resolvedOptions().timeZone),y}function v(e){return e.subtract({days:e.day-1})}function A(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function w(e){return v(e.subtract({months:e.month-1}))}function $(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function k(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function x(e,t,n){let i=p(e,t,n);return e.subtract({days:i})}function C(e,t,n){return x(e,t,n).add({days:6})}let E=new Map;function D(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((p(v(e),t,n)+i)/7)}function S(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function B(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}},68569:function(e,t,n){"use strict";n.d(t,{$T:()=>d,DP:()=>c,_U:()=>l,e6:()=>m,ot:()=>p,qk:()=>f});var i=n(27532),r=n(31530),a=n(12748);let o=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,s=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;function l(e){let t=e.match(o);if(!t)throw Error("Invalid ISO 8601 date string: "+e);let n=new(0,i.ng)(u(t[1],0,9999),u(t[2],1,12),1);return n.day=u(t[3],1,n.calendar.getDaysInMonth(n)),n}function c(e){let t=e.match(s);if(!t)throw Error("Invalid ISO 8601 date time string: "+e);let n=u(t[1],-9999,9999),r=new(0,i._l)(n<1?"BC":"AD",n<1?-n+1:n,u(t[2],1,12),1,t[4]?u(t[4],0,23):0,t[5]?u(t[5],0,59):0,t[6]?u(t[6],0,59):0,t[7]?1e3*u(t[7],0,1/0):0);return r.day=u(t[3],0,r.calendar.getDaysInMonth(r)),r}function u(e,t,n){let i=Number(e);if(i<t||i>n)throw RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function p(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function d(e){let t,n=(0,r.yP)(e,new(0,a.FG));return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function f(e){return`${d(e)}T${p(e)}`}function m(e){var t;let n,i,r;return`${f(e)}${n=0>Math.sign(t=e.offset)?"-":"+",i=Math.floor((t=Math.abs(t))/36e5),r=t%36e5/6e4,`${n}${String(i).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${e.timeZone}]`}},36829:function(e,t,n){"use strict";function i(e,t){return e-t*Math.floor(e/t)}n.d(t,{z:()=>i})},91805:function(e,t,n){"use strict";function i(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}n.d(t,{_:()=>i})},8902:function(e,t,n){"use strict";if(n.d(t,{CD:()=>D}),"undefined"!=typeof navigator){let e=navigator;i=Array.isArray(e.languages)?e.languages[0]:e.language}else if("undefined"!=typeof process){let e=process.env;i=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var i,r=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(i||"en-US"),a=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},o={};for(let e=0;e<100;e++)o[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var s={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},l="[1234567890一二三四五六七八九〇\\d]",c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},u={},p={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},d={zone:p,year:o,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},f={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(p).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},m={...f,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},h={},g=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=r){return h[t.toLowerCase()]||(h[t.toLowerCase()]=new e(t)),h[t.toLowerCase()]}constructor(e=r){this.locale=e,this.lookups={...d},this.vars={...f};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let n=this.lookups.meridiem[t?.toLowerCase()]||0,i=this.toInt(e);return i<12&&12===n&&(i+=12),12===i&&0===n&&(i=0),i}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,i]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(i||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=c:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(u[e])return u[e];if("fullwide"===e||"hanidec"===e)return{group:l,lookup:{...c}};let t=s[e];if(!t)return{group:"\\d",lookup:{...c}};let n=String.fromCharCode(t),i=String.fromCharCode(t+9),r={};for(let e=0;e<10;e++)r[String.fromCharCode(t+e)]=e;return u[e]={group:`[${n}-${i}]`,lookup:r},u[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,m)m.hasOwnProperty(n)&&(this.vars[n]=m[n].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((n,i)=>{["","k","kuu","kuuta"].forEach((r,a)=>{e[n+r+(a<2?"\\.?":"")]=!0,t[n+r]=i+1})});else{let n=[],i=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let r of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:r});for(let o=0;o<12;o++){let s=a.formatToParts(n[o]).find(i).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===r?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=o+1)}}let r=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let o=r.formatToParts(n[a]).find(i).value.toLocaleLowerCase(this.locale);o=o.replace(/\.$/,""),e[`${o}\\.?`]=!0,t[o]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let n=[],i={};for(let r of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:r});for(let o=0;o<7;o++){let s=a.formatToParts(e[o]).find(t).value.toLocaleLowerCase(this.locale);"short"===r?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),i[s]=o}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=i}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],i={},r=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let o=r.formatToParts(e[a]).find(t);if(!o)return;let s=o.value.toLocaleLowerCase(this.locale);n.push(s),i[s]=12*a}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=i}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},y=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],b={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},v=()=>new Date;function A(e){return function(t){let n={};for(let i=0,r=e.length;i<r;i++){let r=e[i];r&&(n[r]=t[i])}return n}}var w=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:i}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=i}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},i=!1;for(let e of this.patterns){let r=t.match(e.regex);if(!r)continue;i=!0;let a=e.handler(r);if(a){for(let[e,t]of Object.entries(a))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,r.index)+t.slice(r.index+r[0].length+1)).trim(),this.doneChecker(n,t))break}}return i?this.formatter(n):this.fallback(e)}},$=["year","month","day","hour","minute","second","millisecond","offset"],k={};function x(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var C=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],E={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...C],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:C,id:C,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function D(e,t=r){let n=function(e){if(!k[e]){var t,n;let i,r,a=g.factory(e);k[e]=new w({doneChecker:x,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(i=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:A(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:A(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:A(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${l}{2,4})\\s*\u5E74\\s*(${l}{1,2})\\s*\u6708\\s*(${l}{1,2})\\s*\u65E5$`),handler:A(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:A(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:A(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=v(),n=e[0].toLowerCase(),i={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==i&&t.setTime(t.getTime()+i);let r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...r,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,n,i]){t=parseFloat(t),"week"===(n=n.length<=2?b[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||i)&&(t*=-1);let r=v();return"millisecond"===n?r.setUTCMilliseconds(r.getUTCMilliseconds()+t):"second"===n?r.setUTCSeconds(r.getUTCSeconds()+t):"minute"===n?r.setUTCMinutes(r.getUTCMinutes()+t):"hour"===n?r.setUTCHours(r.getUTCHours()+t):"day"===n?r.setUTCDate(r.getUTCDate()+t):"month"===n?r.setUTCMonth(r.getUTCMonth()+t):"year"===n&&r.setUTCFullYear(r.getUTCFullYear()+t),{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:A(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:A(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:A(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:A(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:A(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:A(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:A(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:A(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:A(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:A(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:A(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:A(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:A(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:A(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:A(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:A(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:A(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:A(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:A(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:A(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:A(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:A(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:A(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:A(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:A(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:A(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:A(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:A(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:A(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:A(["offset"])}],r=a.baseName.slice(0,5),y.includes(r)?i:i.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=a,function(e){let t={};for(let[i,r]of Object.entries(e))if("monthname"===i){if(r){let e=n.monthNameToInt(r);void 0!==e&&(t.month=e)}}else if("hour"===i&&e.meridiem){let i=n.h12ToInt(r,e.meridiem);void 0!==i&&(t.hour=i)}else if("zone"===i){if(r){let e=n.zoneToOffset(r);void 0!==e&&(t.offset=e)}}else if("offset"===i){let e=n.offsetToMinutes(r);void 0!==e&&(t.offset=e)}else if("millisecond"===i){let e=n.millisecondToInt(r);"number"==typeof e&&(t.millisecond=e)}else if($.includes(i)){let e=n.toInt(r);"number"==typeof e&&(t[i]=e)}return t.year<100&&(t.year=o[e.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return k[e]}(t),i=function(e,t){let n=E[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,i]of n)e=e.replace(t,i);return e}(e,t);return n.attempt(i)}function S(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new a(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new a(t.valueOf()-60*e.offset*1e3):t}function B(e,t=r){let n=D(e,t),i=n.invalid?new a(NaN):S(n);return i.isValid()||(i.invalid=`Unable to parse date "${e}"`),i}function z(e,t=r){return e instanceof Date?new a(e.valueOf()):"number"==typeof e?new a(e):B(e,t)}Date.fromString=a.fromString=B,Date.fromAny=a.fromAny=z,"undefined"!=typeof window&&(window.anyDateParser={fromString:B,fromAny:z,fromObject:S,attempt:D})},60950:function(e,t,n){"use strict";n.d(t,{A:()=>r});class i{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+i.version}static addUnaryOp(e){return i.max_unop_len=Math.max(e.length,i.max_unop_len),i.unary_ops[e]=1,i}static addBinaryOp(e,t,n){return i.max_binop_len=Math.max(e.length,i.max_binop_len),i.binary_ops[e]=t,n?i.right_associative.add(e):i.right_associative.delete(e),i}static addIdentifierChar(e){return i.additional_identifier_chars.add(e),i}static addLiteral(e,t){return i.literals[e]=t,i}static removeUnaryOp(e){return delete i.unary_ops[e],e.length===i.max_unop_len&&(i.max_unop_len=i.getMaxKeyLen(i.unary_ops)),i}static removeAllUnaryOps(){return i.unary_ops={},i.max_unop_len=0,i}static removeIdentifierChar(e){return i.additional_identifier_chars.delete(e),i}static removeBinaryOp(e){return delete i.binary_ops[e],e.length===i.max_binop_len&&(i.max_binop_len=i.getMaxKeyLen(i.binary_ops)),i.right_associative.delete(e),i}static removeAllBinaryOps(){return i.binary_ops={},i.max_binop_len=0,i}static removeLiteral(e){return delete i.literals[e],i}static removeAllLiterals(){return i.literals={},i}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new i(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return i.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!i.binary_ops[String.fromCharCode(e)]||i.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return i.isIdentifierStart(e)||i.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(i.hooks[e]){let n={context:this,node:t};return i.hooks.run(e,n),n.node}return t}searchHook(e){if(i.hooks[e]){let t={context:this};return i.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===i.SPACE_CODE||e===i.TAB_CODE||e===i.LF_CODE||e===i.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:i.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===i.SEMCOL_CODE||n===i.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,i.max_binop_len),t=e.length;for(;t>0;){if(i.binary_ops.hasOwnProperty(e)&&(!i.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,a,o,s,l,c;if(!(o=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return o;for(a={value:t,prec:i.binaryPrecedence(t),right_a:i.right_associative.has(t)},(s=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,s];t=this.gobbleBinaryOp();){if(0===(n=i.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:i.right_associative.has(t)},c=t;let l=e=>a.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&l(r[r.length-2]);)s=r.pop(),t=r.pop().value,o=r.pop(),e={type:i.BINARY_EXP,operator:t,left:o,right:s},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+c),r.push(a,e)}for(l=r.length-1,e=r[l];l>1;)e={type:i.BINARY_EXP,operator:r[l-1].value,left:r[l-2],right:e},l-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,i.isDecimalDigit(e)||e===i.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===i.SQUOTE_CODE||e===i.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===i.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,i.max_unop_len)).length;n>0;){if(i.unary_ops.hasOwnProperty(t)&&(!i.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:i.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}i.isIdentifierStart(e)?(r=this.gobbleIdentifier(),i.literals.hasOwnProperty(r.name)?r={type:i.LITERAL,value:i.literals[r.name],raw:r.name}:r.name===i.this_str&&(r={type:i.THIS_EXP})):e===i.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===i.PERIOD_CODE||t===i.OBRACK_CODE||t===i.OPAREN_CODE||t===i.QUMARK_CODE;){let n;if(t===i.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==i.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===i.OBRACK_CODE?((e={type:i.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==i.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===i.OPAREN_CODE?e={type:i.CALL_EXP,arguments:this.gobbleArguments(i.CPAREN_CODE),callee:e}:(t===i.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:i.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===i.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,i.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===i.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===i.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:i.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:i.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,i.isIdentifierPart(e))this.index++;else break;return{type:i.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let a=this.code;if(a===e){n=!0,this.index++,e===i.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===i.COMMA_CODE){if(this.index++,++r!==t.length){if(e===i.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==i.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i.CPAREN_CODE);if(this.code===i.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:i.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i.ARRAY_EXP,elements:this.gobbleArguments(i.CBRACK_CODE)}}}Object.assign(i,{hooks:new class{add(e,t,n){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(i),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),i.max_unop_len=i.getMaxKeyLen(i.unary_ops),i.max_binop_len=i.getMaxKeyLen(i.binary_ops);let r=e=>new i(e).parse(),a=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i).filter(e=>!a.includes(e)&&void 0===r[e]).forEach(e=>{r[e]=i[e]}),r.Jsep=i,r.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:i,alternate:r},n.operator&&e.binary_ops[n.operator]<=.9){let i=n;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}})},81494:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(81963);let r=function(e,t){for(var n=e.length;n--;)if((0,i.A)(e[n][0],t))return n;return -1};var a=Array.prototype.splice;function o(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)},o.prototype.get=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]},o.prototype.has=function(e){return r(this.__data__,e)>-1},o.prototype.set=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};let s=o},61924:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44536),r=n(28056);let a=(0,i.A)(r.A,"Map")},63605:function(e,t,n){"use strict";n.d(t,{A:()=>d});var i=(0,n(44536).A)(Object,"create"),r=Object.prototype.hasOwnProperty,a=Object.prototype.hasOwnProperty;function o(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}o.prototype.clear=function(){this.__data__=i?i(null):{},this.size=0},o.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},o.prototype.get=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0},o.prototype.has=function(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)},o.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this};var s=n(81494),l=n(61924);let c=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},u=function(e,t){var n=e.__data__;return c(t)?n["string"==typeof t?"string":"hash"]:n.map};function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new o,map:new(l.A||s.A),string:new o}},p.prototype.delete=function(e){var t=u(this,e).delete(e);return this.size-=!!t,t},p.prototype.get=function(e){return u(this,e).get(e)},p.prototype.has=function(e){return u(this,e).has(e)},p.prototype.set=function(e,t){var n=u(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this};let d=p},68726:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44536),r=n(28056);let a=(0,i.A)(r.A,"Set")},98228:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(63605);function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.A;++t<n;)this.add(e[t])}r.prototype.add=r.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},r.prototype.has=function(e){return this.__data__.has(e)};let a=r},61098:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(81494),r=n(61924),a=n(63605);function o(e){var t=this.__data__=new i.A(e);this.size=t.size}o.prototype.clear=function(){this.__data__=new i.A,this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},o.prototype.get=function(e){return this.__data__.get(e)},o.prototype.has=function(e){return this.__data__.has(e)},o.prototype.set=function(e,t){var n=this.__data__;if(n instanceof i.A){var o=n.__data__;if(!r.A||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a.A(o)}return n.set(e,t),this.size=n.size,this};let s=o},19172:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=n(28056).A.Symbol},20705:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=n(28056).A.Uint8Array},42287:function(e,t,n){"use strict";n.d(t,{A:()=>u});let i=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i};var r=n(17820),a=n(36820),o=n(75323),s=n(27322),l=n(43148),c=Object.prototype.hasOwnProperty;let u=function(e,t){var n=(0,a.A)(e),u=!n&&(0,r.A)(e),p=!n&&!u&&(0,o.A)(e),d=!n&&!u&&!p&&(0,l.A)(e),f=n||u||p||d,m=f?i(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(f&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,s.A)(g,h)))&&m.push(g);return m}},20117:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},93903:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},74660:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(37999),r=n(81963),a=Object.prototype.hasOwnProperty;let o=function(e,t,n){var o=e[t];a.call(e,t)&&(0,r.A)(o,n)&&(void 0!==n||t in e)||(0,i.A)(e,t,n)}},37999:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(61670);let r=function(e,t,n){"__proto__"==t&&i.A?(0,i.A)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},27033:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(61306),r=n(58002);let a=function(e,t){t=(0,i.A)(t,e);for(var n=0,a=t.length;null!=e&&n<a;)e=e[(0,r.A)(t[n++])];return n&&n==a?e:void 0}},96918:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(93903),r=n(36820);let a=function(e,t,n){var a=t(e);return(0,r.A)(e)?a:(0,i.A)(a,n(e))}},31243:function(e,t,n){"use strict";n.d(t,{A:()=>p});var i=n(19172),r=Object.prototype,a=r.hasOwnProperty,o=r.toString,s=i.A?i.A.toStringTag:void 0;let l=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=o.call(e);return i&&(t?e[s]=n:delete e[s]),r};var c=Object.prototype.toString,u=i.A?i.A.toStringTag:void 0;let p=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?l(e):c.call(e)}},1128:function(e,t,n){"use strict";n.d(t,{A:()=>B});var i=n(61098),r=n(98228);let a=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1};var o=n(55602);let s=function(e,t,n,i,s,l){var c=1&n,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var m=-1,h=!0,g=2&n?new r.A:void 0;for(l.set(e,t),l.set(t,e);++m<u;){var y=e[m],b=t[m];if(i)var v=c?i(b,y,m,t,e,l):i(y,b,m,e,t,l);if(void 0!==v){if(v)continue;h=!1;break}if(g){if(!a(t,function(e,t){if(!(0,o.A)(g,t)&&(y===e||s(y,e,n,i,l)))return g.push(t)})){h=!1;break}}else if(!(y===b||s(y,b,n,i,l))){h=!1;break}}return l.delete(e),l.delete(t),h};var l=n(19172),c=n(20705),u=n(81963);let p=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n};var d=n(11546),f=l.A?l.A.prototype:void 0,m=f?f.valueOf:void 0;let h=function(e,t,n,i,r,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new c.A(e),new c.A(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,u.A)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=p;case"[object Set]":var f=1&i;if(l||(l=d.A),e.size!=t.size&&!f)break;var h=o.get(e);if(h)return h==t;i|=2,o.set(e,t);var g=s(l(e),l(t),i,r,a,o);return o.delete(e),g;case"[object Symbol]":if(m)return m.call(e)==m.call(t)}return!1};var g=n(11507),y=Object.prototype.hasOwnProperty;let b=function(e,t,n,i,r,a){var o=1&n,s=(0,g.A)(e),l=s.length;if(l!=(0,g.A)(t).length&&!o)return!1;for(var c=l;c--;){var u=s[c];if(!(o?u in t:y.call(t,u)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=o;++c<l;){var h=e[u=s[c]],b=t[u];if(i)var v=o?i(b,h,u,t,e,a):i(h,b,u,e,t,a);if(!(void 0===v?h===b||r(h,b,n,i,a):v)){f=!1;break}m||(m="constructor"==u)}if(f&&!m){var A=e.constructor,w=t.constructor;A!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof w&&w instanceof w)&&(f=!1)}return a.delete(e),a.delete(t),f};var v=n(55492),A=n(36820),w=n(75323),$=n(43148),k="[object Arguments]",x="[object Array]",C="[object Object]",E=Object.prototype.hasOwnProperty;let D=function(e,t,n,r,a,o){var l=(0,A.A)(e),c=(0,A.A)(t),u=l?x:(0,v.A)(e),p=c?x:(0,v.A)(t);u=u==k?C:u,p=p==k?C:p;var d=u==C,f=p==C,m=u==p;if(m&&(0,w.A)(e)){if(!(0,w.A)(t))return!1;l=!0,d=!1}if(m&&!d)return o||(o=new i.A),l||(0,$.A)(e)?s(e,t,n,r,a,o):h(e,t,u,n,r,a,o);if(!(1&n)){var g=d&&E.call(e,"__wrapped__"),y=f&&E.call(t,"__wrapped__");if(g||y){var D=g?e.value():e,S=y?t.value():t;return o||(o=new i.A),a(D,S,n,r,o)}}return!!m&&(o||(o=new i.A),b(e,t,n,r,a,o))};var S=n(62873);let B=function e(t,n,i,r,a){return t===n||(null!=t&&null!=n&&((0,S.A)(t)||(0,S.A)(n))?D(t,n,i,r,e,a):t!=t&&n!=n)}},62926:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(24956),r=(0,n(1748).A)(Object.keys,Object),a=Object.prototype.hasOwnProperty;let o=function(e){if(!(0,i.A)(e))return r(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},93279:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}},33734:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return function(t){return e(t)}}},55602:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return e.has(t)}},61306:function(e,t,n){"use strict";n.d(t,{A:()=>f});var i,r,a=n(36820),o=n(53),s=n(63605);function l(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(l.Cache||s.A),n}l.Cache=s.A;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,p=(r=(i=l(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,function(e,n,i,r){t.push(i?r.replace(u,"$1"):n||e)}),t},function(e){return 500===r.size&&r.clear(),e})).cache,i),d=n(1158);let f=function(e,t){return(0,a.A)(e)?e:(0,o.A)(e,t)?[e]:p((0,d.A)(e))}},46940:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(20705);let r=function(e){var t=new e.constructor(e.byteLength);return new i.A(t).set(new i.A(e)),t}},13137:function(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(28056),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r?i.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;let l=function(e,t){if(t)return e.slice();var n=e.length,i=s?s(n):new e.constructor(n);return e.copy(i),i}},84934:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(46940);let r=function(e,t){var n=t?(0,i.A)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},17052:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},51158:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(74660),r=n(37999);let a=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=a?a(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),o?(0,r.A)(n,c,u):(0,i.A)(n,c,u)}return n}},61670:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(44536);let r=function(){try{var e=(0,i.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},86625:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i="object"==typeof global&&global&&global.Object===Object&&global},11507:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(96918),r=n(93363),a=n(43473);let o=function(e){return(0,i.A)(e,a.A,r.A)}},44536:function(e,t,n){"use strict";n.d(t,{A:()=>h});var i,r=n(49885),a=n(28056).A["__core-js_shared__"],o=(i=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",s=n(12174),l=n(75380),c=/^\[object .+?Constructor\]$/,u=Object.prototype,p=Function.prototype.toString,d=u.hasOwnProperty,f=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let m=function(e){return!!(0,s.A)(e)&&(!o||!(o in e))&&((0,r.A)(e)?f:c).test((0,l.A)(e))},h=function(e,t){var n=null==e?void 0:e[t];return m(n)?n:void 0}},89494:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=(0,n(1748).A)(Object.getPrototypeOf,Object)},93363:function(e,t,n){"use strict";n.d(t,{A:()=>s});let i=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a};var r=n(9620),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;let s=o?function(e){return null==e?[]:i(o(e=Object(e)),function(t){return a.call(e,t)})}:r.A},55492:function(e,t,n){"use strict";n.d(t,{A:()=>k});var i=n(44536),r=n(28056),a=(0,i.A)(r.A,"DataView"),o=n(61924),s=(0,i.A)(r.A,"Promise"),l=n(68726),c=(0,i.A)(r.A,"WeakMap"),u=n(31243),p=n(75380),d="[object Map]",f="[object Promise]",m="[object Set]",h="[object WeakMap]",g="[object DataView]",y=(0,p.A)(a),b=(0,p.A)(o.A),v=(0,p.A)(s),A=(0,p.A)(l.A),w=(0,p.A)(c),$=u.A;(a&&$(new a(new ArrayBuffer(1)))!=g||o.A&&$(new o.A)!=d||s&&$(s.resolve())!=f||l.A&&$(new l.A)!=m||c&&$(new c)!=h)&&($=function(e){var t=(0,u.A)(e),n="[object Object]"==t?e.constructor:void 0,i=n?(0,p.A)(n):"";if(i)switch(i){case y:return g;case b:return d;case v:return f;case A:return m;case w:return h}return t});let k=$},47514:function(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(12174),r=Object.create,a=function(){function e(){}return function(t){if(!(0,i.A)(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),o=n(89494),s=n(24956);let l=function(e){return"function"!=typeof e.constructor||(0,s.A)(e)?{}:a((0,o.A)(e))}},27322:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=/^(?:0|[1-9]\d*)$/;let r=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&i.test(e))&&e>-1&&e%1==0&&e<t}},53:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(36820),r=n(44049),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;let s=function(e,t){if((0,i.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,r.A)(e))||o.test(e)||!a.test(e)||null!=t&&e in Object(t)}},24956:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=Object.prototype;let r=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}},97872:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(86625),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r&&i.A.process;let s=function(){try{var e=a&&a.require&&a.require("util").types;if(e)return e;return o&&o.binding&&o.binding("util")}catch(e){}}()},1748:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return function(n){return e(t(n))}}},54979:function(e,t,n){"use strict";n.d(t,{A:()=>a});let i=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var r=Math.max;let a=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),l=Array(s);++o<s;)l[o]=a[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=a[o];return c[t]=n(l),i(e,this,c)}}},28056:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(86625),r="object"==typeof self&&self&&self.Object===Object&&self;let a=i.A||r||Function("return this")()},11546:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},44168:function(e,t,n){"use strict";n.d(t,{A:()=>c});var i,r,a=n(61670),o=n(68527),s=a.A?function(e,t){return(0,a.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:o.A,l=Date.now;let c=(i=0,r=0,function(){var e=l(),t=16-(e-r);if(r=e,t>0){if(++i>=800)return arguments[0]}else i=0;return s.apply(void 0,arguments)})},58002:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44049),r=1/0;let a=function(e){if("string"==typeof e||(0,i.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}},75380:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=Function.prototype.toString;let r=function(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},81963:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return e===t||e!=e&&t!=t}},68527:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return e}},17820:function(e,t,n){"use strict";n.d(t,{A:()=>c});var i=n(31243),r=n(62873);let a=function(e){return(0,r.A)(e)&&"[object Arguments]"==(0,i.A)(e)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;let c=a(function(){return arguments}())?a:function(e){return(0,r.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},36820:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=Array.isArray},55259:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(49885),r=n(47741);let a=function(e){return null!=e&&(0,r.A)(e.length)&&!(0,i.A)(e)}},75323:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(28056),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r?i.A.Buffer:void 0;let s=(o?o.isBuffer:void 0)||function(){return!1}},75133:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(1128);let r=function(e,t){return(0,i.A)(e,t)}},49885:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(31243),r=n(12174);let a=function(e){if(!(0,r.A)(e))return!1;var t=(0,i.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},47741:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},12174:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},62873:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return null!=e&&"object"==typeof e}},92562:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(31243),r=n(89494),a=n(62873),o=Object.prototype,s=Function.prototype.toString,l=o.hasOwnProperty,c=s.call(Object);let u=function(e){if(!(0,a.A)(e)||"[object Object]"!=(0,i.A)(e))return!1;var t=(0,r.A)(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==c}},44049:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(31243),r=n(62873);let a=function(e){return"symbol"==typeof e||(0,r.A)(e)&&"[object Symbol]"==(0,i.A)(e)}},43148:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(31243),r=n(47741),a=n(62873),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=n(33734),l=n(97872),c=l.A&&l.A.isTypedArray;let u=c?(0,s.A)(c):function(e){return(0,a.A)(e)&&(0,r.A)(e.length)&&!!o[(0,i.A)(e)]}},43473:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(42287),r=n(62926),a=n(55259);let o=function(e){return(0,a.A)(e)?(0,i.A)(e):(0,r.A)(e)}},22678:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(42287),r=n(12174),a=n(24956);let o=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var s=Object.prototype.hasOwnProperty;let l=function(e){if(!(0,r.A)(e))return o(e);var t=(0,a.A)(e),n=[];for(var i in e)"constructor"==i&&(t||!s.call(e,i))||n.push(i);return n};var c=n(55259);let u=function(e){return(0,c.A)(e)?(0,i.A)(e,!0):l(e)}},6561:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},10840:function(e,t,n){"use strict";n.d(t,{A:()=>eu});var i,r=n(20117),a=n(61098);let o=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e};var s=n(74660),l=n(51158),c=n(43473),u=n(22678),p=n(13137),d=n(17052),f=n(93363),m=n(93903),h=n(89494),g=n(9620),y=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,m.A)(t,(0,f.A)(e)),e=(0,h.A)(e);return t}:g.A,b=n(11507),v=n(96918);let A=function(e){return(0,v.A)(e,u.A,y)};var w=n(55492),$=Object.prototype.hasOwnProperty;let k=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&$.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var x=n(46940);let C=function(e,t){var n=t?(0,x.A)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var E=/\w*$/;let D=function(e){var t=new e.constructor(e.source,E.exec(e));return t.lastIndex=e.lastIndex,t};var S=n(19172),B=S.A?S.A.prototype:void 0,z=B?B.valueOf:void 0,P=n(84934);let T=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,x.A)(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return C(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,P.A)(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return D(e);case"[object Symbol]":return z?Object(z.call(e)):{}}};var M=n(47514),O=n(36820),F=n(75323),I=n(62873),N=n(33734),j=n(97872),R=j.A&&j.A.isMap,L=R?(0,N.A)(R):function(e){return(0,I.A)(e)&&"[object Map]"==(0,w.A)(e)},V=n(12174),H=j.A&&j.A.isSet,G=H?(0,N.A)(H):function(e){return(0,I.A)(e)&&"[object Set]"==(0,w.A)(e)},U="[object Arguments]",q="[object Function]",W="[object Object]",K={};K[U]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[W]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[q]=K["[object WeakMap]"]=!1;let Y=function e(t,n,i,r,m,h){var g,v=1&n,$=2&n,x=4&n;if(i&&(g=m?i(t,r,m,h):i(t)),void 0!==g)return g;if(!(0,V.A)(t))return t;var C=(0,O.A)(t);if(C){if(g=k(t),!v)return(0,d.A)(t,g)}else{var E,D,S,B,z=(0,w.A)(t),P=z==q||"[object GeneratorFunction]"==z;if((0,F.A)(t))return(0,p.A)(t,v);if(z==W||z==U||P&&!m){if(g=$||P?{}:(0,M.A)(t),!v)return $?(D=(E=g)&&(0,l.A)(t,(0,u.A)(t),E),(0,l.A)(t,y(t),D)):(B=(S=g)&&(0,l.A)(t,(0,c.A)(t),S),(0,l.A)(t,(0,f.A)(t),B))}else{if(!K[z])return m?t:{};g=T(t,z,v)}}h||(h=new a.A);var I=h.get(t);if(I)return I;h.set(t,g),G(t)?t.forEach(function(r){g.add(e(r,n,i,r,t,h))}):L(t)&&t.forEach(function(r,a){g.set(a,e(r,n,i,a,t,h))});var N=x?$?A:b.A:$?u.A:c.A,j=C?void 0:N(t);return o(j||t,function(r,a){j&&(r=t[a=r]),(0,s.A)(g,a,e(r,n,i,a,t,h))}),g};var J=n(61306),Z=n(6561),X=n(27033),Q=n(93279),ee=n(58002);let et=function(e,t){var n,i;return t=(0,J.A)(t,e),n=e,null==(e=(i=t).length<2?n:(0,X.A)(n,(0,Q.A)(i,0,-1)))||delete e[(0,ee.A)((0,Z.A)(t))]};var en=n(92562);let ei=function(e){return(0,en.A)(e)?void 0:e};var er=n(17820),ea=S.A?S.A.isConcatSpreadable:void 0;let eo=function(e){return(0,O.A)(e)||(0,er.A)(e)||!!(ea&&e&&e[ea])},es=function e(t,n,i,r,a){var o=-1,s=t.length;for(i||(i=eo),a||(a=[]);++o<s;){var l=t[o];n>0&&i(l)?n>1?e(l,n-1,i,r,a):(0,m.A)(a,l):r||(a[a.length]=l)}return a};var el=n(54979),ec=n(44168);let eu=(i=function(e,t){var n={};if(null==e)return n;var i=!1;t=(0,r.A)(t,function(t){return t=(0,J.A)(t,e),i||(i=t.length>1),t}),(0,l.A)(e,A(e),n),i&&(n=Y(n,7,ei));for(var a=t.length;a--;)et(n,t[a]);return n},(0,ec.A)((0,el.A)(i,void 0,function(e){return(null==e?0:e.length)?es(e,1):[]}),i+""))},9620:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(){return[]}},1158:function(e,t,n){"use strict";n.d(t,{A:()=>p});var i=n(19172),r=n(20117),a=n(36820),o=n(44049),s=1/0,l=i.A?i.A.prototype:void 0,c=l?l.toString:void 0;let u=function e(t){if("string"==typeof t)return t;if((0,a.A)(t))return(0,r.A)(t,e)+"";if((0,o.A)(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n},p=function(e){return null==e?"":u(e)}},6309:function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){var i,r,a;i=e,r=t,a=n[t],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function 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 o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n;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(o(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(o(e)));return e}}n.d(t,{A:()=>u,i:()=>l});var l=null;try{l=require("react").createContext()}catch(e){}var c={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function u(e){if("object"!==a(e))throw Error("single-spa-react requires a configuration object");var t,n=r(r({},c),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw 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");!l&&n.React.createContext&&(l=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 i={bootstrap:p.bind(null,n),mount:d.bind(null,n),unmount:f.bind(null,n)};return n.parcelCanUpdate&&(i.update=m.bind(null,n)),i}function p(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function d(e,t){return new Promise(function(n,i){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 r,a=g(e,t,function(){n(this)}),o=s(e,t)(),l=function(e){var t=e.reactDom,n=e.renderType,i=e.elementToRender,r=e.domElement,a=t[n];if("function"!=typeof a)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var o=a(r);return o.render(i),o;case"hydrateRoot":return a(r,i);default:return a(i,r),null}}({elementToRender:a,domElement:o,reactDom:h(e),renderType:"function"==typeof(r=e).renderType?r.renderType():r.renderType});e.domElements[t.name]=o,e.renderResults[t.name]=l})}function f(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var i=e.renderResults[t.name];i&&i.unmount?i.unmount():h(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 i=g(e,t,null),r=e.renderResults[t.name];if(r&&r.render)r.render(i);else{var a=s(e,t)();h(e).render(i,a)}})}function h(e){return e.ReactDOMClient||e.ReactDOM}function g(e,t,n){var i=e.React.createElement(e.rootComponent,t),a=l?e.React.createElement(l.Provider,{value:t},i):i;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),a=e.React.createElement(e.errorBoundaryClass,t,a)),a=e.React.createElement(e.SingleSpaRoot,r(r({},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])}}),a)}},22956:function(e,t,n){"use strict";let i;n.d(t,{AG:()=>ex,EH:()=>ea,fz:()=>ez,xL:()=>G});var r=Object.freeze({__proto__:null,get start(){return ej},get ensureJQuerySupport(){return em},get setBootstrapMaxTime(){return Y},get setMountMaxTime(){return J},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return X},get registerApplication(){return ex},get unregisterApplication(){return eE},get getMountedApps(){return eA},get getAppStatus(){return e$},get unloadApplication(){return eD},get checkActivityFunctions(){return eC},get getAppNames(){return ew},get pathToActiveWhen(){return ez},get navigateToUrl(){return ea},get patchHistoryApi(){return ep},get triggerAppChange(){return eO},get addErrorHandler(){return c},get removeErrorHandler(){return u},get mountRootParcel(){return G},get NOT_LOADED(){return f},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return h},get BOOTSTRAPPING(){return g},get NOT_MOUNTED(){return y},get MOUNTING(){return b},get UPDATING(){return A},get LOAD_ERROR(){return k},get MOUNTED(){return v},get UNLOADING(){return $},get UNMOUNTING(){return w},get SKIP_BECAUSE_BROKEN(){return x}}),a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,o=!function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"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=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:a;let s=[];function l(e,t,n){let i=d(e,t,n);s.length?s.forEach(e=>e(i)):setTimeout(()=>{throw i})}function c(e){if("function"!=typeof e)throw Error(p(28,!1));s.push(e)}function u(e){if("function"!=typeof e)throw Error(p(29,!1));let t=!1;return s=s.filter(n=>{let i=n===e;return t=t||i,!i}),t}function p(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 d(e,t,n){let i,r=`${B(t)} '${D(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=r+e.message}catch(e){}i=e}else{console.warn(p(30,!1,t.status,D(t)));try{i=Error(r+JSON.stringify(e))}catch(t){i=e}}return i.appOrParcelName=D(t),t.status=n,i}let f="NOT_LOADED",m="LOADING_SOURCE_CODE",h="NOT_BOOTSTRAPPED",g="BOOTSTRAPPING",y="NOT_MOUNTED",b="MOUNTING",v="MOUNTED",A="UPDATING",w="UNMOUNTING",$="UNLOADING",k="LOAD_ERROR",x="SKIP_BECAUSE_BROKEN";function C(e){return e.status===v}function E(e){try{return e.activeWhen(window.location)}catch(t){return l(t,e,x),!1}}function D(e){return e.name}function S(e){return!!e.unmountThisParcel}function B(e){return S(e)?"parcel":"application"}function z(){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 P(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function T(e){return e&&("function"==typeof e||Array.isArray(e)&&!P(e,e=>"function"!=typeof e))}function M(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let i=B(e),r=D(e);return function(e){return n.reduce((n,a,o)=>n.then(()=>{let n=a(e);return O(n)?n:Promise.reject(p(15,!1,i,r,t,o))}),Promise.resolve())}}function O(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let F=[];function I(e,t){return Promise.resolve().then(()=>e.status!==h?e:(e.status=g,e.bootstrap?Q(e,"bootstrap").then(n).catch(n=>{if(t)throw d(n,e,x);return l(n,e,x),e}):Promise.resolve().then(n)));function n(){return e.status=y,e}}function N(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;return e.status=w,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,i=>n().then(()=>{let n=Error(i.message);if(t)throw d(n,e,x);l(n,e,x)})).then(()=>e);function n(){return Q(e,"unmount").then(()=>{e.status=y},n=>{if(t)throw d(n,e,x);l(n,e,x)})}})}let j=!1,R=!1;function L(e,t){return Promise.resolve().then(()=>e.status!==y?e:(j||(window.dispatchEvent(new o("single-spa:before-first-mount")),j=!0),e.status=b,Q(e,"mount").then(()=>(e.status=v,R||(window.dispatchEvent(new o("single-spa:first-mount")),R=!0),e)).catch(n=>{return e.status=v,N(e,!0).then(i,i);function i(){if(t)throw d(n,e,x);return l(n,e,x),e}})))}let V=0,H={parcels:{}};function G(){return U.apply(H,arguments)}function U(e,t){let n,i,r,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,typeof e.name));let o=V++,s=e.name||`parcel-${o}`;if("object"!=typeof t)throw Error(p(4,!1,s,typeof t));if(!t.domElement)throw Error(p(5,!1,s));let l="function"==typeof e,c=l?e:()=>Promise.resolve(e),u={id:o,parcels:{},status:l?m:h,customProps:t,parentName:D(a),unmountThisParcel:()=>b.then(()=>{if(u.status!==v)throw Error(p(6,!1,s,u.status));return N(u,!0)}).then(e=>(u.parentName&&delete a.parcels[u.id],e)).then(e=>(i(e),e)).catch(e=>{throw u.status=x,r(e),e})};a.parcels[o]=u;let f=c();if(!f||"function"!=typeof f.then)throw Error(p(7,!1));let g=(f=f.then(e=>{if(!e)throw Error(p(8,!1));if(s=e.name||`parcel-${o}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!T(e.bootstrap))throw Error(p(9,!1,s));if(!T(e.mount))throw Error(p(10,!1,s));if(!T(e.unmount))throw Error(p(11,!1,s));if(e.update&&!T(e.update))throw Error(p(12,!1,s));let t=M(e,"bootstrap"),i=M(e,"mount"),r=M(e,"unmount");u.status=h,u.name=s,u.bootstrap=t,u.mount=i,u.unmount=r,u.timeouts=ee(e.timeouts),e.update&&(u.update=M(e,"update"),n.update=function(e){return u.customProps=e,q(Promise.resolve().then(()=>{if(u.status!==v)throw Error(p(32,!1,D(u)));return u.status=A,Q(u,"update").then(()=>(u.status=v,u)).catch(e=>{throw d(e,u,x)})}))})})).then(()=>I(u,!0)),b=g.then(()=>L(u,!0)),w=new Promise((e,t)=>{i=e,r=t});return n={mount:()=>q(Promise.resolve().then(()=>{if(u.status!==y)throw Error(p(13,!1,s,u.status));return a.parcels[o]=u,L(u)})),unmount:()=>q(u.unmountThisParcel()),getStatus:()=>u.status,loadPromise:q(f),bootstrapPromise:q(g),mountPromise:q(b),unmountPromise:q(w)}}function q(e){return e.then(()=>null)}function W(e){let t=D(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));let i=z({},n,{name:t,mountParcel:U.bind(e),singleSpa:r});return S(e)&&(i.unmountSelf=e.unmountThisParcel),i}let K={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 Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(16,!1));K.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function J(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));K.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));K.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function X(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));K.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t){let n=e.timeouts[t],i=n.warningMillis,r=B(e);return new Promise((a,o)=>{let s=!1,l=!1;e[t](W(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,o(e)}),setTimeout(()=>u(1),i),setTimeout(()=>u(!0),n.millis);let c=p(31,!1,t,r,D(e),n.millis);function u(e){s||(!0===e?(l=!0,n.dieOnTimeout?o(Error(c)):console.error(c)):!l&&(console.warn(c),e*i+i<n.millis&&setTimeout(()=>u(e+1),i)))}})}function ee(e){let t={};for(let n in K)t[n]=z({},K[n],e&&e[n]||{});return t}function et(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==f&&e.status!==k?e:(e.status=m,e.loadPromise=Promise.resolve().then(()=>{let i=e.loadApp(W(e));if(!O(i))throw n=!0,Error(p(33,!1,D(e)));return i.then(n=>{let i;e.loadErrorTime=null,"object"!=typeof(t=n)&&(i=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!T(t.bootstrap)&&(i=35),T(t.mount)||(i=36),T(t.unmount)||(i=37);let r=B(t);if(i){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(p(i,!1,r,D(e),n),t),l(void 0,e,x),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=z({},e.devtools.overlays,t.devtools.overlays)),e.status=h,e.bootstrap=M(t,"bootstrap"),e.mount=M(t,"mount"),e.unmount=M(t,"unmount"),e.unload=M(t,"unload"),e.timeouts=ee(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let i;return delete e.loadPromise,n?i=x:(i=k,e.loadErrorTime=(new Date).getTime()),l(t,e,i),e}))})}let en="undefined"!=typeof window,ei={hashchange:[],popstate:[]},er=["hashchange","popstate"];function ea(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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=ed(window.location.href),i=ed(t);0===t.indexOf("#")?window.location.hash=i.hash:n.host!==i.host&&i.host?window.location.href=t:i.pathname===n.pathname&&i.search===n.search?window.location.hash=i.hash:window.history.pushState(null,null,t)}function eo(e){if(e){let t=e[0].type;er.indexOf(t)>=0&&ei[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function es(){eF([],arguments)}function el(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),a=window.location.href;return i&&n===a||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let ec=null,eu=!1;function ep(e){if(eu)throw Error(p(43,!1));i=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,eu=!0,ec=window.history.replaceState,window.addEventListener("hashchange",es),window.addEventListener("popstate",es);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&er.indexOf(e)>=0)||P(ei[e],e=>e===n))return t.apply(this,arguments);ei[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&er.indexOf(e)>=0&&(ei[e]=ei[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=el(window.history.pushState,"pushState"),window.history.replaceState=el(ec,"replaceState")}function ed(e){let t=document.createElement("a");return t.href=e,t}en&&(window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=ea);let ef=!1;function em(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ef){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return eh.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return eh.call(this,n,window.removeEventListener,e,t,arguments)},ef=!0}}function eh(e,t,n,i,r){return"string"!=typeof n?e.apply(this,r):(n.split(/\s+/).forEach(e=>{er.indexOf(e)>=0&&(t(e,i),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,r))}let e_={};function eg(e){return Promise.resolve().then(()=>{let t=e_[D(e)];if(!t)return e;if(e.status===f)return ey(e,t),e;if(e.status===$)return t.promise.then(()=>e);if(e.status!==y&&e.status!==k)return e;let n=e.status===k?Promise.resolve():Q(e,"unload");return e.status=$,n.then(()=>(ey(e,t),e)).catch(n=>(delete e_[D(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,l(n,e,x),t.reject(n),e))})}function ey(e,t){delete e_[D(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=f,t.resolve()}function eb(e,t,n,i){e_[D(e)]={app:e,resolve:n,reject:i},Object.defineProperty(e_[D(e)],"promise",{get:t})}let ev=[];function eA(){return ev.filter(C).map(D)}function ew(){return ev.map(D)}function e$(e){let t=P(ev,t=>D(t)===e);return t?t.status:null}let ek=!1;function ex(e,t,n,i){var r,a;let o,s,l=(o={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));let 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(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(p(20,!1));let i=e=>"string"==typeof e||"function"==typeof e;if(!(i(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(i)))throw Error(p(24,!1));if(!eB(e.customProps))throw Error(p(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,i){if("string"!=typeof e||0===e.length)throw Error(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!eB(i))throw Error(p(22,!1))}(e,t,n,i),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=i),o.loadApp="function"!=typeof(r=o.loadApp)?()=>Promise.resolve(r):r,o.customProps=o.customProps||{},s=(s=Array.isArray(a=o.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:ez(e)),o.activeWhen=e=>s.some(t=>t(e)),o);if(eN||ek||(ek=!0,setTimeout(()=>{eN||console.warn(p(1,!1))},5e3)),-1!==ew().indexOf(l.name))throw Error(p(21,!1,l.name));ev.push(z({loadErrorTime:null,status:f,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),en&&(em(),eF())}function eC(e=window.location){return ev.filter(t=>t.activeWhen(e)).map(D)}function eE(e){if(0===ev.filter(t=>D(t)===e).length)throw Error(p(25,!1,e));return(en?eD(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=ev.map(D).indexOf(e);ev.splice(t,1)})}function eD(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(p(26,!1));let n=P(ev,t=>D(t)===e);if(!n)throw Error(p(27,!1,e));let i=e_[D(n)];if(t&&t.waitForUnmount){if(i)return i.promise;{let e=new Promise((t,i)=>{eb(n,()=>e,t,i)});return e}}{let e;return i?(e=i.promise,eS(n,i.resolve,i.reject)):e=new Promise((t,i)=>{eb(n,()=>e,t,i),eS(n,t,i)}),e}}function eS(e,t,n){Promise.resolve().then(()=>{if(P(eC(),t=>t===D(e)))return eO()}).then(()=>N(e).then(eg).then(()=>{t(),setTimeout(()=>{eF()})})).catch(n)}function eB(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function ez(e,t){let n=function(e,t){let n=0,i=!1,r="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],r=i&&"/"===n;(!i&&":"===n||r)&&a(t)}return a(e.length),RegExp(r,"i");function a(a){let o=e.slice(n,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r+=i?"[^/]+/?":o,a===e.length)if(i)t&&(r+="$");else{let e=t?"":".*";r="/"===r.charAt(r.length-1)?`${r}${e}$`:`${r}(/${e})?(#.*)?$`}i=!i,n=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let i=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(i)}}let eP=!1,eT=[],eM=en&&window.location.href;function eO(){return eF()}function eF(e=[],t,n=!1){let i,r,a,s,l;if(eP)return new Promise((e,n)=>{eT.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:c,appsToUnmount:u,appsToLoad:d,appsToMount:g}=(i=[],r=[],a=[],s=[],l=(new Date).getTime(),ev.forEach(e=>{let t=e.status!==x&&E(e);switch(e.status){case k:t&&l-e.loadErrorTime>=200&&a.push(e);break;case f:case m:t&&a.push(e);break;case h:case y:!t&&e_[D(e)]?i.push(e):t&&s.push(e);break;case v:t||r.push(e)}}),{appsToUnload:i,appsToUnmount:r,appsToLoad:a,appsToMount:s}),b,A=[],w=eM,$=eM=window.location.href;return eN?(eP=!0,b=c.concat(d,u,g),Promise.resolve().then(()=>(T(0===b.length?"before-no-app-change":"before-app-change",P(!0)),T("before-routing-event",P(!0,{cancelNavigation:C})),Promise.all(A).then(n=>{if(n.some(e=>e))return ec.call(window.history,history.state,"",w.substring(location.origin.length)),eM=location.href,eP=!1,eF(e,t,!0);let i=c.map(eg),r=Promise.all(u.map(N).map(e=>e.then(eg)).concat(i));r.then(()=>{T("before-mount-routing-event",P(!0))},e=>{throw e});let a=d.map(e=>et(e).then(e=>eI(e,r))),o=g.filter(e=>0>d.indexOf(e)).map(e=>eI(e,r));return r.catch(e=>{throw B(),e}).then(()=>(B(),Promise.all(a.concat(o)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(S).then(()=>{},e=>{throw e})))})))):(b=d,Promise.resolve().then(()=>Promise.all(d.map(et)).then(B).then(()=>[]).catch(e=>{throw B(),e}).finally(()=>{})));function C(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);A.push(t.catch(e=>(console.warn(Error(p(42,!1))),console.warn(e),!1)))}function S(){let t=eA();e.forEach(e=>e.resolve(t));try{T(0===b.length?"no-app-change":"app-change",P()),T("routing-event",P())}catch(e){setTimeout(()=>{throw e})}if(eP=!1,eT.length>0){let e=eT;eT=[],eF(e)}return t}function B(){n||(e.forEach(e=>{eo(e.eventArguments)}),eo(t))}function P(e=!1,n){let i={},r={[v]:[],[y]:[],[f]:[],[x]:[]};e?(d.concat(g).forEach((e,t)=>{o(e,v)}),c.forEach(e=>{o(e,f)}),u.forEach(e=>{o(e,y)})):b.forEach(e=>{o(e)});let a={detail:{newAppStatuses:i,appsByNewStatus:r,totalAppChanges:b.length,originalEvent:null==t?void 0:t[0],oldUrl:w,newUrl:$}};return n&&z(a.detail,n),a;function o(e,t){let n=D(e);t=t||e$(n),i[n]=t,(r[t]=r[t]||[]).push(n)}}function T(e,t){n||window.dispatchEvent(new o(`single-spa:${e}`,t))}}function eI(e,t){return E(e)?I(e).then(e=>t.then(()=>E(e)?L(e):e)):t.then(()=>e)}let eN=!1;function ej(e){eN=!0,en&&(ep(e),eF())}en&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...ev]},reroute:eF,NOT_LOADED:f,toLoadPromise:et,toBootstrapPromise:I,unregisterApplication:eE,getProfilerData:function(){return F}})},70937:function(e,t,n){"use strict";n.d(t,{lo:()=>y,HW:()=>$,QE:()=>O,xC:()=>S,$f:()=>v,Kx:()=>B,EW:()=>k,E4:()=>x,Gm:()=>g,eA:()=>A,yH:()=>C,ut:()=>b,Y0:()=>F,L7:()=>M,IU:()=>m,Jj:()=>f,g$:()=>E,Gp:()=>z,Ct:()=>h,Fi:()=>P,st:()=>D});var i=n(64201),r=n(467);let a=function(e){return void 0===e};var o=n(26049),s=n(92562),l=n(13070),c=n(17744);let u="${openmrsSpaBase}/login",p={redirectAuthFailure:{enabled:{_type:l.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:l.ZU.String,_default:u,_validators:[l.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:l.ZU.Array,_default:[401],_elements:{_type:l.ZU.Number,_validators:[l.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:l.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:l.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}let f="/ws/rest/v1",m="/ws/fhir2/R4",h=`${f}/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,s.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(f)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(m)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let i=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:r}=await (0,l.zj)("@openmrs/esm-api");if(e.ok)if(204!==e.status)return e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e});else{if(r&&e.headers.has("location")){let t=e.headers.get("location");t&&(0,c.oo)({to:t})}return e.data=null,e}if(!(n===g(h)&&403===e.status||t.enabled&&t.errors.includes(e.status)))return e.clone().text().then(t=>{let r=t;try{r=JSON.parse(t)}catch(e){}throw new v(n,e,r,i)},t=>{throw new v(n,e,null,i)});{(0,c.g4)();let n=t.url||e.headers.get("location")||u;return(0,c.oo)({to:n}),t.resolvePromise?Promise.resolve():new Promise(()=>{})}})}function b(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let n=new AbortController;return t.signal=n.signal,new o.c(i=>{let r=!1;return y(e,t).then(e=>{r=!0,i.next(e),i.complete()},e=>{r=!0,i.error(e)}),()=>{r||n.abort()}})}class v extends Error{constructor(e,t,n,i){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`,i.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
|
|
7
|
+
`.trim(),e.head.prepend(t)},[d]),(0,v.useEffect)(()=>{let e=g.current;return()=>{var t;for(let n of(p||tw(null!=(t=e.target)?t:void 0),e.disposables))n();e.disposables=[]}},[p]),{isPressed:l||m,pressProps:eT(f,D,{[tN]:!0})}}function tR(e){return"A"===e.tagName&&e.hasAttribute("href")}function tL(e,t){let{key:n,code:i}=e,r=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===i)&&!(t instanceof eQ(t).HTMLInputElement&&!tU(t,n)||t instanceof eQ(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===r||!r&&tR(t))&&"Enter"!==n)}function tV(e,t){let n=t.clientX,i=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:i}}function tH(e,t){return e instanceof HTMLInputElement?!tU(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!tR(e))}let tG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function tU(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:tG.has(e.type)}let tq=null,tW=new Set,tK=new Map,tY=!1,tJ=!1,tZ={Tab:!0,Escape:!0};function tX(e,t){for(let n of tW)n(e,t)}function tQ(e){tY=!0,e.metaKey||!ts()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(tq="keyboard",tX("keyboard",e))}function t0(e){tq="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(tY=!0,tX("pointer",e))}function t1(e){tP(e)&&(tY=!0,tq="virtual")}function t2(e){e.target!==window&&e.target!==document&&!ti&&e.isTrusted&&(tY||tJ||(tq="virtual",tX("virtual",e)),tY=!1,tJ=!1)}function t3(){ti||(tY=!1,tJ=!0)}function t4(e){if("undefined"==typeof window||"undefined"==typeof document||tK.get(eQ(e)))return;let t=eQ(e),n=eX(e),i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tY=!0,i.apply(this,arguments)},n.addEventListener("keydown",tQ,!0),n.addEventListener("keyup",tQ,!0),n.addEventListener("click",t1,!0),t.addEventListener("focus",t2,!0),t.addEventListener("blur",t3,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",t0,!0),n.addEventListener("pointermove",t0,!0),n.addEventListener("pointerup",t0,!0)),t.addEventListener("beforeunload",()=>{t5(e)},{once:!0}),tK.set(t,{focus:i})}let t5=(e,t)=>{let n=eQ(e),i=eX(e);t&&i.removeEventListener("DOMContentLoaded",t),tK.has(n)&&(n.HTMLElement.prototype.focus=tK.get(n).focus,i.removeEventListener("keydown",tQ,!0),i.removeEventListener("keyup",tQ,!0),i.removeEventListener("click",t1,!0),n.removeEventListener("focus",t2,!0),n.removeEventListener("blur",t3,!1),"undefined"!=typeof PointerEvent&&(i.removeEventListener("pointerdown",t0,!0),i.removeEventListener("pointermove",t0,!0),i.removeEventListener("pointerup",t0,!0)),tK.delete(n))};function t6(){return"pointer"!==tq}"undefined"!=typeof document&&("loading"!==(o=eX(void 0)).readyState?t4(c):(a=()=>{t4(c)},o.addEventListener("DOMContentLoaded",a)),()=>t5(c,a));let t7=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function t8(e){let t=eX(e),n=((e=document)=>e.activeElement)(t);"virtual"===tq?ty(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&e8(e)}):e8(e)}function t9(e){let{isDisabled:t,onFocus:n,onBlur:i,onFocusChange:r}=e,a=(0,v.useCallback)(e=>{if(e.target===e.currentTarget)return i&&i(e),r&&r(!1),!0},[i,r]),o=tn(a),s=(0,v.useCallback)(e=>{let t=eX(e.target),i=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&i===tB(e.nativeEvent)&&(n&&n(e),r&&r(!0),o(e))},[r,n,o]);return{focusProps:{onFocus:!t&&(n||r||i)?s:void 0,onBlur:!t&&(i||r)?a:void 0}}}function ne(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}let nt=v.createContext(null);function nn(e,t){let{focusProps:n}=t9(e),{keyboardProps:i}={keyboardProps:e.isDisabled?{}:{onKeyDown:ne(e.onKeyDown),onKeyUp:ne(e.onKeyUp)}},r=eT(n,i),a=function(e){let t=(0,v.useContext)(nt)||{};tE(t,e);let{ref:n,...i}=t;return i}(t),o=e.isDisabled?{}:a,s=(0,v.useRef)(e.autoFocus);(0,v.useEffect)(()=>{s.current&&t.current&&t8(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:eT({...r,tabIndex:l},o)}}function ni(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:i,onFocusWithinChange:r}=e,a=(0,v.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=tD(),l=(0,v.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),r&&r(!1))},[n,r,a,s]),c=tn(l),u=(0,v.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=eX(e.target),n=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&n===tB(e.nativeEvent)){i&&i(e),r&&r(!0),a.current.isFocusWithin=!0,c(e);let n=e.currentTarget;o(t,"focus",e=>{if(a.current.isFocusWithin&&!tS(n,e.target)){let i=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});tt(i,n),l(te(i))}},{capture:!0})}},[i,r,c,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function nr(e={}){var t;let{autoFocus:n=!1,isTextInput:i,within:r}=e,a=(0,v.useRef)({isFocused:!1,isFocusVisible:n||t6()}),[o,s]=(0,v.useState)(!1),[l,c]=(0,v.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),u=(0,v.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]),p=(0,v.useCallback)(e=>{a.current.isFocused=e,s(e),u()},[u]);t={isTextInput:i},t4(),(0,v.useEffect)(()=>{let e=(e,n)=>{var i;let r,o,s,l,c;i=!!(null==t?void 0:t.isTextInput),r=eX(null==n?void 0:n.target),o="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,s="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l="undefined"!=typeof window?eQ(null==n?void 0:n.target).HTMLElement:HTMLElement,c="undefined"!=typeof window?eQ(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(i=i||r.activeElement instanceof o&&!t7.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof l&&r.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof c&&!tZ[n.key]||(e=>{a.current.isFocusVisible=e,u()})(t6())};return tW.add(e),()=>{tW.delete(e)}},[]);let{focusProps:d}=t9({isDisabled:r,onFocusChange:p}),{focusWithinProps:f}=ni({isDisabled:!r,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:l,focusProps:r?f:d}}v.forwardRef(function(e,t){let{children:n,...i}=e,r=ew(t),a={...i,ref:r};return v.createElement(nt.Provider,{value:a},n)});let na=!1,no=0;function ns(e){"touch"===e.pointerType&&(na=!0,setTimeout(()=>{na=!1},50))}function nl(){if("undefined"!=typeof document)return 0===no&&"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",ns),no++,()=>{--no>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",ns)}}function nc(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,isDisabled:r}=e,[a,o]=(0,v.useState)(!1),s=(0,v.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,v.useEffect)(nl,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=tD(),{hoverProps:u,triggerHoverEnd:p}=(0,v.useMemo)(()=>{let e=(e,t)=>{let r=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&r&&(s.isHovered=!1,c(),i&&i({type:"hoverend",target:r,pointerType:t}),n&&n(!1),o(!1))},a={};return"undefined"!=typeof PointerEvent&&(a.onPointerEnter=i=>{na&&"mouse"===i.pointerType||((i,a)=>{if(s.pointerType=a,r||"touch"===a||s.isHovered||!i.currentTarget.contains(i.target))return;s.isHovered=!0;let c=i.currentTarget;s.target=c,l(eX(i.target),"pointerover",t=>{s.isHovered&&s.target&&!tS(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:a}),n&&n(!0),o(!0)})(i,i.pointerType)},a.onPointerLeave=t=>{!r&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,n,i,r,s,l,c]);return(0,v.useEffect)(()=>{r&&p({currentTarget:s.target},s.pointerType)},[r]),{hoverProps:u,isHovered:a}}if("undefined"!=typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let nu=(0,v.createContext)(!1);function np(e){let t=(t,n)=>(0,v.useContext)(nu)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,v.forwardRef)(t)}let nd=(0,v.createContext)({}),nf=np(function(e,t){var n;[e,t]=eN(e,t,nd);let i=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:r}=i,{buttonProps:a,isPressed:o}=function(e,t){let n,{elementType:i="button",isDisabled:r,onPress:a,onPressStart:o,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:p,onClick:d,href:f,target:m,rel:h,type:g="button"}=e;n="button"===i?{type:g,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==i||r?void 0:f,target:"a"===i?m:void 0,type:"input"===i?g:void 0,disabled:"input"===i?r:void 0,"aria-disabled":r&&"input"!==i?r:void 0,rel:"a"===i?h:void 0};let{pressProps:y,isPressed:b}=tj({onPressStart:o,onPressEnd:s,onPressChange:c,onPress:a,onPressUp:l,onClick:d,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:v}=nn(e,t);p&&(v.tabIndex=r?-1:v.tabIndex);let A=eT(v,y,eZ(e,{labelable:!0}));return{isPressed:b,buttonProps:eT(n,A,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:c}=nr(e),{hoverProps:u,isHovered:p}=nc({...e,isDisabled:e.isDisabled||r}),d={isHovered:p,isPressed:(i.isPressed||o)&&!r,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=r&&r},f=eF({...e,values:d,defaultClassName:"react-aria-Button"}),m=eB(a.id),h=eB(),g=a["aria-labelledby"];r&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,v.useRef)(r);(0,v.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&r?eH(e,"assertive"):y.current&&l&&!r&&eH(e,"assertive"),y.current=r},[r,l,g,m]);let b=eZ(e,{global:!0});return delete b.onClick,v.createElement("button",{...eT(b,f,a,s,u),type:"submit"===a.type&&r?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":r?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":p||void 0,"data-focused":l||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},v.createElement(eL.Provider,{value:{id:h}},f.children))});(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null),(0,v.createContext)(null);let nm=(0,v.createContext)({}),nh=(0,v.createContext)({}),n_=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,nh);let{elementType:n="span",...i}=e;return v.createElement(n,{className:"react-aria-Text",...i,ref:t})});var ng={};ng={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:`\u{627}\u{646}\u{642}\u{631} \u{644}\u{625}\u{646}\u{647}\u{627}\u{621} \u{639}\u{645}\u{644}\u{64A}\u{629} \u{62A}\u{62D}\u{62F}\u{64A}\u{62F} \u{646}\u{637}\u{627}\u{642} \u{627}\u{644}\u{62A}\u{627}\u{631}\u{64A}\u{62E}`,maximumDate:`\u{622}\u{62E}\u{631} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62A}\u{627}\u{62D}`,minimumDate:`\u{623}\u{648}\u{644} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62A}\u{627}\u{62D}`,next:`\u{627}\u{644}\u{62A}\u{627}\u{644}\u{64A}`,previous:`\u{627}\u{644}\u{633}\u{627}\u{628}\u{642}`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{627}\u{646}\u{642}\u{631} \u{644}\u{628}\u{62F}\u{621} \u{639}\u{645}\u{644}\u{64A}\u{629} \u{62A}\u{62D}\u{62F}\u{64A}\u{62F} \u{646}\u{637}\u{627}\u{642} \u{627}\u{644}\u{62A}\u{627}\u{631}\u{64A}\u{62E}`,todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435}, \u{437}\u{430} \u{434}\u{430} \u{434}\u{43E}\u{432}\u{44A}\u{440}\u{448}\u{438}\u{442}\u{435} \u{438}\u{437}\u{431}\u{43E}\u{440}\u{430} \u{43D}\u{430} \u{432}\u{440}\u{435}\u{43C}\u{435}\u{432}\u{438} \u{438}\u{43D}\u{442}\u{435}\u{440}\u{432}\u{430}\u{43B}`,maximumDate:`\u{41F}\u{43E}\u{441}\u{43B}\u{435}\u{434}\u{43D}\u{430} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{44A}\u{440}\u{432}\u{430} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,next:`\u{41D}\u{430}\u{43F}\u{440}\u{435}\u{434}`,previous:`\u{41D}\u{430}\u{437}\u{430}\u{434}`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435}, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{440}\u{438}\u{441}\u{442}\u{44A}\u{43F}\u{438}\u{442}\u{435} \u{43A}\u{44A}\u{43C} \u{438}\u{437}\u{431}\u{43E}\u{440}\u{430} \u{43D}\u{430} \u{432}\u{440}\u{435}\u{43C}\u{435}\u{432}\u{438} \u{438}\u{43D}\u{442}\u{435}\u{440}\u{432}\u{430}\u{43B}`,todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:`Kliknut\xedm dokon\u{10D}\xedte v\xfdb\u{11B}r rozsahu dat`,maximumDate:`Posledn\xed dostupn\xe9 datum`,minimumDate:`Prvn\xed dostupn\xe9 datum`,next:`Dal\u{161}\xed`,previous:`P\u{159}edchoz\xed`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknut\xedm zah\xe1j\xedte v\xfdb\u{11B}r rozsahu dat`,todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klik for at fuldf\xf8re valg af datoomr\xe5de`,maximumDate:"Sidste ledige dato",minimumDate:`F\xf8rste ledige dato`,next:`N\xe6ste`,previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:`Klik for at starte valg af datoomr\xe5de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:`Letztes verf\xfcgbares Datum`,minimumDate:`Erstes verf\xfcgbares Datum`,next:"Weiter",previous:`Zur\xfcck`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:`\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BF}\u{3BB}\u{3BF}\u{3BA}\u{3BB}\u{3B7}\u{3C1}\u{3CE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C5}\u{3C2} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3B9}\u{3CE}\u{3BD}`,maximumDate:`\u{3A4}\u{3B5}\u{3BB}\u{3B5}\u{3C5}\u{3C4}\u{3B1}\u{3AF}\u{3B1} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}`,minimumDate:`\u{3A0}\u{3C1}\u{3CE}\u{3C4}\u{3B7} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}`,next:`\u{395}\u{3C0}\u{3CC}\u{3BC}\u{3B5}\u{3BD}\u{3BF}`,previous:`\u{3A0}\u{3C1}\u{3BF}\u{3B7}\u{3B3}\u{3BF}\u{3CD}\u{3BC}\u{3B5}\u{3BD}\u{3BF}`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{39A}\u{3AC}\u{3BD}\u{3C4}\u{3B5} \u{3BA}\u{3BB}\u{3B9}\u{3BA} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3BE}\u{3B5}\u{3BA}\u{3B9}\u{3BD}\u{3AE}\u{3C3}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3B7}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C5}\u{3C2} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3B9}\u{3CE}\u{3BD}`,todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:`\xdaltima fecha disponible`,minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:`Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks`,maximumDate:`Viimane saadaolev kuup\xe4ev`,minimumDate:`Esimene saadaolev kuup\xe4ev`,next:`J\xe4rgmine`,previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:`Kl\xf5psake kuup\xe4evavahemiku valimiseks`,todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:`Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.`,maximumDate:`Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4`,minimumDate:`Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4`,next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:`Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.`,todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:`Cliquer pour finir de s\xe9lectionner la plage de dates`,maximumDate:`Derni\xe8re date disponible`,minimumDate:`Premi\xe8re date disponible`,next:"Suivant",previous:`Pr\xe9c\xe9dent`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:`Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates`,todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:`\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E1}\u{5D9}\u{5D9}\u{5DD} \u{5D0}\u{5EA} \u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5EA} \u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DB}\u{5D9}\u{5DD}`,maximumDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E4}\u{5E0}\u{5D5}\u{5D9} \u{5D0}\u{5D7}\u{5E8}\u{5D5}\u{5DF}`,minimumDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E4}\u{5E0}\u{5D5}\u{5D9} \u{5E8}\u{5D0}\u{5E9}\u{5D5}\u{5DF}`,next:`\u{5D4}\u{5D1}\u{5D0}`,previous:`\u{5D4}\u{5E7}\u{5D5}\u{5D3}\u{5DD}`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{5DC}\u{5D7}\u{5E5} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D4}\u{5EA}\u{5D7}\u{5D9}\u{5DC} \u{5D1}\u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5EA} \u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DB}\u{5D9}\u{5DD}`,todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:`Kliknite da dovr\u{161}ite raspon odabranih datuma`,maximumDate:`Posljednji raspolo\u{17E}ivi datum`,minimumDate:`Prvi raspolo\u{17E}ivi datum`,next:`Sljede\u{107}i`,previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapo\u{10D}nete raspon odabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:`Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez`,maximumDate:`Utols\xf3 el\xe9rhet\u{151} d\xe1tum`,minimumDate:`Az els\u{151} el\xe9rhet\u{151} d\xe1tum`,next:`K\xf6vetkez\u{151}`,previous:`El\u{151}z\u{151}`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:`Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz`,todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:`Fai clic per completare la selezione dell\u{2019}intervallo di date`,maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:`Fai clic per selezionare l\u{2019}intervallo di date`,todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:`\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{65E5}\u{4ED8}\u{7BC4}\u{56F2}\u{306E}\u{9078}\u{629E}\u{3092}\u{7D42}\u{4E86}`,maximumDate:`\u{6700}\u{7D42}\u{5229}\u{7528}\u{53EF}\u{80FD}\u{65E5}`,minimumDate:`\u{6700}\u{521D}\u{306E}\u{5229}\u{7528}\u{53EF}\u{80FD}\u{65E5}`,next:`\u{6B21}\u{3078}`,previous:`\u{524D}\u{3078}`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:`\u{30AF}\u{30EA}\u{30C3}\u{30AF}\u{3057}\u{3066}\u{65E5}\u{4ED8}\u{7BC4}\u{56F2}\u{306E}\u{9078}\u{629E}\u{3092}\u{958B}\u{59CB}`,todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:`\u{B0A0}\u{C9DC} \u{BC94}\u{C704} \u{C120}\u{D0DD}\u{C744} \u{C644}\u{B8CC}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C2ED}\u{C2DC}\u{C624}.`,maximumDate:`\u{B9C8}\u{C9C0}\u{B9C9}\u{C73C}\u{B85C} \u{C0AC}\u{C6A9} \u{AC00}\u{B2A5}\u{D55C} \u{C77C}\u{C790}`,minimumDate:`\u{CC98}\u{C74C}\u{C73C}\u{B85C} \u{C0AC}\u{C6A9} \u{AC00}\u{B2A5}\u{D55C} \u{C77C}\u{C790}`,next:`\u{B2E4}\u{C74C}`,previous:`\u{C774}\u{C804}`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{B0A0}\u{C9DC} \u{BC94}\u{C704} \u{C120}\u{D0DD}\u{C744} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} \u{D074}\u{B9AD}\u{D558}\u{C2ED}\u{C2DC}\u{C624}.`,todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:`Spustel\u{117}kite, kad baigtum\u{117}te pasirinkti dat\u{173} interval\u{105}`,maximumDate:`Paskutin\u{117} galima data`,minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:`Spustel\u{117}kite, kad prad\u{117}tum\u{117}te pasirinkti dat\u{173} interval\u{105}`,todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:`Noklik\u{161}\u{137}iniet, lai pabeigtu datumu diapazona atlasi`,maximumDate:`P\u{113}d\u{113}jais pieejamais datums`,minimumDate:"Pirmais pieejamais datums",next:`T\u{101}l\u{101}k`,previous:`Atpaka\u{13C}`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:`Noklik\u{161}\u{137}iniet, lai s\u{101}ktu datumu diapazona atlasi`,todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de`,maximumDate:"Siste tilgjengelige dato",minimumDate:`F\xf8rste tilgjengelige dato`,next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:`Klikk for \xe5 starte valg av datoomr\xe5de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:`Kliknij, aby zako\u{144}czy\u{107} wyb\xf3r zakresu dat`,maximumDate:`Ostatnia dost\u{119}pna data`,minimumDate:`Pierwsza dost\u{119}pna data`,next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknij, aby rozpocz\u{105}\u{107} wyb\xf3r zakresu dat`,todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para concluir a sele\xe7\xe3o do intervalo de datas`,maximumDate:`\xdaltima data dispon\xedvel`,minimumDate:`Primeira data dispon\xedvel`,next:`Pr\xf3ximo`,previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para iniciar a sele\xe7\xe3o do intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:`\xdaltima data dispon\xedvel`,minimumDate:`Primeira data dispon\xedvel`,next:`Pr\xf3ximo`,previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para come\xe7ar a selecionar o intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:`Ap\u{103}sa\u{163}i pentru a finaliza selec\u{163}ia razei pentru dat\u{103}`,maximumDate:`Ultima dat\u{103} disponibil\u{103}`,minimumDate:`Prima dat\u{103} disponibil\u{103}`,next:`Urm\u{103}torul`,previous:`\xcenainte`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:`Ap\u{103}sa\u{163}i pentru a \xeencepe selec\u{163}ia razei pentru dat\u{103}`,todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{438}\u{442}\u{44C} \u{432}\u{44B}\u{431}\u{43E}\u{440} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{430} \u{434}\u{430}\u{442}`,maximumDate:`\u{41F}\u{43E}\u{441}\u{43B}\u{435}\u{434}\u{43D}\u{44F}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{435}\u{440}\u{432}\u{430}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}`,next:`\u{414}\u{430}\u{43B}\u{435}\u{435}`,previous:`\u{41D}\u{430}\u{437}\u{430}\u{434}`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{429}\u{435}\u{43B}\u{43A}\u{43D}\u{438}\u{442}\u{435}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43D}\u{430}\u{447}\u{430}\u{442}\u{44C} \u{432}\u{44B}\u{431}\u{43E}\u{440} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{430} \u{434}\u{430}\u{442}`,todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:`Kliknut\xedm dokon\u{10D}\xedte v\xfdber rozsahu d\xe1tumov`,maximumDate:`Posledn\xfd dostupn\xfd d\xe1tum`,minimumDate:`Prv\xfd dostupn\xfd d\xe1tum`,next:`Nasleduj\xface`,previous:`Predch\xe1dzaj\xface`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov`,todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:`Kliknite za dokon\u{10D}anje izbire datumskega obsega`,maximumDate:`Zadnji razpolo\u{17E}ljivi datum`,minimumDate:`Prvi razpolo\u{17E}ljivi datum`,next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite za za\u{10D}etek izbire datumskega obsega`,todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:`Kliknite da dovr\u{161}ite opseg izabranih datuma`,maximumDate:`Zadnji raspolo\u{17E}ivi datum`,minimumDate:`Prvi raspolo\u{17E}ivi datum`,next:`Slede\u{107}i`,previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapo\u{10D}nete opseg izabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:`Klicka f\xf6r att avsluta val av datumintervall`,maximumDate:`Sista tillg\xe4ngliga datum`,minimumDate:`F\xf6rsta tillg\xe4ngliga datum`,next:`N\xe4sta`,previous:`F\xf6reg\xe5ende`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:`Klicka f\xf6r att v\xe4lja datumintervall`,todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:`Tarih aral\u{131}\u{11F}\u{131} se\xe7imini tamamlamak i\xe7in t\u{131}klay\u{131}n`,maximumDate:`Son m\xfcsait tarih`,minimumDate:`\u{130}lk m\xfcsait tarih`,next:"Sonraki",previous:`\xd6nceki`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:`Tarih aral\u{131}\u{11F}\u{131} se\xe7imini ba\u{15F}latmak i\xe7in t\u{131}klay\u{131}n`,todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{438}\u{442}\u{438} \u{432}\u{438}\u{431}\u{456}\u{440} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{443} \u{434}\u{430}\u{442}`,maximumDate:`\u{41E}\u{441}\u{442}\u{430}\u{43D}\u{43D}\u{44F} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,minimumDate:`\u{41F}\u{435}\u{440}\u{448}\u{430} \u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,next:`\u{41D}\u{430}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{438}\u{439}`,previous:`\u{41F}\u{43E}\u{43F}\u{435}\u{440}\u{435}\u{434}\u{43D}\u{456}\u{439}`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C}, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{432}\u{438}\u{431}\u{456}\u{440} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}\u{443} \u{434}\u{430}\u{442}`,todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:`\u{5355}\u{51FB}\u{4EE5}\u{5B8C}\u{6210}\u{9009}\u{62E9}\u{65E5}\u{671F}\u{8303}\u{56F4}`,maximumDate:`\u{6700}\u{540E}\u{4E00}\u{4E2A}\u{53EF}\u{7528}\u{65E5}\u{671F}`,minimumDate:`\u{7B2C}\u{4E00}\u{4E2A}\u{53EF}\u{7528}\u{65E5}\u{671F}`,next:`\u{4E0B}\u{4E00}\u{9875}`,previous:`\u{4E0A}\u{4E00}\u{9875}`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`\u{5355}\u{51FB}\u{4EE5}\u{5F00}\u{59CB}\u{9009}\u{62E9}\u{65E5}\u{671F}\u{8303}\u{56F4}`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:`\u{6309}\u{4E00}\u{4E0B}\u{4EE5}\u{5B8C}\u{6210}\u{9078}\u{53D6}\u{65E5}\u{671F}\u{7BC4}\u{570D}`,maximumDate:`\u{6700}\u{5F8C}\u{4E00}\u{500B}\u{53EF}\u{7528}\u{65E5}\u{671F}`,minimumDate:`\u{7B2C}\u{4E00}\u{500B}\u{53EF}\u{7528}\u{65E5}\u{671F}`,next:`\u{4E0B}\u{4E00}\u{9801}`,previous:`\u{4E0A}\u{4E00}\u{9801}`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`\u{6309}\u{4E00}\u{4E0B}\u{4EE5}\u{958B}\u{59CB}\u{9078}\u{53D6}\u{65E5}\u{671F}\u{7BC4}\u{570D}`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let ny=Symbol.for("react-aria.i18n.locale"),nb=Symbol.for("react-aria.i18n.strings");class nv{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var i;if(t[e])return t[e];let r=(i=e,Intl.Locale?new Intl.Locale(i).language:i.split("-")[0]);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("undefined"==typeof window)return null;let t=window[ny];if(void 0===s){let e=window[nb];if(!e)return null;for(let n in s={},e)s[n]=new nv({[t]:e[n]},t)}let n=null==s?void 0:s[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let nA=new Map,nw=new Map;class n${format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let i=t["="+e];if(i)return"function"==typeof i?i():i;let r=this.locale+":"+n,a=nA.get(r);return a||(a=new Intl.PluralRules(this.locale,{type:n}),nA.set(r,a)),"function"==typeof(i=t[a.select(e)]||t.other)?i():i}number(e){let t=nw.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),nw.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}let nk=new WeakMap;function nx(e,t){let n;return t&&nv.getGlobalDictionaryForPackage(t)||((n=nk.get(e))||(n=new nv(e),nk.set(e,n)),n)}function nC(e,t){let{locale:n}=eA(),i=nx(e,t);return(0,v.useMemo)(()=>new n$(n,i),[n,i])}let nE=new Map;class nD{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==nP&&(nP="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),nP&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=nB(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),i=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===i&&23===r)return"h23";if(24===i&&23===r)return"h24";if(0===i&&11===r)return"h11";if(12===i&&11===r)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=nB(e,t),this.options=t}}let nS={true:{ja:"h11"},false:{}};function nB(e,t={}){if("boolean"==typeof t.hour12&&(null==nz&&(nz="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),nz)){let n=nS[String((t={...t}).hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=null!=n?n:i,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(nE.has(n))return nE.get(n);let i=new Intl.DateTimeFormat(e,t);return nE.set(n,i),i}let nz=null,nP=null;function nT(e,t){let n=(0,v.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function nM(e){e=nT(null!=e?e:{},nO);let{locale:t}=eA();return(0,v.useMemo)(()=>new nD(t,e),[t,e])}function nO(e,t){if(e===t)return!0;let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}function nF(e){return e&&e.__esModule?e.default:e}let nI=new WeakMap;function nN(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function nj(e,t,n,i){let r=nC(nF(ng),"@react-aria/calendar"),a=nN(e)||nN(t),o=nM({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),s=nM({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return(0,v.useMemo)(()=>{if((0,X.ro)(e,(0,X.wH)(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),(0,X.ro)(t,(0,X.p9)(e)))return o.format(a.toDate(n));if((0,X.ro)(t,(0,X.p9)(t)))return i?nR(o,r,a,s,n):o.formatRange(a.toDate(n),s.toDate(n))}return i?nR(s,r,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,r,n,i])}function nR(e,t,n,i,r){let a=e.formatRangeToParts(n.toDate(r),i.toDate(r)),o=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)o=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<o?s+=a[e].value:e>o&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function nL(e,t){let n=(0,v.useRef)(!0),i=(0,v.useRef)(null);(0,v.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,v.useEffect)(()=>{let r=i.current;n.current?n.current=!1:(!r||t.some((e,t)=>!Object.is(e,r[t])))&&e(),i.current=t},t)}function nV(e,t){let{id:n,"aria-label":i,"aria-labelledby":r}=e;return n=eB(n),r&&i?r=[...new Set([n,...r.trim().split(/\s+/)])].join(" "):r&&(r=r.trim().split(/\s+/).join(" ")),i||r||!t||(i=t),{id:n,"aria-label":i,"aria-labelledby":r}}function nH(e,t){var n,i;let r,a,o,s,l,c=nC((n=ng)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=eZ(e),p=nj(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=nj(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);nL(()=>{t.isFocused||eH(d)},[d]);let f=(o=nC(nF(ng),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=null!=(i=t.value)?i:void 0,s=nM({weekday:"long",month:"long",year:"numeric",day:"numeric",era:nN(r)||nN(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,v.useMemo)(()=>{if(!l&&r&&a)if((0,X.ro)(r,a)){let e=s.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=nR(s,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,l,t.timeZone,o,s]));nL(()=>{f&&eH(f,"polite",4e3)},[f]);let m=ez([!!e.errorMessage,e.isInvalid,e.validationState]);nI.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,v.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[b,A]=(0,v.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&b&&(A(!1),t.setFocused(!0)),{calendarProps:eT(u,nV({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":c.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:w,onFocusChange:A},errorMessageProps:{id:m},title:p}}let nG={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function nU(e={}){let{style:t,isFocusable:n}=e,[i,r]=(0,v.useState)(!1),{focusWithinProps:a}=ni({isDisabled:!n,onFocusWithinChange:e=>r(e)}),o=(0,v.useMemo)(()=>i?t:t?{...nG,...t}:nG,[i]);return{visuallyHiddenProps:{...a,style:o}}}function nq(e){let{children:t,elementType:n="div",isFocusable:i,style:r,...a}=e,{visuallyHiddenProps:o}=nU(e);return v.createElement(n,eT(a,o),t)}function nW(e,t,n,i){let r=eE(n),a=null==n;(0,v.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,r,i),()=>{n.removeEventListener(t,r,i)}},[e,t,i,a,r])}let nK=0,nY=new Map;function nJ(e){let[t,n]=(0,v.useState)();return ex(()=>{if(!e)return;let t=nY.get(e);if(t)n(t.element.id);else{let i=`react-aria-description-${nK++}`;n(i);let r=document.createElement("div");r.id=i,r.style.display="none",r.textContent=e,document.body.appendChild(r),t={refCount:0,element:r},nY.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),nY.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function nZ(e,t){if(!e)return!1;let n=window.getComputedStyle(e),i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function nX(e,t,n){let i="left"===n?"offsetLeft":"offsetTop",r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);){if(t.offsetParent.contains(e)){r-=e[i];break}t=t.offsetParent}return r}function nQ(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(o).overflow)for(let t of function(e,t){let n=[];for(;e&&e!==document.documentElement;)nZ(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,t){let n=nX(e,t,"left"),i=nX(e,t,"top"),r=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:u,scrollPaddingRight:p,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),m=o+parseInt(c,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,b=parseInt(u,10)||0,v=parseInt(d,10)||0,A=parseInt(p,10)||0,w=parseInt(f,10)||0;n<=o+w?o=n-parseInt(c,10)-w:n+r>g-A&&(o+=n+r-g+A),i<=h+b?s=i-parseInt(l,10)-b:i+a>y-v&&(s+=i+a-y+v),e.scrollLeft=o,e.scrollTop=s}(t,e);else{var n,i,r,a;let{left:o,top:s}=e.getBoundingClientRect();null==e||null==(n=e.scrollIntoView)||n.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(s-c)>1)&&(null==t||null==(r=t.containingElement)||null==(i=r.scrollIntoView)||i.call(r,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function n0(e,t){let n=e;for(nZ(n,t)&&(n=n.parentElement);n&&!nZ(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function n1(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function n2(e,t,n,i,r){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let o=n3(e,t,n).subtract(a);return n5(e,o,t,n,i,r)}function n3(e,t,n,i,r){let a=e;return t.years?a=(0,X.D)(e):t.months?a=(0,X.wH)(e):t.weeks&&(a=(0,X.kq)(e,n)),n5(e,a,t,n,i,r)}function n4(e,t,n,i,r){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let o=n3(e,t,n).subtract(a);return n5(e,o,t,n,i,r)}function n5(e,t,n,i,r,a){if(r&&e.compare(r)>=0){let e=(0,X.ZI)(t,n3((0,Z.gw)(r),n,i));e&&(t=e)}if(a&&0>=e.compare(a)){let e=(0,X.Py)(t,n4((0,Z.gw)(a),n,i));e&&(t=e)}return t}function n6(e,t,n){if(t){let n=(0,X.ZI)(e,(0,Z.gw)(t));n&&(e=n)}if(n){let t=(0,X.Py)(e,(0,Z.gw)(n));t&&(e=t)}return e}function n7(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}var n8=n(12748);function n9(e,t,n){let[i,r]=(0,v.useState)(e||t),a=(0,v.useRef)(void 0!==e),o=void 0!==e;(0,v.useEffect)(()=>{a.current,a.current=o},[o]);let s=o?e:i,l=(0,v.useCallback)((e,...t)=>{let i=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),o||(s=e)};"function"==typeof e?r((n,...r)=>{let a=e(o?s:n,...r);return(i(a,...t),o)?n:a}):(o||r(e),i(e,...t))},[o,s,n]);return[s,l]}function ie(e){var t,n,i;let r=(0,v.useMemo)(()=>new nD(e.locale),[e.locale]),a=(0,v.useMemo)(()=>r.resolvedOptions(),[r]),{locale:o,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:u,selectionAlignment:p,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,v.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=n9(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),b=(0,v.useMemo)(()=>g?(0,Z.yP)((0,Z.gw)(g),h):null,[g,h]),A=(0,v.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,$]=n9((0,v.useMemo)(()=>e.focusedValue?n6((0,Z.yP)((0,Z.gw)(e.focusedValue),h),c,u):void 0,[e.focusedValue,h,c,u]),(0,v.useMemo)(()=>n6(e.defaultFocusedValue?(0,Z.yP)((0,Z.gw)(e.defaultFocusedValue),h):b||(0,Z.yP)((0,X.Ec)(A),h),c,u),[e.defaultFocusedValue,b,A,h,c,u]),e.onFocusChange),[k,x]=(0,v.useState)(()=>{switch(p){case"start":return n3(w,l,o,c,u);case"end":return n4(w,l,o,c,u);default:return n2(w,l,o,c,u)}}),[C,E]=(0,v.useState)(e.autoFocus||!1),D=(0,v.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,k.add(e)},[k,l]),[S,B]=(0,v.useState)(h);if(!(0,X.Jg)(h,S)){let e=(0,Z.yP)(w,h);x(n2(e,l,o,c,u)),$(e),B(h)}function z(e){$(e=n6(e,c,u))}function P(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=n7(e=n6(e,c,u),k,d))&&(e=(0,Z.yP)(e,(null==g?void 0:g.calendar)||new(0,n8.FG)),g&&"hour"in g?y(g.set(e)):y(e))}}n1(w,c,u)?$(n6(w,c,u)):0>w.compare(k)?x(n4(w,l,o,c,u)):w.compare(D)>0&&x(n3(w,l,o,c,u));let T=(0,v.useMemo)(()=>!!b&&(!!(d&&d(b))||n1(b,c,u)),[b,d,c,u]),M=e.isInvalid||"invalid"===e.validationState||T,O=(0,v.useMemo)(()=>"visible"===f?l:it(l),[f,l]);return{isDisabled:null!=(n=e.isDisabled)&&n,isReadOnly:null!=(i=e.isReadOnly)&&i,value:b,setValue:P,visibleRange:{start:k,end:D},minValue:c,maxValue:u,focusedDate:w,timeZone:A,validationState:M?"invalid":null,isValueInvalid:M,setFocusedDate(e){z(e),E(!0)},focusNextDay(){z(w.add({days:1}))},focusPreviousDay(){z(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&z(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&z(w.subtract({weeks:1}))},focusNextPage(){let e=k.add(O);$(n6(w.add(O),c,u)),x(n3(n5(w,e,O,o,c,u),O,o))},focusPreviousPage(){let e=k.subtract(O);$(n6(w.subtract(O),c,u)),x(n3(n5(w,e,O,o,c,u),O,o))},focusSectionStart(){l.days?z(k):l.weeks?z((0,X.kq)(w,o)):(l.months||l.years)&&z((0,X.wH)(w))},focusSectionEnd(){l.days?z(D):l.weeks?z((0,X.$I)(w,o)):(l.months||l.years)&&z((0,X.p9)(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?z(w.add({months:1})):(l.months||l.years)&&z(w.add({years:1})):z(w.add(it(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?z(w.subtract({months:1})):(l.months||l.years)&&z(w.subtract({years:1})):z(w.subtract(it(l)))},selectFocusedDate(){d&&d(w)||P(w)},selectDate(e){P(e)},isFocused:C,setFocused:E,isInvalid:e=>n1(e,c,u),isSelected(e){return null!=b&&(0,X.ro)(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>C&&w&&(0,X.ro)(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(k)||t.compare(D)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=k.subtract({days:1});return(0,X.ro)(e,k)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=D.add({days:1});return(0,X.ro)(e,D)||this.isInvalid(e)},getDatesInWeek(e,t=k){let n=t.add({weeks:e}),i=[];n=(0,X.kq)(n,o,m);let r=(0,X.SJ)(n,o,m);for(let e=0;e<r;e++)i.push(null);for(;i.length<7;){i.push(n);let e=n.add({days:1});if((0,X.ro)(n,e))break;n=e}for(;i.length<7;)i.push(null);return i}}}function it(e){let t={...e};for(let n in e)t[n]=1;return t}function ii(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:(0,Z.gw)(e),end:(0,Z.gw)(t)}):null}function ir(e,t){return(e=(0,Z.yP)(e,(null==t?void 0:t.calendar)||new(0,n8.FG)),t&&"hour"in t)?t.set(e):e}function ia(e,t,n){let i=e.add({days:n});for(;(n<0?i.compare(t.visibleRange.start)>=0:0>=i.compare(t.visibleRange.end))&&!t.isCellUnavailable(i);)i=i.add({days:n});if(t.isCellUnavailable(i))return i.add({days:-n})}let io=(0,v.createContext)(null),is=(0,v.createContext)(null),il=(0,v.createContext)(null),ic=(0,v.createContext)(null),iu=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,io);let{locale:n}=eA(),i=ie({...e,locale:n,createCalendar:e.createCalendar||J.d}),{calendarProps:r,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:l}=nH(e,i),c=eF({...e,values:{state:i,isDisabled:e.isDisabled||!1,isInvalid:i.isValueInvalid},defaultClassName:"react-aria-Calendar"}),u=eZ(e,{global:!0});return v.createElement("div",{...eT(u,c,r),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":i.isValueInvalid||void 0},v.createElement(eO,{values:[[nd,{slots:{previous:a,next:o}}],[nm,{"aria-hidden":!0,level:2,children:l}],[il,i],[io,e],[nh,{slots:{errorMessage:s}}]]},v.createElement(nq,null,v.createElement("h2",null,r["aria-label"])),c.children,v.createElement(nq,null,v.createElement("button",{"aria-label":o["aria-label"],disabled:o.isDisabled,onClick:()=>i.focusNextPage(),tabIndex:-1}))))}),ip=(0,v.forwardRef)(function(e,t){var n,i;let r,a,o;[e,t]=eN(e,t,is);let{locale:s}=eA(),l=function(e){let{value:t,defaultValue:n,onChange:i,createCalendar:r,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:l,...c}=e,[u,p]=n9(t,n||null,i),[d,f]=(0,v.useState)(null),m="center";if(u&&u.start&&u.end){let e=n2((0,Z.gw)(u.start),o,a,s,l).add(o).subtract({days:1});u.end.compare(e)>0&&(m="start")}let h=(0,v.useRef)(null),[g,y]=(0,v.useState)(null),b=(0,v.useMemo)(()=>(0,X.ZI)(s,null==g?void 0:g.start),[s,g]),A=(0,v.useMemo)(()=>(0,X.Py)(l,null==g?void 0:g.end),[l,g]),w=ie({...c,value:u&&u.start,createCalendar:r,locale:a,visibleDuration:o,minValue:b,maxValue:A,selectionAlignment:m}),$=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:ia(t,w,-1),end:ia(t,w,1)},y(h.current)):(h.current=null,y(null))},[k,x]=(0,v.useState)(w.visibleRange);(0,X.NV)(w.visibleRange.start,k.start)&&(0,X.NV)(w.visibleRange.end,k.end)||($(d),x(w.visibleRange));let C=e=>{e?(f(e),$(e)):(f(null),$(null))},E=d?ii(d,w.focusedDate):u&&ii(u.start,u.end),D=t=>{if(e.isReadOnly)return;let n=n7(n6(t,b,A),w.visibleRange.start,e.isDateUnavailable);if(n)if(d){let e=ii(d,n);e&&p({start:ir(e.start,null==u?void 0:u.start),end:ir(e.end,null==u?void 0:u.end)}),C(null)}else C(n)},[S,B]=(0,v.useState)(!1),{isDateUnavailable:z}=e,P=(0,v.useMemo)(()=>!!u&&!d&&(!!(z&&(z(u.start)||z(u.end)))||n1(u.start,s,l)||n1(u.end,s,l)),[z,u,d,s,l]),T=e.isInvalid||"invalid"===e.validationState||P;return{...w,value:u,setValue:p,anchorDate:d,setAnchorDate:C,highlightedRange:E,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){D(w.focusedDate)},selectDate:D,highlightDate(e){d&&w.setFocusedDate(e)},isSelected:e=>!!(E&&e.compare(E.start)>=0&&0>=e.compare(E.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,n;return w.isInvalid(e)||n1(e,null==(t=h.current)?void 0:t.start,null==(n=h.current)?void 0:n.end)},isDragging:S,setDragging:B}}({...e,locale:s,createCalendar:e.createCalendar||J.d}),{calendarProps:c,prevButtonProps:u,nextButtonProps:p,errorMessageProps:d,title:f}=(n=e,i=t,r=nH(n,l),a=(0,v.useRef)(!1),nW(o=(0,v.useRef)("undefined"!=typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),nW(o,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;i.current&&i.current.contains(document.activeElement)&&(!i.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),r.calendarProps.onBlur=e=>{i.current&&(e.relatedTarget&&i.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},nW(i,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),r),m=eF({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"}),h=eZ(e,{global:!0});return v.createElement("div",{...eT(m,h,c),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},v.createElement(eO,{values:[[nd,{slots:{previous:u,next:p}}],[nm,{"aria-hidden":!0,level:2,children:f}],[ic,l],[is,e],[nh,{slots:{errorMessage:d}}]]},v.createElement(nq,null,v.createElement("h2",null,c["aria-label"])),m.children,v.createElement(nq,null,v.createElement("button",{"aria-label":p["aria-label"],disabled:p.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),id=(0,v.createContext)(null),im=(0,v.forwardRef)(function(e,t){var n,i;let r=(0,v.useContext)(il),a=(0,v.useContext)(ic),o=eI(io),s=eI(is),l=null!=r?r:a,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let u=null!=(n=null==o?void 0:o.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:p,headerProps:d,weekDays:f,weeksInMonth:m}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:i=t.visibleRange.end,firstDayOfWeek:r}=e,{direction:a}=eA(),o=nj(n,i,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=nI.get(t),c=nV({"aria-label":[s,o].filter(Boolean).join(", "),"aria-labelledby":l}),u=nM({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=eA(),d=(0,v.useMemo)(()=>{let e=(0,X.kq)((0,X.Ec)(t.timeZone),p,r);return[...Array(7).keys()].map(n=>{let i=e.add({days:n}).toDate(t.timeZone);return u.format(i)})},[p,t.timeZone,u,r]),f=(0,X.RZ)(n,p,r);return{gridProps:eT(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:d,weeksInMonth:f}}({startDate:c,endDate:(0,X.p9)(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:u},l),h=eZ(e,{global:!0});return v.createElement(id.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:m}},v.createElement("table",{...eT(h,p),ref:t,style:e.style,cellPadding:0,className:null!=(i=e.className)?i:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:v.createElement(v.Fragment,null,v.createElement(ih,null,e=>v.createElement(i_,null,e)),v.createElement(ig,null,e.children))))}),ih=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,{headerProps:a,weekDays:o}=(0,v.useContext)(id),s=eZ(e,{global:!0});return v.createElement("thead",{...eT(s,a),ref:t,style:i,className:r||"react-aria-CalendarGridHeader"},v.createElement("tr",null,o.map((e,t)=>v.cloneElement(n(e),{key:t}))))}),i_=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,a=eZ(e,{global:!0});return v.createElement("th",{...a,ref:t,style:i,className:r||"react-aria-CalendarHeaderCell"},n)}),ig=(0,v.forwardRef)(function(e,t){let{children:n,style:i,className:r}=e,a=(0,v.useContext)(il),o=(0,v.useContext)(ic),s=null!=a?a:o,{startDate:l,weeksInMonth:c}=(0,v.useContext)(id),u=eZ(e,{global:!0});return v.createElement("tbody",{...u,ref:t,style:i,className:r||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>v.createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?v.cloneElement(n(e),{key:t}):v.createElement("td",{key:t})))))}),iy=(0,v.forwardRef)(function({date:e,...t},n){var i;let r=(0,v.useContext)(il),a=(0,v.useContext)(ic),o=null!=r?r:a,{startDate:s}=null!=(i=(0,v.useContext)(id))?i:{startDate:o.visibleRange.start},l=!(0,X.tF)(s,e),c=(0,X.cK)(e,o.timeZone),u=(0,v.useRef)(null),{cellProps:p,buttonProps:d,...f}=function(e,t,n){var i;let r,{date:a,isDisabled:o}=e,{errorMessageId:s,selectedDateDescription:l}=nI.get(t),c=nC((i=ng)&&i.__esModule?i.default:i,"@react-aria/calendar"),u=nM({weekday:"long",day:"numeric",month:"long",year:"numeric",era:nN(a),timeZone:t.timeZone}),p=t.isSelected(a),d=t.isCellFocused(a)&&!e.isOutsideMonth;o=o||t.isCellDisabled(a);let f=t.isCellUnavailable(a),m=!o&&!f,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&(0,X.ro)(t.value,a));h&&(p=!0),a=nT(a,X.NV);let g=(0,v.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=(0,X.cK)(a,t.timeZone),b=(0,v.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&((0,X.ro)(a,t.value.start)||(0,X.ro)(a,t.value.end))&&(e=l+", "),e+=u.format(g),y?e=c.format(p?"todayDateSelected":"todayDate",{date:e}):p&&(e=c.format("dateSelected",{date:e})),t.minValue&&(0,X.ro)(a,t.minValue)?e+=", "+c.format("minimumDate"):t.maxValue&&(0,X.ro)(a,t.maxValue)&&(e+=", "+c.format("maximumDate")),e},[u,g,c,p,y,a,t,l]),A="";"anchorDate"in t&&d&&!t.isReadOnly&&m&&(A=t.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let w=nJ(A),$=(0,v.useRef)(!1),k=(0,v.useRef)(!1),x=(0,v.useRef)(void 0),{pressProps:C,isPressed:E}=tj({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if((0,X.ro)(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),k.current=!0;return}else if((0,X.ro)(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),k.current=!0;return}}let n=()=>{t.setDragging(!0),x.current=void 0,t.selectDate(a),t.setFocusedDate(a),$.current=!0};"touch"===e.pointerType?x.current=setTimeout(n,200):n()}},onPressEnd(){k.current=!1,$.current=!1,clearTimeout(x.current),x.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&x.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(k.current)t.setAnchorDate(a);else if(t.anchorDate&&!$.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});o||(r=(0,X.ro)(a,t.focusedDate)?0:-1),(0,v.useEffect)(()=>{d&&n.current&&(e8(n.current),"pointer"!==tq&&document.activeElement===n.current&&nQ(n.current,{containingElement:n0(n.current)}))},[d,n]);let D=nM({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),S=(0,v.useMemo)(()=>D.formatToParts(g).find(e=>"day"===e.type).value,[D,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":p||void 0,"aria-invalid":h||void 0},buttonProps:eT(C,{onFocus(){o||t.setFocusedDate(a)},tabIndex:r,role:"button","aria-disabled":!m||void 0,"aria-label":b,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:E,isFocused:d,isSelected:p,isDisabled:o,isUnavailable:f,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:S}}({date:e,isOutsideMonth:l},o,u),{hoverProps:m,isHovered:h}=nc({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=nr();y&&(y=f.isFocused);let b=!1,A=!1;"highlightedRange"in o&&o.highlightedRange&&(b=(0,X.ro)(e,o.highlightedRange.start),A=(0,X.ro)(e,o.highlightedRange.end));let w=eF({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:l,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:A,isToday:c,...f}}),$={"data-focused":f.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":l||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":A||void 0,"data-invalid":f.isInvalid||void 0,"data-today":c||void 0},k=eZ(t,{global:!0});return v.createElement("td",{...p,ref:n},v.createElement("div",{...eT(k,d,g,m,$,w),ref:u}))}),ib=(0,v.createContext)({}),iv=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ib);let{isDisabled:r,isInvalid:a,onHoverStart:o,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:u,isHovered:p}=nc({onHoverStart:o,onHoverChange:s,onHoverEnd:l,isDisabled:r}),{isFocused:d,isFocusVisible:f,focusProps:m}=nr({within:!0});null!=r||(r=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=eF({...e,values:{isHovered:p,isFocusWithin:d,isFocusVisible:f,isDisabled:r,isInvalid:a},defaultClassName:"react-aria-Group"});return v.createElement("div",{...eT(c,m,u),...h,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(i=e.slot)?i:void 0,"data-focus-within":d||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0,"data-disabled":r||void 0,"data-invalid":a||void 0},h.children)}),iA=(0,v.createContext)({}),iw=np(function(e,t){[e,t]=eN(e,t,iA);let{hoverProps:n,isHovered:i}=nc(e),{isFocused:r,isFocusVisible:a,focusProps:o}=nr({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=eF({...e,values:{isHovered:i,isFocused:r,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return v.createElement("input",{...eT((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,...r}=e;return r})(e),o,n),...l,ref:t,"data-focused":r||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var i$={};i$={"ar-AE":{calendar:`\u{627}\u{644}\u{62A}\u{642}\u{648}\u{64A}\u{645}`,day:`\u{64A}\u{648}\u{645}`,dayPeriod:`\u{635}/\u{645}`,endDate:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}`,era:`\u{627}\u{644}\u{639}\u{635}\u{631}`,hour:`\u{627}\u{644}\u{633}\u{627}\u{639}\u{627}\u{62A}`,minute:`\u{627}\u{644}\u{62F}\u{642}\u{627}\u{626}\u{642}`,month:`\u{627}\u{644}\u{634}\u{647}\u{631}`,second:`\u{627}\u{644}\u{62B}\u{648}\u{627}\u{646}\u{64A}`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621}`,timeZoneName:`\u{627}\u{644}\u{62A}\u{648}\u{642}\u{64A}\u{62A}`,weekday:`\u{627}\u{644}\u{64A}\u{648}\u{645}`,year:`\u{627}\u{644}\u{633}\u{646}\u{629}`},"bg-BG":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,day:`\u{434}\u{435}\u{43D}`,dayPeriod:`\u{43F}\u{440}.\u{43E}\u{431}./\u{441}\u{43B}.\u{43E}\u{431}.`,endDate:`\u{41A}\u{440}\u{430}\u{439}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,era:`\u{435}\u{440}\u{430}`,hour:`\u{447}\u{430}\u{441}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,month:`\u{43C}\u{435}\u{441}\u{435}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,weekday:`\u{434}\u{435}\u{43D} \u{43E}\u{442} \u{441}\u{435}\u{434}\u{43C}\u{438}\u{446}\u{430}\u{442}\u{430}`,year:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`},"cs-CZ":{calendar:`Kalend\xe1\u{159}`,day:"den",dayPeriod:`\u{10D}\xe1st dne`,endDate:`Kone\u{10D}n\xe9 datum`,era:`letopo\u{10D}et`,hour:"hodina",minute:"minuta",month:`m\u{11B}s\xedc`,second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`Po\u{10D}\xe1te\u{10D}n\xed datum`,timeZoneName:`\u{10D}asov\xe9 p\xe1smo`,weekday:`den v t\xfddnu`,year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:`\xe6ra`,hour:"time",minute:"minut",month:`m\xe5ned`,second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:`\xe5r`},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:`Tagesh\xe4lfte`,endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BB}\u{3CC}\u{3B3}\u{3B9}\u{3BF}`,day:`\u{3B7}\u{3BC}\u{3AD}\u{3C1}\u{3B1}`,dayPeriod:`\u{3C0}.\u{3BC}./\u{3BC}.\u{3BC}.`,endDate:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}`,era:`\u{3C0}\u{3B5}\u{3C1}\u{3AF}\u{3BF}\u{3B4}\u{3BF}\u{3C2}`,hour:`\u{3CE}\u{3C1}\u{3B1}`,minute:`\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3CC}`,month:`\u{3BC}\u{3AE}\u{3BD}\u{3B1}\u{3C2}`,second:`\u{3B4}\u{3B5}\u{3C5}\u{3C4}\u{3B5}\u{3C1}\u{3CC}\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3BF}`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:`\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2}`,timeZoneName:`\u{3B6}\u{3CE}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}\u{3C2}`,weekday:`\u{3BA}\u{3B1}\u{3B8}\u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3B9}\u{3BD}\u{3AE}`,year:`\u{3AD}\u{3C4}\u{3BF}\u{3C2}`},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:`d\xeda`,dayPeriod:`a.\xa0m./p.\xa0m.`,endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:`d\xeda de la semana`,year:`a\xf1o`},"et-EE":{calendar:"Kalender",day:`p\xe4ev`,dayPeriod:`enne/p\xe4rast l\xf5unat`,endDate:`L\xf5ppkuup\xe4ev`,era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:`Alguskuup\xe4ev`,timeZoneName:`ajav\xf6\xf6nd`,weekday:`n\xe4dalap\xe4ev`,year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:`p\xe4iv\xe4`,dayPeriod:"vuorokaudenaika",endDate:`P\xe4\xe4ttymisp\xe4iv\xe4`,era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamisp\xe4iv\xe4`,timeZoneName:`aikavy\xf6hyke`,weekday:`viikonp\xe4iv\xe4`,year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:`\xe8re`,hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de d\xe9but`,timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:`ann\xe9e`},"he-IL":{calendar:`\u{5DC}\u{5D5}\u{5D7} \u{5E9}\u{5E0}\u{5D4}`,day:`\u{5D9}\u{5D5}\u{5DD}`,dayPeriod:`\u{5DC}\u{5E4}\u{5E0}\u{5D4}\u{5F4}\u{5E6}/\u{5D0}\u{5D7}\u{5D4}\u{5F4}\u{5E6}`,endDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E1}\u{5D9}\u{5D5}\u{5DD}`,era:`\u{5EA}\u{5E7}\u{5D5}\u{5E4}\u{5D4}`,hour:`\u{5E9}\u{5E2}\u{5D4}`,minute:`\u{5D3}\u{5E7}\u{5D4}`,month:`\u{5D7}\u{5D5}\u{5D3}\u{5E9}`,second:`\u{5E9}\u{5E0}\u{5D9}\u{5D9}\u{5D4}`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4}`,timeZoneName:`\u{5D0}\u{5D6}\u{5D5}\u{5E8} \u{5D6}\u{5DE}\u{5DF}`,weekday:`\u{5D9}\u{5D5}\u{5DD} \u{5D1}\u{5E9}\u{5D1}\u{5D5}\u{5E2}`,year:`\u{5E9}\u{5E0}\u{5D4}`},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:`Datum zavr\u{161}etka`,era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum po\u{10D}etka`,timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:`Napt\xe1r`,day:"nap",dayPeriod:"napszak",endDate:`Befejez\u{151} d\xe1tum`,era:`\xe9ra`,hour:`\xf3ra`,minute:"perc",month:`h\xf3nap`,second:`m\xe1sodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:`Kezd\u{151} d\xe1tum`,timeZoneName:`id\u{151}z\xf3na`,weekday:`h\xe9t napja`,year:`\xe9v`},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:`\u{30AB}\u{30EC}\u{30F3}\u{30C0}\u{30FC}`,day:`\u{65E5}`,dayPeriod:`\u{5348}\u{524D}/\u{5348}\u{5F8C}`,endDate:`\u{7D42}\u{4E86}\u{65E5}`,era:`\u{6642}\u{4EE3}`,hour:`\u{6642}`,minute:`\u{5206}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`\u{958B}\u{59CB}\u{65E5}`,timeZoneName:`\u{30BF}\u{30A4}\u{30E0}\u{30BE}\u{30FC}\u{30F3}`,weekday:`\u{66DC}\u{65E5}`,year:`\u{5E74}`},"ko-KR":{calendar:`\u{B2EC}\u{B825}`,day:`\u{C77C}`,dayPeriod:`\u{C624}\u{C804}/\u{C624}\u{D6C4}`,endDate:`\u{C885}\u{B8CC}\u{C77C}`,era:`\u{C5F0}\u{D638}`,hour:`\u{C2DC}`,minute:`\u{BD84}`,month:`\u{C6D4}`,second:`\u{CD08}`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`\u{C2DC}\u{C791}\u{C77C}`,timeZoneName:`\u{C2DC}\u{AC04}\u{B300}`,weekday:`\u{C694}\u{C77C}`,year:`\u{B144}`},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:`iki piet\u{173} / po piet\u{173}`,endDate:"Pabaigos data",era:"era",hour:"valanda",minute:`minut\u{117}`,month:`m\u{117}nuo`,second:`sekund\u{117}`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Prad\u{17E}ios data`,timeZoneName:"laiko juosta",weekday:`savait\u{117}s diena`,year:"metai"},"lv-LV":{calendar:`Kalend\u{101}rs`,day:"diena",dayPeriod:`priek\u{161}pusdien\u{101}/p\u{113}cpusdien\u{101}`,endDate:"Beigu datums",era:`\u{113}ra`,hour:"stundas",minute:`min\u{16B}tes`,month:`m\u{113}nesis`,second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`S\u{101}kuma datums`,timeZoneName:"laika josla",weekday:`ned\u{113}\u{13C}as diena`,year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:`m\xe5ned`,second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:`\xe5r`},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:`dzie\u{144}`,dayPeriod:`rano / po po\u{142}udniu / wieczorem`,endDate:`Data ko\u{144}cowa`,era:"era",hour:"godzina",minute:"minuta",month:`miesi\u{105}c`,second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data pocz\u{105}tkowa`,timeZoneName:"strefa czasowa",weekday:`dzie\u{144} tygodnia`,year:"rok"},"pt-BR":{calendar:`Calend\xe1rio`,day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:`m\xeas`,second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:`fuso hor\xe1rio`,weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:`Calend\xe1rio`,day:"dia",dayPeriod:"am/pm",endDate:`Data de T\xe9rmino`,era:"era",hour:"hora",minute:"minuto",month:`m\xeas`,second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de In\xedcio`,timeZoneName:`fuso hor\xe1rio`,weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:`Dat\u{103} final`,era:`er\u{103}`,hour:`or\u{103}`,minute:"minut",month:`lun\u{103}`,second:`secund\u{103}`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`Dat\u{103} \xeenceput`,timeZoneName:"fus orar",weekday:`ziua din s\u{103}pt\u{103}m\xe2n\u{103}`,year:"an"},"ru-RU":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}\u{44C}`,day:`\u{434}\u{435}\u{43D}\u{44C}`,dayPeriod:"AM/PM",endDate:`\u{414}\u{430}\u{442}\u{430} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}`,era:`\u{44D}\u{440}\u{430}`,hour:`\u{447}\u{430}\u{441}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,month:`\u{43C}\u{435}\u{441}\u{44F}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{43E}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,weekday:`\u{434}\u{435}\u{43D}\u{44C} \u{43D}\u{435}\u{434}\u{435}\u{43B}\u{438}`,year:`\u{433}\u{43E}\u{434}`},"sk-SK":{calendar:`Kalend\xe1r`,day:`de\u{148}`,dayPeriod:"AM/PM",endDate:`D\xe1tum ukon\u{10D}enia`,era:`letopo\u{10D}et`,hour:"hodina",minute:`min\xfata`,month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`D\xe1tum za\u{10D}atia`,timeZoneName:`\u{10D}asov\xe9 p\xe1smo`,weekday:`de\u{148} t\xfd\u{17E}d\u{148}a`,year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum za\u{10D}etka`,timeZoneName:`\u{10D}asovni pas`,weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:`\u{434}\u{430}\u{43D}`,dayPeriod:`\u{43F}\u{440}\u{435} \u{43F}\u{43E}\u{434}\u{43D}\u{435}/\u{43F}\u{43E} \u{43F}\u{43E}\u{434}\u{43D}\u{435}`,endDate:`Datum zavr\u{161}etka`,era:`\u{435}\u{440}\u{430}`,hour:`\u{441}\u{430}\u{442}`,minute:`\u{43C}\u{438}\u{43D}\u{443}\u{442}`,month:`\u{43C}\u{435}\u{441}\u{435}\u{446}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum po\u{10D}etka`,timeZoneName:`\u{432}\u{440}\u{435}\u{43C}\u{435}\u{43D}\u{441}\u{43A}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,weekday:`\u{434}\u{430}\u{43D} \u{443} \u{43D}\u{435}\u{434}\u{435}\u{459}\u{438}`,year:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:`m\xe5nad`,second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:`\xe5r`},"tr-TR":{calendar:"Takvim",day:`g\xfcn`,dayPeriod:`\xd6\xd6/\xd6S`,endDate:`Biti\u{15F} Tarihi`,era:`\xe7a\u{11F}`,hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`Ba\u{15F}lang\u{131}\xe7 Tarihi`,timeZoneName:"saat dilimi",weekday:`haftan\u{131}n g\xfcn\xfc`,year:`y\u{131}l`},"uk-UA":{calendar:`\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,day:`\u{434}\u{435}\u{43D}\u{44C}`,dayPeriod:`\u{434}\u{43F}/\u{43F}\u{43F}`,endDate:`\u{414}\u{430}\u{442}\u{430} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}`,era:`\u{435}\u{440}\u{430}`,hour:`\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`,minute:`\u{445}\u{432}\u{438}\u{43B}\u{438}\u{43D}\u{430}`,month:`\u{43C}\u{456}\u{441}\u{44F}\u{446}\u{44C}`,second:`\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443}`,timeZoneName:`\u{447}\u{430}\u{441}\u{43E}\u{432}\u{438}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,weekday:`\u{434}\u{435}\u{43D}\u{44C} \u{442}\u{438}\u{436}\u{43D}\u{44F}`,year:`\u{440}\u{456}\u{43A}`},"zh-CN":{calendar:`\u{65E5}\u{5386}`,day:`\u{65E5}`,dayPeriod:`\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,endDate:`\u{7ED3}\u{675F}\u{65E5}\u{671F}`,era:`\u{7EAA}\u{5143}`,hour:`\u{5C0F}\u{65F6}`,minute:`\u{5206}\u{949F}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`\u{5F00}\u{59CB}\u{65E5}\u{671F}`,timeZoneName:`\u{65F6}\u{533A}`,weekday:`\u{5DE5}\u{4F5C}\u{65E5}`,year:`\u{5E74}`},"zh-TW":{calendar:`\u{65E5}\u{66C6}`,day:`\u{65E5}`,dayPeriod:`\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,endDate:`\u{7D50}\u{675F}\u{65E5}\u{671F}`,era:`\u{7EAA}\u{5143}`,hour:`\u{5C0F}\u{65F6}`,minute:`\u{5206}\u{949F}`,month:`\u{6708}`,second:`\u{79D2}`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`\u{958B}\u{59CB}\u{65E5}\u{671F}`,timeZoneName:`\u{65F6}\u{533A}`,weekday:`\u{5DE5}\u{4F5C}\u{65E5}`,year:`\u{5E74}`}};let ik=v.createContext(null),ix="react-aria-focus-scope-restore",iC=null;function iE(e){var t,n,i,r,a,o,s,l,c,u;let p,d,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:b}=e,A=(0,v.useRef)(null),w=(0,v.useRef)(null),$=(0,v.useRef)([]),{parentNode:k}=(0,v.useContext)(ik)||{},x=(0,v.useMemo)(()=>new iV({scopeRef:$}),[$]);ex(()=>{let e=k||iH.root;if(iH.getTreeNode(e.scopeRef)&&iC&&!iP(iC,e.scopeRef)){let t=iH.getTreeNode(iC);t&&(e=t)}e.addChild(x),iH.addNode(x)},[x,k]),ex(()=>{let e=iH.getTreeNode($);e&&(e.contain=!!g)},[g]),ex(()=>{var e;let t=null==(e=A.current)?void 0:e.nextSibling,n=[],i=e=>e.stopPropagation();for(;t&&t!==w.current;)n.push(t),t.addEventListener(ix,i),t=t.nextSibling;return $.current=n,()=>{for(let e of n)e.removeEventListener(ix,i)}},[h]),ex(()=>{if(n||i)return;let e=t.current,r=eX(e?e[0]:void 0),a=e=>{let n=tB(e);iB(n,t.current)?iC=t:iz(n)||(iC=null)};return r.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{r.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=$,n=y,i=g]),r=$,a=g,p=(0,v.useRef)(void 0),d=(0,v.useRef)(void 0),ex(()=>{let e=r.current;if(!a){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let t=eX(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!iS(r)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),i=r.current;if(!i||!iB(n,i))return;let a=iN(iD(i),{tabbable:!0},i);if(!n)return;a.currentNode=n;let o=e.shiftKey?a.previousNode():a.nextNode();o||(a.currentNode=e.shiftKey?i[i.length-1].nextElementSibling:i[0].previousElementSibling,o=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),o&&iT(o,!0)},i=e=>{(!iC||iP(iC,r))&&iB(tB(e),r.current)?(iC=r,p.current=tB(e)):iS(r)&&!iz(tB(e),r)?p.current?p.current.focus():iC&&iC.current&&iO(iC.current):iS(r)&&(p.current=tB(e))},o=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let n=tq,i=("virtual"===n||null===n)&&tf()&&td(),a=((e=document)=>e.activeElement)(t);if(!i&&a&&iS(r)&&!iz(a,r)){iC=r;let t=tB(e);if(t&&t.isConnected){var o;p.current=t,null==(o=p.current)||o.focus()}else iC.current&&iO(iC.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",o,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",o,!1))}},[r,a]),ex(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),o=$,s=y,l=g,f=(0,v.useRef)("undefined"!=typeof document?((e=document)=>e.activeElement)(eX(o.current?o.current[0]:void 0)):null),ex(()=>{let e=o.current,t=eX(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!iC||iP(iC,o))&&iB(((e=document)=>e.activeElement)(t),o.current)&&(iC=o)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[o,l]),ex(()=>{let e=eX(o.current?o.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!iS(o)||t.isComposing)return;let n=e.activeElement;if(!iz(n,o)||!iF(o))return;let i=iH.getTreeNode(o);if(!i)return;let r=i.nodeToRestore,a=iN(e.body,{tabbable:!0});a.currentNode=n;let s=t.shiftKey?a.previousNode():a.nextNode();if(r&&r.isConnected&&r!==e.body||(r=void 0,i.nodeToRestore=void 0),(!s||!iz(s,o))&&r){a.currentNode=r;do s=t.shiftKey?a.previousNode():a.nextNode();while(iz(s,o));(t.preventDefault(),t.stopPropagation(),s)?iT(s,!0):iz(r)?iT(r,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[o,s,l]),ex(()=>{var e;let t=eX(o.current?o.current[0]:void 0);if(!s)return;let n=iH.getTreeNode(o);if(n)return n.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=iH.getTreeNode(o);if(!e)return;let n=e.nodeToRestore,i=((e=document)=>e.activeElement)(t);if(s&&n&&(i&&iz(i,o)||i===t.body&&iF(o))){let e=iH.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(o);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void iI(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(o);t;){if(t.scopeRef&&t.scopeRef.current&&iH.getTreeNode(t.scopeRef))return void iI(iM(t.scopeRef.current,!0));t=t.parent}}})}}},[o,s]),c=$,u=b,m=v.useRef(u),(0,v.useEffect)(()=>{m.current&&(iC=c,!iB(((e=document)=>e.activeElement)(eX(c.current?c.current[0]:void 0)),iC.current)&&c.current&&iO(c.current)),m.current=!1},[c]),(0,v.useEffect)(()=>{let e=((e=document)=>e.activeElement)(eX($.current?$.current[0]:void 0)),t=null;if(iB(e,$.current)){for(let n of iH.traverse())n.scopeRef&&iB(e,n.scopeRef.current)&&(t=n);t===iH.getTreeNode($)&&(iC=t.scopeRef)}},[$]),ex(()=>()=>{var e,t,n;let i=null!=(n=null==(t=iH.getTreeNode($))||null==(e=t.parent)?void 0:e.scopeRef)?n:null;($===iC||iP($,iC))&&(!i||iH.getTreeNode(i))&&(iC=i),iH.removeTreeNode($)},[$]);let C=(0,v.useMemo)(()=>{var e;return e=$,{focusNext(t={}){var n;let i=e.current,{from:r,tabbable:a,wrap:o,accept:s}=t,l=r||((e=document)=>e.activeElement)(eX(null!=(n=i[0])?n:void 0)),c=i[0].previousElementSibling,u=iN(iD(i),{tabbable:a,accept:s},i);u.currentNode=iB(l,i)?l:c;let p=u.nextNode();return!p&&o&&(u.currentNode=c,p=u.nextNode()),p&&iT(p,!0),p},focusPrevious(t={}){var n;let i=e.current,{from:r,tabbable:a,wrap:o,accept:s}=t,l=r||((e=document)=>e.activeElement)(eX(null!=(n=i[0])?n:void 0)),c=i[i.length-1].nextElementSibling,u=iN(iD(i),{tabbable:a,accept:s},i);u.currentNode=iB(l,i)?l:c;let p=u.previousNode();return!p&&o&&(u.currentNode=c,p=u.previousNode()),p&&iT(p,!0),p},focusFirst(t={}){let n=e.current,{tabbable:i,accept:r}=t,a=iN(iD(n),{tabbable:i,accept:r},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&iT(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:i,accept:r}=t,a=iN(iD(n),{tabbable:i,accept:r},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&iT(o,!0),o}}},[]),E=(0,v.useMemo)(()=>({focusManager:C,parentNode:x}),[x,C]);return v.createElement(ik.Provider,{value:E},v.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:A}),h,v.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function iD(e){return e[0].parentElement}function iS(e){let t=iH.getTreeNode(iC);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function iB(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function iz(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of iH.traverse(iH.getTreeNode(t)))if(n&&iB(e,n.current))return!0;return!1}function iP(e,t){var n;let i=null==(n=iH.getTreeNode(t))?void 0:n.parent;for(;i;){if(i.scopeRef===e)return!0;i=i.parent}return!1}function iT(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{t8(e)}catch{}}function iM(e,t=!0){let n=e[0].previousElementSibling,i=iD(e),r=iN(i,{tabbable:t},e);r.currentNode=n;let a=r.nextNode();return t&&!a&&((r=iN(i=iD(e),{tabbable:!1},e)).currentNode=n,a=r.nextNode()),a}function iO(e,t=!0){iT(iM(e,t))}function iF(e){let t=iH.getTreeNode(iC);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function iI(e){e.dispatchEvent(new CustomEvent(ix,{bubbles:!0,cancelable:!0}))&&iT(e)}function iN(e,t,n){var i,r,a;let o=(null==t?void 0:t.tabbable)?e6:e5,s=eX((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(i=e||s,r=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var i;return(null==t||null==(i=t.from)?void 0:i.contains(e))||(null==t?void 0:t.tabbable)&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=[];if(e.form){var n,i;let r=null==(i=e.form)||null==(n=i.elements)?void 0:n.namedItem(e.name);t=[...null!=r?r:[]]}else t=[...eX(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(e=>!e.form);return!!t&&!t.some(e=>e.checked)}(e)||"INPUT"===l.currentNode.tagName&&"radio"===l.currentNode.type&&l.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:o(e)&&(!n||iB(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(i,r,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function ij(e,t={}){return{focusNext(n={}){let i=e.current;if(!i)return null;let{from:r,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=r||((e=document)=>e.activeElement)(eX(i)),c=iN(i,{tabbable:a,accept:s});i.contains(l)&&(c.currentNode=l);let u=c.nextNode();return!u&&o&&(c.currentNode=i,u=c.nextNode()),u&&iT(u,!0),u},focusPrevious(n=t){let i=e.current;if(!i)return null;let{from:r,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=r||((e=document)=>e.activeElement)(eX(i)),c=iN(i,{tabbable:a,accept:s});if(i.contains(l))c.currentNode=l;else{let e=iR(c);return e&&iT(e,!0),null!=e?e:null}let u=c.previousNode();if(!u&&o){c.currentNode=i;let e=iR(c);if(!e)return null;u=e}return u&&iT(u,!0),null!=u?u:null},focusFirst(n=t){let i=e.current;if(!i)return null;let{tabbable:r=t.tabbable,accept:a=t.accept}=n,o=iN(i,{tabbable:r,accept:a}).nextNode();return o&&iT(o,!0),o},focusLast(n=t){let i=e.current;if(!i)return null;let{tabbable:r=t.tabbable,accept:a=t.accept}=n,o=iR(iN(i,{tabbable:r,accept:a}));return o&&iT(o,!0),null!=o?o:null}}}function iR(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class iL{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let i=this.fastMap.get(null!=t?t:null);if(!i)return;let r=new iV({scopeRef:e});i.addChild(r),r.parent=i,this.fastMap.set(e,r),n&&(r.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&iB(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let i=t.children;n&&(n.removeChild(t),i.size>0&&i.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let n=new iL;for(let i of this.traverse())n.addTreeNode(i.scopeRef,null!=(t=null==(e=i.parent)?void 0:e.scopeRef)?t:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new iV({scopeRef:null}),this.fastMap.set(null,this.root)}}class iV{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let iH=new iL;function iG(e,t,n){let{direction:i}=eA(),r=(0,v.useMemo)(()=>ij(t),[t]),a=()=>{var e;if(!t.current)return;let n=null==(e=window.event)?void 0:e.target,i=iN(t.current,{tabbable:!0});if(n&&(i.currentNode=n,n=i.previousNode()),!n){let e;do(e=i.lastChild())&&(n=e);while(e)}for(;null==n?void 0:n.hasAttribute("data-placeholder");){let e=i.previousNode();if(e&&e.hasAttribute("data-placeholder"))n=e;else break}n&&n.focus()},{pressProps:o}=tj({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&a()}});return eT(o,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!n))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===i){if(t.current){let e=a.target,n=iU(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else r.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===i){if(t.current){let e=a.target,n=iU(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else r.focusNext()}}})}function iU(e,t,n){let i=iN(e,{tabbable:!0}),r=i.nextNode(),a=null,o=1/0;for(;r;){let e=r.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<o&&(a=r,o=s),r=i.nextNode()}return a}function iq(e,t,n){let i=eE(()=>{n&&n(t)});(0,v.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",i),()=>{null==n||n.removeEventListener("reset",i)}},[e,i])}function iW(e){let{description:t,errorMessage:n,isInvalid:i,validationState:r}=e,{labelProps:a,fieldProps:o}=function(e){let{id:t,label:n,"aria-labelledby":i,"aria-label":r,labelElementType:a="label"}=e;t=eB(t);let o=eB(),s={};return n&&(i=i?`${o} ${i}`:o,s={id:o,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:nV({id:t,"aria-label":r,"aria-labelledby":i})}}(e),s=ez([!!t,!!n,i,r]),l=ez([!!t,!!n,i,r]);return{labelProps:a,fieldProps:o=eT(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function iK(e,t,n){let{validationBehavior:i,focus:r}=e;ex(()=>{if("native"===i&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let i,r=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(r),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(i=e.validity).badInput,customError:i.customError,patternMismatch:i.patternMismatch,rangeOverflow:i.rangeOverflow,rangeUnderflow:i.rangeUnderflow,stepMismatch:i.stepMismatch,tooLong:i.tooLong,tooShort:i.tooShort,typeMismatch:i.typeMismatch,valueMissing:i.valueMissing,valid:i.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=(0,v.useRef)(!1),o=eE(()=>{a.current||t.resetValidation()}),s=eE(e=>{var i,a;t.displayValidation.isInvalid||t.commitValidation();let o=null==n||null==(i=n.current)?void 0:i.form;!e.defaultPrevented&&n&&o&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(o)===n.current&&(r?r():null==(a=n.current)||a.focus(),tq="keyboard",tX("keyboard",null)),e.preventDefault()}),l=eE(()=>{t.commitValidation()});(0,v.useEffect)(()=>{let e=null==n?void 0:n.current;if(!e)return;let t=e.form,i=null==t?void 0:t.reset;return t&&(t.reset=()=>{a.current=!window.event||"message"===window.event.type&&window.event.target instanceof MessagePort,null==i||i.call(t),a.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),null==t||t.addEventListener("reset",o),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),null==t||t.removeEventListener("reset",o),t&&(t.reset=i)}},[n,s,l,o,i])}let iY=new WeakMap,iJ="__role_"+Date.now(),iZ="__focusManager_"+Date.now();function iX(e,t,n){var i,r;let a,{isInvalid:o,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:u,descriptionProps:p,errorMessageProps:d}=iW({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||s}),f=(0,v.useRef)(null),{focusWithinProps:m}=ni({...e,onFocusWithin(n){var i;f.current=t.value,null==(i=e.onFocus)||i.call(e,n)},onBlurWithin:n=>{var i;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(i=e.onBlur)||i.call(e,n)},onFocusWithinChange:e.onFocusChange}),h=nC((r=i$)&&r.__esModule?r.default:r,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",b=nJ(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),A="presentation"===e[iJ]?u["aria-describedby"]:[b["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[iZ],$=(0,v.useMemo)(()=>w||ij(n),[w,n]),k=iG(t,n,"presentation"===e[iJ]);iY.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:A,focusManager:$});let x=(0,v.useRef)(e.autoFocus);a="presentation"===e[iJ]?{role:"presentation"}:eT(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":A}),(0,v.useEffect)(()=>{x.current&&$.focusFirst(),x.current=!1},[$]),iq(e.inputRef,t.defaultValue,t.setValue),iK({...e,focus(){$.focusFirst()}},t,e.inputRef);let C={type:"hidden",name:e.name,form:e.form,value:(null==(i=t.value)?void 0:i.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(C.type="text",C.hidden=!0,C.required=e.isRequired,C.onChange=()=>{});let E=eZ(e);return{labelProps:{...c,onClick:()=>{$.focusFirst()}},fieldProps:eT(E,a,k,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:C,descriptionProps:p,errorMessageProps:d,isInvalid:o,validationErrors:s,validationDetails:l}}var iQ={};iQ={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621} \u{64A}\u{62C}\u{628} \u{623}\u{646} \u{64A}\u{643}\u{648}\u{646} \u{642}\u{628}\u{644} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`\u{627}\u{644}\u{628}\u{64A}\u{627}\u{646}\u{627}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}\u{629} \u{63A}\u{64A}\u{631} \u{645}\u{62A}\u{627}\u{62D}\u{629}.`},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} \u{43F}\u{440}\u{435}\u{434}\u{438} \u{43A}\u{440}\u{430}\u{439}\u{43D}\u{430}\u{442}\u{430}.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435} \u{435} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430}.`},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zah\xe1jen\xed mus\xed p\u{159}edch\xe1zet datu ukon\u{10D}en\xed.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybran\xe9 datum nen\xed k dispozici.`},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal v\xe6re f\xf8r slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilg\xe6ngelig.`},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar.`},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`\u{397} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3C0}\u{3C1}\u{3B9}\u{3BD} \u{3B1}\u{3C0}\u{3CC} \u{3C4}\u{3B7}\u{3BD} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`\u{397} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3B4}\u{3B5}\u{3BD} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7}.`},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuup\xe4ev pole saadaval.`},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4.`},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date s\xe9lectionn\xe9e n\u{2019}est pas disponible.`},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} \u{5DC}\u{5E4}\u{5E0}\u{5D9} \u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E1}\u{5D9}\u{5D5}\u{5DD}.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`\u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E0}\u{5D1}\u{5D7}\u{5E8} \u{5D0}\u{5D9}\u{5E0}\u{5D5} \u{5D6}\u{5DE}\u{5D9}\u{5DF}.`},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum po\u{10D}etka mora biti prije datuma zavr\u{161}etka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezd\u{151} d\xe1tumnak a befejez\u{151} d\xe1tumn\xe1l kor\xe1bbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiv\xe1lasztott d\xe1tum nem \xe9rhet\u{151} el.`},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:`\u{958B}\u{59CB}\u{65E5}\u{306F}\u{7D42}\u{4E86}\u{65E5}\u{3088}\u{308A}\u{524D}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8}\u{306F}\u{4F7F}\u{7528}\u{3067}\u{304D}\u{307E}\u{305B}\u{3093}\u{3002}`},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`\u{C2DC}\u{C791}\u{C77C}\u{C740} \u{C885}\u{B8CC}\u{C77C} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`\u{C120}\u{D0DD}\u{D55C} \u{B0A0}\u{C9DC}\u{B97C} \u{C0AC}\u{C6A9}\u{D560} \u{C218} \u{C5C6}\u{C2B5}\u{B2C8}\u{B2E4}.`},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Prad\u{17E}ios data turi b\u{16B}ti ankstesn\u{117} nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`S\u{101}kuma datumam ir j\u{101}b\u{16B}t pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`Atlas\u{12B}tais datums nav pieejams.`},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpocz\u{119}cia musi by\u{107} wcze\u{15B}niejsza ni\u{17C} data zako\u{144}czenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedost\u{119}pna.`},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior \xe0 data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indispon\xedvel.`},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de in\xedcio deve ser anterior \xe0 data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indispon\xedvel.`},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de \xeenceput trebuie s\u{103} fie anterioar\u{103} datei de sf\xe2r\u{219}it.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectat\u{103} nu este disponibil\u{103}.`},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{430} \u{43F}\u{440}\u{435}\u{434}\u{448}\u{435}\u{441}\u{442}\u{432}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{434}\u{430}\u{442}\u{435} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`D\xe1tum za\u{10D}iatku mus\xed by\u{165} skor\u{161}\xed ako d\xe1tum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybrat\xfd d\xe1tum je nedostupn\xfd.`},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`Za\u{10D}etni datum mora biti pred kon\u{10D}nim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum po\u{10D}etka mora biti pre datuma zavr\u{161}etka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet m\xe5ste vara f\xf6re slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet \xe4r inte tillg\xe4ngligt.`},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`Ba\u{15F}lang\u{131}\xe7 tarihi biti\u{15F} tarihinden \xf6nce olmal\u{131}d\u{131}r.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Se\xe7ilen tarih kullan\u{131}lam\u{131}yor.`},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443} \u{43C}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{434}\u{443}\u{432}\u{430}\u{442}\u{438} \u{434}\u{430}\u{442}\u{456} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`\u{5F00}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{987B}\u{65E9}\u{4E8E}\u{7ED3}\u{675F}\u{65E5}\u{671F}\u{3002}`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`\u{6240}\u{9009}\u{65E5}\u{671F}\u{4E0D}\u{53EF}\u{7528}\u{3002}`},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:`\u{958B}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{9808}\u{5728}\u{7D50}\u{675F}\u{65E5}\u{671F}\u{4E4B}\u{524D}\u{3002}`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`\u{6240}\u{9078}\u{65E5}\u{671F}\u{7121}\u{6CD5}\u{4F7F}\u{7528}\u{3002}`}};var i0=n(27532);let i1={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},i2={...i1,customError:!0,valid:!1},i3={isInvalid:!1,validationDetails:i1,validationErrors:[]},i4=(0,v.createContext)({}),i5="__formValidationState"+Date.now();function i6(e){if(e[i5]){let{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:a}=e[i5];return{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:a}}return function(e){let{isInvalid:t,validationState:n,name:i,value:r,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:i2}:null,c=(0,v.useMemo)(()=>o&&null!=r?i8(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return i7(n)}return[]}(o,r)):null,[o,r]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let u=(0,v.useContext)(i4),p=(0,v.useMemo)(()=>i?Array.isArray(i)?i.flatMap(e=>i7(u[e])):i7(u[i]):[],[u,i]),[d,f]=(0,v.useState)(u),[m,h]=(0,v.useState)(!1);u!==d&&(f(u),h(!1));let g=(0,v.useMemo)(()=>i8(m?[]:p),[m,p]),y=(0,v.useRef)(i3),[b,A]=(0,v.useState)(i3),w=(0,v.useRef)(i3),[$,k]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!$)return;k(!1);let e=c||a||y.current;i9(e,w.current)||(w.current=e,A(e))}),{realtimeValidation:l||g||c||a||i3,displayValidation:"native"===s?l||g||b:l||g||c||a||b,updateValidation(e){"aria"!==s||i9(b,e)?y.current=e:A(e)},resetValidation(){i9(i3,w.current)||(w.current=i3,A(i3)),"native"===s&&k(!1),h(!0)},commitValidation(){"native"===s&&k(!0),h(!0)}}}(e)}function i7(e){return e?Array.isArray(e)?e:[e]:[]}function i8(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:i2}:null}function i9(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function re(...e){let t=new Set,n=!1,i={...i1};for(let r of e){for(let e of r.validationErrors)t.add(e);for(let e in n||(n=r.isInvalid),i)i[e]||(i[e]=r.validationDetails[e])}return i.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:i}}let rt=new nv((u=iQ)&&u.__esModule?u.default:u);function rn(){let e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function ri(e,t,n,i,r){let a=null!=e&&null!=n&&e.compare(n)>0,o=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==i?void 0:i(e))||!1,l=a||o||s,c=[];if(l){let e=rn(),i=new n$(e,nv.getGlobalDictionaryForPackage("@react-stately/datepicker")||rt),l=new nD(e,ro({},r)),u=l.resolvedOptions().timeZone;o&&null!=t&&c.push(i.format("rangeUnderflow",{minValue:l.format(t.toDate(u))})),a&&null!=n&&c.push(i.format("rangeOverflow",{maxValue:l.format(n.toDate(u))})),s&&c.push(i.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let rr={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},ra={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ro(e,t){var n;e={...t.shouldForceLeadingZeros?ra:rr,...e};let i=t.granularity||"minute",r=Object.keys(e),a=r.indexOf(null!=(n=t.maxGranularity)?n:"year");a<0&&(a=0);let o=r.indexOf(i);if(o<0&&(o=2),a>o)throw Error("maxGranularity must be greater than granularity");let s=r.slice(a,o+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===i||"minute"===i||"second"===i)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function rs(e){return e&&"hour"in e?e:new(0,i0.gX)}function rl(e,t){return null===e?null:e?(0,Z.yP)(e,t):void 0}function rc(e,t,n,i){if(e)return rl(e,n);let r=(0,Z.yP)((0,X.tB)(null!=i?i:(0,X.Xj)()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?(0,Z.gw)(r):i?r:(0,Z.tR)(r)}function ru(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,i=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[r,a]=(0,v.useState)([i,n]);return e&&(r[0]!==i||r[1]!==n)&&a([i,n]),t||(t=e?i:r[0]),[t,e?n:r[1]]}let rp=new nv({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),rd={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},rf={year:5,month:2,day:7,hour:2,minute:15,second:15},rm={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function rh(e){var t,n,i;let{locale:r,createCalendar:a,hideTimeZone:o,isDisabled:s=!1,isReadOnly:l=!1,isRequired:c=!1,minValue:u,maxValue:p,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[m,h]=ru(f,e.granularity),g=h||"UTC";if(f&&!(m in f))throw Error("Invalid granularity "+m+" for value "+f.toString());let y=(0,v.useMemo)(()=>new nD(r),[r]),b=(0,v.useMemo)(()=>a(y.resolvedOptions().calendar),[a,y]),[A,w]=n9(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),[$]=(0,v.useState)(A),k=(0,v.useMemo)(()=>{var e;return null!=(e=rl(A,b))?e:null},[A,b]),[x,C]=(0,v.useState)(()=>rc(e.placeholderValue,m,b,h)),E="gregory"===b.identifier&&"BC"===(k||x).era,D=(0,v.useMemo)(()=>{var t;return{granularity:m,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:o,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,m,e.hourCycle,e.shouldForceLeadingZeros,h,o,E]),S=(0,v.useMemo)(()=>ro({},D),[D]),B=(0,v.useMemo)(()=>new nD(r,S),[r,S]),z=(0,v.useMemo)(()=>B.resolvedOptions(),[B]),P=(0,v.useMemo)(()=>B.formatToParts(new Date).filter(e=>rd[e.type]).reduce((e,t)=>(e[rm[t.type]||t.type]=!0,e),{}),[B]),[T,M]=(0,v.useState)(()=>e.value||e.defaultValue?{...P}:{}),O=(0,v.useRef)(null),F=(0,v.useRef)(b);(0,v.useEffect)(()=>{(0,X.Jg)(b,F.current)||(F.current=b,C(t=>Object.keys(T).length>0?(0,Z.yP)(t,b):rc(e.placeholderValue,m,b,h)))},[b,m,T,h,e.placeholderValue]),A&&Object.keys(T).length<Object.keys(P).length&&M(T={...P}),null==A&&Object.keys(T).length===Object.keys(P).length&&(M(T={}),C(rc(e.placeholderValue,m,b,h)));let I=k&&Object.keys(T).length>=Object.keys(P).length?k:x,N=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(T),i=Object.keys(P);null==t?(w(null),C(rc(e.placeholderValue,m,b,h)),M({})):0===n.length&&null==O.current||n.length>=i.length||n.length===i.length-1&&P.dayPeriod&&!T.dayPeriod&&"dayPeriod"!==O.current?(0===n.length&&M(T={...P}),w(t=(0,Z.yP)(t,(null==f?void 0:f.calendar)||new(0,n8.FG)))):C(t),O.current=null},j=(0,v.useMemo)(()=>I.toDate(g),[I,g]),R=(0,v.useMemo)(()=>(function(e,t,n,i,r,a,o,s){let l=["hour","minute","second"],c=n.formatToParts(e),u=[];for(let e of c){var p;let n=rm[e.type]||e.type,c=rd[n];"era"===n&&1===a.getEras().length&&(c=!1);let d=rd[n]&&!t[n],f=rd[n]?(p=e.value,"era"===n||"dayPeriod"===n?p:"year"===n||"month"===n||"day"===n?rp.getStringForLocale(n,o):"––"):null,m={type:n,text:d?f:e.value,...r_(r,n,i),isPlaceholder:d,placeholder:f,isEditable:c};"hour"===n?(u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1}),u.push(m),n===s&&u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(n)&&n===s?(u.push(m),u.push({type:"literal",text:"",...r_(r,"literal",i),isPlaceholder:!1,placeholder:"",isEditable:!1})):u.push(m)}return u})(j,T,B,z,I,b,r,m),[j,T,B,z,I,b,r,m]);P.era&&T.year&&!T.era?(T.era=!0,M({...T})):!P.era&&T.era&&(delete T.era,M({...T}));let L=e=>{T[e]=!0,"year"===e&&P.era&&(T.era=!0),M({...T})},V=(e,t)=>{if(T[e])N(function(e,t,n,i){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:"hour"!==t,hourCycle:i.hour12?12:24})}throw Error("Unknown segment: "+t)}(I,e,t,z));else{L(e);let t=Object.keys(T),n=Object.keys(P);(t.length>=n.length||t.length===n.length-1&&P.dayPeriod&&!T.dayPeriod)&&N(I)}},H=(0,v.useMemo)(()=>ri(A,u,p,d,D),[A,u,p,d,D]),G=i6({...e,value:A,builtinValidation:H}),U=G.displayValidation.isInvalid,q=e.validationState||(U?"invalid":null);return{...G,value:k,defaultValue:null!=(n=e.defaultValue)?n:$,dateValue:j,calendar:b,setValue:N,segments:R,dateFormatter:B,validationState:q,isInvalid:U,granularity:m,maxGranularity:null!=(i=e.maxGranularity)?i:"year",isDisabled:s,isReadOnly:l,isRequired:c,increment(e){V(e,1)},decrement(e){V(e,-1)},incrementPage(e){V(e,rf[e]||1)},decrementPage(e){V(e,-(rf[e]||1))},setSegment(e,t){L(e),N(function(e,t,n,i){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e&&"number"==typeof n)switch(t){case"dayPeriod":{let t=e.hour,i=t>=12;if(n>=12===i)return e;return e.set({hour:i?t-12:t+12})}case"hour":if(i.hour12){let t=e.hour>=12;t||12!==n||(n=0),t&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}throw Error("Unknown segment: "+t)}(I,e,t,z))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(T),n=Object.keys(P);t.length===n.length-1&&P.dayPeriod&&!T.dayPeriod&&(M(T={...P}),N(I.copy()))},clearSegment(t){delete T[t],O.current=t,M({...T});let n=rc(e.placeholderValue,m,b,h),i=I;if("dayPeriod"===t&&"hour"in I&&"hour"in n){let e=I.hour>=12,t=n.hour>=12;e&&!t?i=I.set({hour:I.hour-12}):!e&&t&&(i=I.set({hour:I.hour+12}))}else"hour"===t&&"hour"in I&&I.hour>=12&&T.dayPeriod?i=I.set({hour:n.hour+12}):t in I&&(i=I.set({[t]:n[t]}));w(null),N(i)},formatValue:e=>k?new nD(r,ro(e,D)).format(j):"",getDateFormatter:(e,t)=>new nD(e,ro({},{...D,...t}))}}function r_(e,t,n){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:(0,X.xz)(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:(0,X.oT)(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(n.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let rg=(0,v.createContext)(null),ry=(0,v.createContext)(null),rb=(0,v.createContext)(null),rv=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(ry),i=(0,v.useContext)(rb);return n||i?v.createElement(rw,{...e,ref:t}):v.createElement(rA,{...e,ref:t})}),rA=(0,v.forwardRef)((e,t)=>{let[n,i]=eN({slot:e.slot},t,rg),{locale:r}=eA(),a=rh({...n,locale:r,createCalendar:J.d}),o=(0,v.useRef)(null),{fieldProps:s,inputProps:l}=iX({...n,inputRef:o},a,i);return v.createElement(eO,{values:[[ry,a],[iA,{...l,ref:o}],[ib,{...s,ref:i,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},v.createElement(rw,e))}),rw=(0,v.forwardRef)((e,t)=>{let{className:n,children:i}=e,r=(0,v.useContext)(ry),a=(0,v.useContext)(rb),o=null!=r?r:a;return v.createElement(v.Fragment,null,v.createElement(iv,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:o.isInvalid,isDisabled:o.isDisabled},o.segments.map((e,t)=>(0,v.cloneElement)(i(e),{key:t}))),v.createElement(iw,null))}),r$=(0,v.createContext)({});function rk({children:e}){let t=(0,v.useMemo)(()=>({register:()=>{}}),[]);return v.createElement(t$.Provider,{value:t},e)}v.forwardRef(({children:e,...t},n)=>{let i=(0,v.useRef)(!1),r=(0,v.useContext)(t$);n=ew(n||(null==r?void 0:r.ref));let a=eT(r||{},{...t,ref:n,register(){i.current=!0,r&&r.register()}});return tE(r,n),(0,v.useEffect)(()=>{i.current||(i.current=!0)},[]),v.createElement(t$.Provider,{value:a},e)});let rx=v.createContext(null);function rC(e){var t;let n=eu(),{portalContainer:i=n?null:document.body,isExiting:r}=e,[a,o]=(0,v.useState)(!1),s=(0,v.useMemo)(()=>({contain:a,setContain:o}),[a,o]),{getContainer:l}=null!=(t=(0,v.useContext)(r$))?t:{};if(!e.portalContainer&&l&&(i=l()),!i)return null;let c=e.children;return e.disableFocusManagement||(c=v.createElement(iE,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},c)),c=v.createElement(rx.Provider,{value:s},v.createElement(rk,null,c)),tT.createPortal(c,i)}let rE=(0,v.createContext)(null),rD=(0,v.createContext)(null),rS=(0,v.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=eN(e,t,rE);let{dialogProps:i,titleProps:r}=function(e,t){let n,i,{role:r="dialog"}=e,a=ez();a=e["aria-label"]?void 0:a;let o=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){t8(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(o.current=!0,t.current&&(t.current.blur(),t8(t.current)),o.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),ex(()=>{null==i||i(!0)},[i=null==(n=(0,v.useContext)(rx))?void 0:n.setContain]),{dialogProps:{...eZ(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{o.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":n},t),a=(0,v.useContext)(rD);i["aria-label"]||i["aria-labelledby"]||e["aria-labelledby"]&&(i["aria-labelledby"]=e["aria-labelledby"]);let o=eF({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}}),s=eZ(e,{global:!0});return v.createElement("section",{...eT(s,o,i),ref:t,slot:e.slot||void 0},v.createElement(eO,{values:[[nm,{slots:{[eM]:{},title:{...r,level:2}}}],[nd,{slots:{[eM]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},o.children))}),rB=(0,v.createContext)(null),rz=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(rB);return(null==n?void 0:n.isInvalid)?v.createElement(rP,{...e,ref:t}):null}),rP=(0,v.forwardRef)((e,t)=>{let n=(0,v.useContext)(rB),i=eZ(e,{global:!0}),r=eF({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==r.children?null:v.createElement(n_,{slot:"errorMessage",...i,...r,ref:t})}),rT=(0,v.createContext)(null);var rM=n(68569);let rO=["day","month","year"],rF={hour:1,minute:2,second:3};function rI(e){let{state:t}=e,{containerProps:n,inputProps:i}=function(e,t){let{autoComplete:n,isDisabled:i,name:r}=e,{visuallyHiddenProps:a}=nU({style:{position:"fixed",top:0,left:0}}),o=60;"second"===t.granularity?o=1:"hour"===t.granularity&&(o=3600);let s=null==t.value?"":t.value.toString(),l="day"===t.granularity?"date":"datetime-local",c=["hour","minute","second"],u=0;return c.includes(t.granularity)&&(u=rF[t.granularity],c=c.slice(0,u)),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{tabIndex:-1,autoComplete:n,disabled:i,type:l,form:"",name:r,step:o,value:s,onChange:e=>{let n=e.target.value.toString();if(n)try{let e=(0,rM.DP)(n);if("day"===t.granularity&&(e=(0,rM._U)(n)),"setSegment"in t)for(let n in e)rO.includes(n)&&t.setSegment(n,e[n]),c.includes(n)&&t.setSegment(n,e[n]);t.setValue(e)}catch{}}}}}({...e},t);return v.createElement("div",{...n,"data-testid":"hidden-dateinput-container"},v.createElement("input",i))}let rN=(0,v.createContext)({}),rj=np(function(e,t){[e,t]=eN(e,t,rN);let{elementType:n="label",...i}=e;return v.createElement(n,{className:"react-aria-Label",...i,ref:t})}),rR=(0,v.createContext)({placement:"bottom"}),rL="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,rV=new WeakMap,rH=[];function rG(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function rU(e,t){let n=e,i=0,r=t.toString(),a=r.toLowerCase().indexOf("e-");if(a>0)i=Math.abs(Math.floor(Math.log10(Math.abs(t))))+a;else{let e=r.indexOf(".");e>=0&&(i=r.length-e)}if(i>0){let e=Math.pow(10,i);n=Math.round(n*e)/e}return n}function rq(e,t,n,i){t=Number(t),n=Number(n);let r=(e-(isNaN(t)?0:t))%i,a=rU(2*Math.abs(r)>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r,i);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor(rU(n/i,i))*i):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor(rU((n-t)/i,i))*i),a=rU(a,i)}let rW={top:"top",bottom:"top",left:"left",right:"left"},rK={top:"bottom",bottom:"top",left:"right",right:"left"},rY={top:"left",left:"top"},rJ={top:"height",left:"width"},rZ={width:"totalWidth",height:"totalHeight"},rX={},rQ="undefined"!=typeof document?window.visualViewport:null;function r0(e){var t,n,i,r,a;let o=0,s=0,l=0,c=0,u=0,p=0,d={},f=(null!=(t=null==rQ?void 0:rQ.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,c=t.clientHeight,o=null!=(n=null==rQ?void 0:rQ.width)?n:l,s=null!=(i=null==rQ?void 0:rQ.height)?i:c,d.top=t.scrollTop||e.scrollTop,d.left=t.scrollLeft||e.scrollLeft,rQ&&(u=rQ.offsetTop,p=rQ.offsetLeft)}else({width:o,height:s,top:u,left:p}=r5(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=o,c=s;return tp()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,u=null!=(r=null==rQ?void 0:rQ.pageTop)?r:0,p=null!=(a=null==rQ?void 0:rQ.pageLeft)?a:0),{width:o,height:s,totalWidth:l,totalHeight:c,scroll:d,top:u,left:p}}function r1(e,t,n,i,r,a,o){var s;let l=null!=(s=r.scroll[e])?s:0,c=i[rJ[e]],u=i.scroll[rW[e]]+a,p=c+i.scroll[rW[e]]-a,d=t-l+o[e]-i[rW[e]],f=t-l+n+o[e]-i[rW[e]];return d<u?u-d:f>p?Math.max(p-f,u-d):0}function r2(e){if(rX[e])return rX[e];let[t,n]=e.split(" "),i=rW[t]||"right",r=rY[i];rW[n]||(n="center");let a=rJ[i],o=rJ[r];return rX[e]={placement:t,crossPlacement:n,axis:i,crossAxis:r,size:a,crossSize:o},rX[e]}function r3(e,t,n,i,r,a,o,s,l,c){var u,p,d,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:A}=i,w={};w[b]=null!=(u=e[b])?u:0,"center"===g?w[b]+=((null!=(p=e[A])?p:0)-(null!=(d=n[A])?d:0))/2:g!==b&&(w[b]+=(null!=(f=e[A])?f:0)-(null!=(m=n[A])?m:0)),w[b]+=a;let $=e[b]-n[A]+l+c,k=e[b]+e[A]-l-c;if(w[b]=rG(w[b],$,k),h===y){let n=s?o[v]:t[rZ[v]];w[rK[y]]=Math.floor(n-e[y]+r)}else w[y]=Math.floor(e[y]+e[v]+r);return w}function r4(e,t,n,i,r,a){var o,s,l;let{placement:c,axis:u,size:p}=a;return c===u?Math.max(0,n[u]-e[u]-(null!=(o=e.scroll[u])?o:0)+t[u]-(null!=(s=i[u])?s:0)-i[rK[u]]-r):Math.max(0,e[p]+e[u]+e.scroll[u]-t[u]-n[u]-n[p]-(null!=(l=i[u])?l:0)-i[rK[u]]-r)}function r5(e){let{top:t,left:n,width:i,height:r}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:o,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:n+o-l,width:i,height:r}}function r6(e,t){let n,i=window.getComputedStyle(e);if("fixed"===i.position){let{top:t,left:i,width:r,height:a}=e.getBoundingClientRect();n={top:t,left:i,width:r,height:a}}else{n=r5(e);let i=r5(t),r=window.getComputedStyle(t);i.top+=(parseInt(r.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(r.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=i.top,n.left-=i.left}return n.top-=parseInt(i.marginTop,10)||0,n.left-=parseInt(i.marginLeft,10)||0,n}function r7(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let r8=new WeakMap;function r9(e){let{ref:t,box:n,onResize:i}=e;(0,v.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[i,t,n])}let ae="undefined"!=typeof document?window.visualViewport:null;function at(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let an=[],ai="undefined"!=typeof document&&window.visualViewport,ar=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),aa=0;function ao(e,t,n){let i=e.style[t];return e.style[t]=n,()=>{e.style[t]=i}}function as(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function al(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=n0(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,i=n.getBoundingClientRect().top;i>t+n.clientHeight&&(e.scrollTop+=i-t)}n=e.parentElement}}var ac={};function au(e){var t;let{onDismiss:n,...i}=e,r=nV(i,nC((t=ac)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return v.createElement(nq,null,v.createElement("button",{...r,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function ap(e,t,n){ex(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let i=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{i||(0,tT.flushSync)(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[e,t,n])}function ad(e){let[t,n]=n9(e.isOpen,e.defaultOpen||!1,e.onOpenChange),i=(0,v.useCallback)(()=>{n(!0)},[n]),r=(0,v.useCallback)(()=>{n(!1)},[n]),a=(0,v.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:i,close:r,toggle:a}}ac={"ar-AE":{dismiss:`\u{62A}\u{62C}\u{627}\u{647}\u{644}`},"bg-BG":{dismiss:`\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:`Schlie\xdfen`},"el-GR":{dismiss:`\u{391}\u{3C0}\u{3CC}\u{3C1}\u{3C1}\u{3B9}\u{3C8}\u{3B7}`},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:`L\xf5peta`},"fi-FI":{dismiss:`Hylk\xe4\xe4`},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:`\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}`},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:`Elutas\xedt\xe1s`},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:`\u{9589}\u{3058}\u{308B}`},"ko-KR":{dismiss:`\u{BB34}\u{C2DC}`},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:`Ner\u{101}d\u{12B}t`},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:`\u{41F}\u{440}\u{43E}\u{43F}\u{443}\u{441}\u{442}\u{438}\u{442}\u{44C}`},"sk-SK":{dismiss:`Zru\u{161}i\u{165}`},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:`\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`},"zh-CN":{dismiss:`\u{53D6}\u{6D88}`},"zh-TW":{dismiss:`\u{95DC}\u{9589}`}};let af=(0,v.createContext)(null),am=(0,v.createContext)(null),ah=(0,v.forwardRef)(function(e,t){[e,t]=eN(e,t,af);let n=(0,v.useContext)(rD),i=ad(e),r=null==e.isOpen&&null==e.defaultOpen&&n?n:i,a=function(e,t){let[n,i]=(0,v.useState)(t?"open":"closed");switch(n){case"open":t||i("exiting");break;case"closed":case"exiting":t&&i("open")}let r="exiting"===n;return ap(e,r,(0,v.useCallback)(()=>{i(e=>"exiting"===e?"closed":e)},[])),r}(t,r.isOpen)||e.isExiting||!1,o=(0,v.useContext)(nu),{direction:s}=eA();if(o){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),v.createElement(v.Fragment,null,t)}return!r||r.isOpen||a?v.createElement(a_,{...e,triggerRef:e.triggerRef,state:r,popoverRef:t,isExiting:a,dir:s}):null});function a_({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:i,...a}){var o,s;let l=(0,v.useRef)(null),c=(0,v.useRef)(null),u=(0,v.useContext)(am),p=u&&"SubmenuTrigger"===a.trigger,{popoverProps:d,underlayProps:f,arrowProps:m,placement:h,triggerAnchorPoint:g}=function(e,t){let{triggerRef:n,popoverRef:i,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l,...c}=e,u="SubmenuTrigger"===c.trigger,{overlayProps:p,underlayProps:d}=function(e,t){let{onClose:n,shouldCloseOnBlur:i,isOpen:r,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e;(0,v.useEffect)(()=>{if(r&&!an.includes(t))return an.push(t),()=>{let e=an.indexOf(t);e>=0&&an.splice(e,1)}},[r,t]);let l=()=>{an[an.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:i,onInteractOutsideStart:r}=e,a=(0,v.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=eE(e=>{n&&at(e,t)&&(r&&r(e),a.current.isPointerDown=!0)}),s=eE(e=>{n&&n(e)});(0,v.useEffect)(()=>{let e=a.current;if(i)return;let n=eX(t.current);if("undefined"!=typeof PointerEvent){let i=n=>{e.isPointerDown&&at(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",o,!0),n.addEventListener("click",i,!0),()=>{n.removeEventListener("pointerdown",o,!0),n.removeEventListener("click",i,!0)}}},[t,i,o,s])}({ref:t,onInteractOutside:a&&r?e=>{(!s||s(e.target))&&(an[an.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&an[an.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=ni({isDisabled:!i,onBlurWithin:e=>{!(!e.relatedTarget||iz(e.relatedTarget,iC))&&(!s||s(e.relatedTarget))&&(null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||o||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||u,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l},null!=a?a:i),{overlayProps:f,arrowProps:m,placement:h,triggerAnchorPoint:g}=function(e){var t,n,i,r;let{direction:a}=eA(),{arrowSize:o,targetRef:s,overlayRef:l,arrowRef:c,scrollRef:u=l,placement:p="bottom",containerPadding:d=12,shouldFlip:f=!0,boundaryElement:m="undefined"!=typeof document?document.body:null,offset:h=0,crossOffset:g=0,shouldUpdatePosition:y=!0,isOpen:b=!0,onClose:A,maxHeight:w,arrowBoundaryOffset:$=0}=e,[k,x]=(0,v.useState)(null),C=[y,p,l.current,s.current,null==c?void 0:c.current,u.current,d,f,m,h,g,b,a,w,$,o],E=(0,v.useRef)(null==ae?void 0:ae.scale);(0,v.useEffect)(()=>{b&&(E.current=null==ae?void 0:ae.scale)},[b]);let D=(0,v.useCallback)(()=>{var e,t,n,i,r,v,A,k,C,D;if(!1===y||!b||!l.current||!s.current||!m||(null==ae?void 0:ae.scale)!==E.current||l.current.querySelector("[data-react-aria-incomplete]")||(null==(e=(t=l.current).getAnimations)?void 0:e.call(t).length)>0)return;let S=null;if(u.current&&u.current.contains(document.activeElement)){let e=null==(i=document.activeElement)?void 0:i.getBoundingClientRect(),t=u.current.getBoundingClientRect();(S={type:"top",offset:(null!=(r=null==e?void 0:e.top)?r:0)-t.top}).offset>t.height/2&&(S.type="bottom",S.offset=(null!=(v=null==e?void 0:e.bottom)?v:0)-t.bottom)}let B=l.current;!w&&l.current&&(B.style.top="0px",B.style.bottom="",B.style.maxHeight=(null!=(k=null==(A=window.visualViewport)?void 0:A.height)?k:window.innerHeight)+"px");let z=function(e){var t,n,i,r;let a,{placement:o,targetNode:s,overlayNode:l,scrollNode:c,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,b=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!r7(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!r7(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=b===document.documentElement,A=window.getComputedStyle(b).position,w=v?r5(s):r6(s,b);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);w.top+=parseInt(e,10)||0,w.left+=parseInt(t,10)||0}let $=r5(l),k={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};$.width+=(null!=(t=k.left)?t:0)+(null!=(n=k.right)?n:0),$.height+=(null!=(i=k.top)?i:0)+(null!=(r=k.bottom)?r:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=r0(d),E=r0(b),D="BODY"===d.tagName?r5(b):r6(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,t,n,i,r,a,o,s,l,c,u,p,d,f,m,h){var g,y,b,v,A,w,$,k,x,C,E,D,S,B;let z,P,T,M=r2(e),{size:O,crossAxis:F,crossSize:I,placement:N,crossPlacement:j}=M,R=r3(t,s,n,M,u,p,c,d,m,h),L=u,V=r4(s,c,t,r,a+u,M);if(o&&i[O]>V){let e=r2(`${rK[N]} ${j}`),i=r3(t,s,n,e,u,p,c,d,m,h);r4(s,c,t,r,a+u,e)>V&&(M=e,R=i,L=u)}let H="bottom";"top"===M.axis?"top"===M.placement?H="top":"bottom"===M.placement&&(H="bottom"):"top"===M.crossAxis&&("top"===M.crossPlacement?H="bottom":"bottom"===M.crossPlacement&&(H="top"));let G=r1(F,R[F],n[I],s,l,a,c);R[F]+=G;let U=(A=R,w=n.height,$=H,z=d?c.height:s[rZ.height],P=null!=A.top?c.top+A.top:c.top+(z-(null!=(k=A.bottom)?k:0)-w),T="top"!==$?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-P-((null!=(C=r.top)?C:0)+(null!=(E=r.bottom)?E:0)+a)):Math.max(0,P+w-(s.top+(null!=(D=s.scroll.top)?D:0))-((null!=(S=r.top)?S:0)+(null!=(B=r.bottom)?B:0)+a)),Math.min(s.height-2*a,T));f&&f<U&&(U=f),n.height=Math.min(n.height,U),G=r1(F,(R=r3(t,s,n,M,L,p,c,d,m,h))[F],n[I],s,l,a,c),R[F]+=G;let q={},W=t[F]-R[F]-r[rW[F]],K=W+.5*t[I],Y=m/2+h,J="left"===rW[F]?(null!=(g=r.left)?g:0)+(null!=(y=r.right)?y:0):(null!=(b=r.top)?b:0)+(null!=(v=r.bottom)?v:0),Z=n[I]-J-m/2-h,X=rG(K,t[F]+m/2-(R[F]+r[rW[F]]),t[F]+t[I]-m/2-(R[F]+r[rW[F]]));q[F]=rG(X,Y,Z),({placement:N,crossPlacement:j}=M),m?W=q[F]:"right"===j?W+=t[I]:"center"===j&&(W+=t[I]/2);let Q="left"===N||"top"===N?n[O]:0,ee={x:"top"===N||"bottom"===N?W:Q,y:"left"===N||"right"===N?W:Q};return{position:R,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:N,triggerAnchorPoint:ee}}(o,w,$,x,k,u,p,C,E,D,f,m,!!A&&"static"!==A,h,g,y)}({placement:(D=p,"rtl"===a?D.replace("start","right").replace("end","left"):D.replace("start","left").replace("end","right")),overlayNode:l.current,targetNode:s.current,scrollNode:u.current||l.current,padding:d,shouldFlip:f,boundaryElement:m,offset:h,crossOffset:g,maxHeight:w,arrowSize:null!=(C=null!=o?o:null==c||null==(n=c.current)?void 0:n.getBoundingClientRect().width)?C:0,arrowBoundaryOffset:$});if(z.position){if(B.style.top="",B.style.bottom="",B.style.left="",B.style.right="",Object.keys(z.position).forEach(e=>B.style[e]=z.position[e]+"px"),B.style.maxHeight=null!=z.maxHeight?z.maxHeight+"px":"",S&&document.activeElement&&u.current){let e=document.activeElement.getBoundingClientRect(),t=u.current.getBoundingClientRect(),n=e[S.type]-t[S.type];u.current.scrollTop+=n-S.offset}x(z)}},C);ex(D,C),ex(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=D]),r9({ref:l,onResize:D}),r9({ref:s,onResize:D});let S=(0,v.useRef)(!1);ex(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),D()},n=()=>{S.current&&t()};return null==ae||ae.addEventListener("resize",t),null==ae||ae.addEventListener("scroll",n),()=>{null==ae||ae.removeEventListener("resize",t),null==ae||ae.removeEventListener("scroll",n)}},[D]);let B=(0,v.useCallback)(()=>{S.current||null==A||A()},[A,S]);return!function(e){let{triggerRef:t,isOpen:n,onClose:i}=e;(0,v.useEffect)(()=>{if(!n||null===i)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let r=i||r8.get(t.current);r&&r()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,i,t])}({triggerRef:s,isOpen:b,onClose:A&&B}),{overlayProps:{style:{position:k?"absolute":"fixed",top:k?void 0:0,left:k?void 0:0,zIndex:1e5,...null==k?void 0:k.position,maxHeight:null!=(t=null==k?void 0:k.maxHeight)?t:"100vh"}},placement:null!=(n=null==k?void 0:k.placement)?n:null,triggerAnchorPoint:null!=(i=null==k?void 0:k.triggerAnchorPoint)?i:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==k?void 0:k.arrowOffsetLeft,top:null==k?void 0:k.arrowOffsetTop}},updatePosition:D}}({...c,targetRef:n,overlayRef:i,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;ex(()=>{if(!t){let e,t,n,i,a;return 1==++aa&&(r=tu()?(n=null,i=ek(as(document,"touchstart",n=>{((e=n0(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=ao(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),as(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),as(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),as(document,"focus",e=>{var t;let i=e.target;((t=i)instanceof HTMLInputElement&&!ar.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=ek(as(window,"scroll",()=>{window.scrollTo(0,0)}),ao(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ao(document.documentElement,"overflow","hidden"),ao(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),i.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{i.style.transform="",ai&&(ai.height<window.innerHeight?requestAnimationFrame(()=>{al(i)}):ai.addEventListener("resize",()=>al(i),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),i()}):ek((a=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?ao(document.documentElement,"scrollbarGutter","stable"):ao(document.documentElement,"paddingRight",`${a}px`)),ao(document.documentElement,"overflow","hidden"))),()=>{0==--aa&&r()}}},[t])}({isDisabled:o||!t.isOpen}),(0,v.useEffect)(()=>{if(t.isOpen&&i.current){let t,u,p,d,f,m,h,g,y,b,v;if(o){var e,n,r,s,l,c=null!=(e=null==a?void 0:a.current)?e:i.current;let t=rH[rH.length-1];return t&&!t.visibleNodes.has(c)?(t.visibleNodes.add(c),()=>{t.visibleNodes.delete(c)}):void 0}return p=null!=(l=null==(u=(s={shouldUseInert:!0})instanceof(t=eQ((r=[null!=(n=null==a?void 0:a.current)?n:i.current],r[0]))).Element?{root:s}:s)?void 0:u.root)?l:document.body,d=(null==u?void 0:u.shouldUseInert)&&rL,f=new Set(r),m=new Set,h=(e,n)=>{d&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},g=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))f.add(t);let t=e=>{if(m.has(e)||f.has(e)||e.parentElement&&m.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of f)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&y(e),i!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)y(e),e=n.nextNode()}},y=e=>{var n;let i=null!=(n=rV.get(e))?n:0;(d&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===i||(0===i&&h(e,!0),m.add(e),rV.set(e,i+1))},rH.length&&rH[rH.length-1].disconnect(),g(p),(b=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&![...f,...m].some(e=>e.contains(t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?f.add(e):e instanceof Element&&g(e)})).observe(p,{childList:!0,subtree:!0}),v={visibleNodes:f,hiddenNodes:m,observe(){b.observe(p,{childList:!0,subtree:!0})},disconnect(){b.disconnect()}},rH.push(v),()=>{for(let e of(b.disconnect(),m)){let t=rV.get(e);null!=t&&(1===t?(h(e,!1),rV.delete(e)):rV.set(e,t-1))}v===rH[rH.length-1]?(rH.pop(),rH.length&&rH[rH.length-1].observe()):rH.splice(rH.indexOf(v),1)}}},[o,t.isOpen,i,a]),{popoverProps:eT(p,f),arrowProps:m,underlayProps:d,placement:h,triggerAnchorPoint:g}}({...a,offset:null!=(o=a.offset)?o:8,arrowRef:l,groupRef:p?u:c},e),y=a.popoverRef,b=function(e,t=!0){let[n,i]=(0,v.useState)(!0),r=n&&t;return ex(()=>{if(r&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,r]),ap(e,r,(0,v.useCallback)(()=>i(!1),[])),r}(y,!!h)||a.isEntering||!1,A=eF({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:h,isEntering:b,isExiting:t}}),w=!a.isNonModal||"SubmenuTrigger"===a.trigger,[$,k]=(0,v.useState)(!1);ex(()=>{y.current&&k(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,v.useEffect)(()=>{$&&"SubmenuTrigger"!==a.trigger&&y.current&&!y.current.contains(document.activeElement)&&t8(y.current)},[$,y,a.trigger]);let x=(0,v.useMemo)(()=>{let e=A.children;if(i)for(let t of i)e=v.createElement(t.Provider,{value:null},e);return e},[A.children,i]),C={...d.style,"--trigger-anchor-point":g?`${g.x}px ${g.y}px`:void 0,...A.style},E=v.createElement("div",{...eT(eZ(a,{global:!0}),d),...A,role:$?"dialog":void 0,tabIndex:$?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:y,slot:a.slot||void 0,style:C,dir:a.dir,"data-trigger":a.trigger,"data-placement":h,"data-entering":b||void 0,"data-exiting":t||void 0},!a.isNonModal&&v.createElement(au,{onDismiss:e.close}),v.createElement(rR.Provider,{value:{...m,placement:h,ref:l}},x),v.createElement(au,{onDismiss:e.close}));return p?v.createElement(rC,{...a,shouldContainFocus:$,isExiting:t,portalContainer:null!=(s=null!=n?n:null==u?void 0:u.current)?s:void 0},E):v.createElement(rC,{...a,shouldContainFocus:$,isExiting:t,portalContainer:n},!a.isNonModal&&e.isOpen&&v.createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),v.createElement("div",{ref:c,style:{display:"contents"}},v.createElement(am.Provider,{value:c},E)))}function ag(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let ay=(0,v.createContext)(null),ab=(0,v.createContext)(null),av=(0,v.createContext)(null),aA=(0,v.createContext)(null),aw=[ib,nd,rN,nh],a$=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ay);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",o=function(e){var t,n;let i=ad(e),[r,a]=n9(e.value,e.defaultValue||null,e.onChange),[o]=(0,v.useState)(r),s=r||e.placeholderValue||null,[l,c]=ru(s,e.granularity),u=null!=r?r.toDate(null!=c?c:"UTC"):null,p="hour"===l||"minute"===l||"second"===l,d=null==(t=e.shouldCloseOnSelect)||t,[f,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null);if(r&&(f=r,"hour"in r&&(h=r)),s&&!(l in s))throw Error("Invalid granularity "+l+" for value "+s.toString());let y=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,b=(0,v.useMemo)(()=>({granularity:l,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:y}),[l,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,y]),{minValue:A,maxValue:w,isDateUnavailable:$}=e,k=(0,v.useMemo)(()=>ri(r,A,w,$,b),[r,A,w,$,b]),x=i6({...e,value:r,builtinValidation:k}),C=x.displayValidation.isInvalid,E=e.validationState||(C?"invalid":null),D=(e,t)=>{a("timeZone"in t?t.set((0,Z.gw)(e)):(0,Z.tR)(e,t)),m(null),g(null),x.commitValidation()};return{...x,value:r,defaultValue:null!=(n=e.defaultValue)?n:o,setValue:a,dateValue:f,timeValue:h,setDateValue:t=>{let n="function"==typeof d?d():d;p?h||n?D(t,h||rs(e.defaultValue||e.placeholderValue)):m(t):(a(t),x.commitValidation()),n&&i.setOpen(!1)},setTimeValue:e=>{f&&e?D(f,e):g(e)},granularity:l,hasTime:p,...i,setOpen(t){!t&&!r&&f&&p&&D(f,h||rs(e.defaultValue||e.placeholderValue)),i.setOpen(t)},validationState:E,isInvalid:C,formatValue:(e,t)=>u?new nD(e,ro(t,b)).format(u):"",getDateFormatter:(e,t)=>new nD(e,ro({},{...b,...t}))}}({...e,validationBehavior:a}),s=(0,v.useRef)(null),[l,c]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,fieldProps:d,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,t,n){var i;let r=eB(),a=eB(),o=eB(),s=nC((i=i$)&&i.__esModule?i.default:i,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:u}=t.displayValidation,{labelProps:p,fieldProps:d,descriptionProps:f,errorMessageProps:m}=iW({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),h=iG(t,n),g=d["aria-labelledby"]||d.id,{locale:y}=eA(),b=t.formatValue(y,{month:"long"}),A=nJ(b?s.format("selectedDateDescription",{date:b}):""),w=[A["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=eZ(e),k=(0,v.useMemo)(()=>ij(n),[n]),x=(0,v.useRef)(!1),{focusWithinProps:C}=ni({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(a);if(!(null==n?void 0:n.contains(t.relatedTarget))){var i,r;x.current=!1,null==(i=e.onBlur)||i.call(e,t),null==(r=e.onFocusChange)||r.call(e,!1)}},onFocusWithin:t=>{if(!x.current){var n,i;x.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(i=e.onFocusChange)||i.call(e,!0)}}});return{groupProps:eT($,h,d,A,C,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},fieldProps:{...d,id:o,[iJ]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[i5]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:m,buttonProps:{...A,id:r,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${r} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${r} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:c,validationDetails:u}}({...eR(e),label:c,validationBehavior:a},o,s),[A,w]=(0,v.useState)(null),$=(0,v.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);r9({ref:s,onResize:$});let{focusProps:k,isFocused:x,isFocusVisible:C}=nr({within:!0}),E=eF({...e,values:{state:o,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen},defaultClassName:"react-aria-DatePicker"}),D=eZ(e,{global:!0});return delete D.id,v.createElement(eO,{values:[[av,o],[ib,{...u,ref:s,isInvalid:o.isInvalid}],[rg,d],[nd,{...f,isPressed:o.isOpen}],[rN,{...p,ref:l,elementType:"span"}],[io,h],[rD,o],[af,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":A},clearContexts:aw}],[rE,m],[nh,{slots:{description:g,errorMessage:y}}],[rB,b]]},v.createElement("div",{...eT(D,E,k),ref:t,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":o.isOpen||void 0}),v.createElement(rI,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:o}))}),ak=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,ab);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",o=function(e){var t,n,i,r;let a=ad(e),[o,s]=n9(e.value,e.defaultValue||null,e.onChange),[l]=(0,v.useState)(o),[c,u]=(0,v.useState)(()=>o||{start:null,end:null});null==o&&c.start&&c.end&&u(c={start:null,end:null});let p=o||c,d=e=>{u(p=e||{start:null,end:null}),ag(p)?s(p):s(null)},[f,m]=ru((null==p?void 0:p.start)||(null==p?void 0:p.end)||e.placeholderValue||null,e.granularity),h="hour"===f||"minute"===f||"second"===f,g=null==(i=e.shouldCloseOnSelect)||i,[y,b]=(0,v.useState)(null),[A,w]=(0,v.useState)(null);p&&ag(p)&&(y=p,"hour"in p.start&&(A=p));let $=(e,t)=>{d({start:"timeZone"in t.start?t.start.set((0,Z.gw)(e.start)):(0,Z.tR)(e.start,t.start),end:"timeZone"in t.end?t.end.set((0,Z.gw)(e.end)):(0,Z.tR)(e.end,t.end)}),b(null),w(null),P.commitValidation()},k=t=>{let n="function"==typeof g?g():g;h?ag(t)&&(n||(null==A?void 0:A.start)&&(null==A?void 0:A.end))?$(t,{start:(null==A?void 0:A.start)||rs(e.placeholderValue),end:(null==A?void 0:A.end)||rs(e.placeholderValue)}):b(t):ag(t)?(d(t),P.commitValidation()):b(t),n&&a.setOpen(!1)},x=e=>{ag(y)&&ag(e)?$(y,e):w(e)},C=(null==p||null==(t=p.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===p.start.era||(null==p||null==(n=p.end)?void 0:n.calendar.identifier)==="gregory"&&"BC"===p.end.era,E=(0,v.useMemo)(()=>({granularity:f,timeZone:m,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:C}),[f,e.hourCycle,e.shouldForceLeadingZeros,m,e.hideTimeZone,C]),{minValue:D,maxValue:S,isDateUnavailable:B}=e,z=(0,v.useMemo)(()=>{var e,t,n;let i;return i=re(ri(null!=(t=null==(e=p)?void 0:e.start)?t:null,D,S,B,E),ri(null!=(n=null==e?void 0:e.end)?n:null,D,S,B,E)),(null==e?void 0:e.end)!=null&&null!=e.start&&0>e.end.compare(e.start)&&(i=re(i,{isInvalid:!0,validationErrors:[(nv.getGlobalDictionaryForPackage("@react-stately/datepicker")||rt).getStringForLocale("rangeReversed",rn())],validationDetails:{...i1,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),i},[p,D,S,B,E]),P=i6({...e,value:o,name:(0,v.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:z}),T=P.displayValidation.isInvalid,M=e.validationState||(T?"invalid":null);return{...P,value:p,defaultValue:null!=(r=e.defaultValue)?r:l,setValue:d,dateRange:y,timeRange:A,granularity:f,hasTime:h,setDate(e,t){var n,i;"start"===e?k({start:t,end:null!=(n=null==y?void 0:y.end)?n:null}):k({start:null!=(i=null==y?void 0:y.start)?i:null,end:t})},setTime(e,t){var n,i;"start"===e?x({start:t,end:null!=(n=null==A?void 0:A.end)?n:null}):x({start:null!=(i=null==A?void 0:A.start)?i:null,end:t})},setDateTime(e,t){var n,i;"start"===e?d({start:t,end:null!=(n=null==p?void 0:p.end)?n:null}):d({start:null!=(i=null==p?void 0:p.start)?i:null,end:t})},setDateRange:k,setTimeRange:x,...a,setOpen(t){!t&&!((null==p?void 0:p.start)&&(null==p?void 0:p.end))&&ag(y)&&h&&$(y,{start:(null==A?void 0:A.start)||rs(e.placeholderValue),end:(null==A?void 0:A.end)||rs(e.placeholderValue)}),a.setOpen(t)},validationState:M,isInvalid:T,formatValue(t,n){let i;if(!p||!p.start||!p.end)return null;let r="timeZone"in p.start?p.start.timeZone:void 0,a=e.granularity||(p.start&&"minute"in p.start?"minute":"day"),o="timeZone"in p.end?p.end.timeZone:void 0,s=e.granularity||(p.end&&"minute"in p.end?"minute":"day"),l=ro(n,{granularity:a,timeZone:r,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===p.start.calendar.identifier&&"BC"===p.start.era||"gregory"===p.end.calendar.identifier&&"BC"===p.end.era}),c=p.start.toDate(r||"UTC"),u=p.end.toDate(o||"UTC"),d=new nD(t,l);if(r===o&&a===s&&0!==p.start.compare(p.end)){try{let e=d.formatRangeToParts(c,u),t=-1;for(let n=0;n<e.length;n++){let i=e[n];if("shared"===i.source&&"literal"===i.type)t=n;else if("endRange"===i.source)break}let n="",i="";for(let r=0;r<e.length;r++)r<t?n+=e[r].value:r>t&&(i+=e[r].value);return{start:n,end:i}}catch{}i=d}else i=new nD(t,ro(n,{granularity:s,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(c),end:i.format(u)}},getDateFormatter:(e,t)=>new nD(e,ro({},{...E,...t}))}}({...e,validationBehavior:a}),s=(0,v.useRef)(null),[l,c]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,startFieldProps:d,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:b,...A}=function(e,t,n){var i,r,a,o,s,l,c,u;let p=nC((u=i$)&&u.__esModule?u.default:u,"@react-aria/datepicker"),{isInvalid:d,validationErrors:f,validationDetails:m}=t.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:b}=iW({...e,labelElementType:"span",isInvalid:d,errorMessage:e.errorMessage||f}),A=g["aria-labelledby"]||g.id,{locale:w}=eA(),$=t.formatValue(w,{month:"long"}),k=nJ($?p.format("selectedRangeDescription",{startDate:$.start,endDate:$.end}):""),x={"aria-label":p.format("startDate"),"aria-labelledby":A},C={"aria-label":p.format("endDate"),"aria-labelledby":A},E=eB(),D=eB(),S=iG(t,n),B=[k["aria-describedby"],g["aria-describedby"]].filter(Boolean).join(" ")||void 0,z=(0,v.useMemo)(()=>ij(n,{accept:e=>e.id!==E}),[n,E]),P={[iZ]:z,[iJ]:"presentation","aria-describedby":B,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},T=eZ(e),M=(0,v.useRef)(!1),{focusWithinProps:O}=ni({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(D);if(!(null==n?void 0:n.contains(t.relatedTarget))){var i,r;M.current=!1,null==(i=e.onBlur)||i.call(e,t),null==(r=e.onFocusChange)||r.call(e,!1)}},onFocusWithin:t=>{if(!M.current){var n,i;M.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(i=e.onFocusChange)||i.call(e,!0)}}}),F=(0,v.useRef)(i3),I=(0,v.useRef)(i3);return{groupProps:eT(T,S,g,k,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":B,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...h,onClick:()=>{z.focusFirst()}},buttonProps:{...k,id:E,"aria-haspopup":"dialog","aria-label":p.format("calendar"),"aria-labelledby":`${E} ${A}`,"aria-describedby":B,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${E} ${A}`},startFieldProps:{...x,...P,value:null!=(l=null==(i=t.value)?void 0:i.start)?l:null,defaultValue:null==(r=t.defaultValue)?void 0:r.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[i5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){F.current=e,t.updateValidation(re(e,I.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...C,...P,value:null!=(c=null==(a=t.value)?void 0:a.end)?c:null,defaultValue:null==(o=t.defaultValue)?void 0:o.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[i5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){I.current=e,t.updateValidation(re(F.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:y,errorMessageProps:b,calendarProps:{autoFocus:!0,value:(null==(s=t.dateRange)?void 0:s.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:d,validationErrors:f,validationDetails:m}}({...eR(e),label:c,validationBehavior:a},o,s),[w,$]=(0,v.useState)(null),k=(0,v.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);r9({ref:s,onResize:k});let{focusProps:x,isFocused:C,isFocusVisible:E}=nr({within:!0}),D=eF({...e,values:{state:o,isFocusWithin:C,isFocusVisible:E,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=eZ(e,{global:!0});return delete S.id,v.createElement(eO,{values:[[aA,o],[ib,{...u,ref:s,isInvalid:o.isInvalid}],[nd,{...m,isPressed:o.isOpen}],[rN,{...p,ref:l,elementType:"span"}],[is,g],[rD,o],[af,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w},clearContexts:aw}],[rE,h],[rg,{slots:{start:d,end:f}}],[nh,{slots:{description:y,errorMessage:b}}],[rB,A]]},v.createElement("div",{...eT(S,D,x),ref:t,slot:e.slot||void 0,"data-focus-within":C||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":E||void 0,"data-disabled":e.isDisabled||void 0,"data-open":o.isOpen||void 0}))});var ax=n(42729),aC=n(22613),aE=n(47197),aD={};aD.styleTagTransform=F(),aD.setAttributes=P(),aD.insert=B().bind(null,"head"),aD.domAPI=D(),aD.insertStyleElement=M(),C()(aE.A,aD);let aS=aE.A&&aE.A.locals?aE.A.locals:void 0;var aB=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),az=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-add",iconProps:e})})),aP=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),aT=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),aM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),aO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),aF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),aI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),aN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),aj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),aR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),aL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),aV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),aH=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),aG=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),aU=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),aq=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),aW=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),aK=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),aY=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),aJ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),aZ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),aX=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),aQ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-close",iconProps:e})})),a0=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),a1=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-document",iconProps:e})})),a2=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-download",iconProps:e})})),a3=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),a4=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),a5=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),a6=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-events",iconProps:e})})),a7=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),a8=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),a9=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),oe=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),ot=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),on=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-group",iconProps:e})})),oi=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),or=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),oa=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),oo=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),os=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information",iconProps:e})})),ol=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),oc=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),ou=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),op=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),od=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-location",iconProps:e})})),of=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-material-order",iconProps:e})})),om=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),oh=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),o_=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),og=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),oy=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-money",iconProps:e})})),ob=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),ov=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),oA=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),ow=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),o$=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),ok=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),ox=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-print",iconProps:e})})),oC=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-procedure-order",iconProps:e})})),oE=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),oD=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-pict-referral-order",iconProps:e})})),oS=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),oB=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-report",iconProps:e})})),oz=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),oP=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),oT=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-save",iconProps:e})})),oM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-search",iconProps:e})})),oO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),oF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),oI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),oN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),oj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),oR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),oL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-table",iconProps:e})})),oV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-time",iconProps:e})})),oH=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),oG=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),oU=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),oq=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),oW=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),oK=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),oY=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-password",iconProps:e})})),oJ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-user",iconProps:e})})),oZ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),oX=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-view",iconProps:e})})),oQ=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(o6,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),o0=oQ,o1=a0,o2=op,o3=oa,o4=oI,o5=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.icon,i=e.fallback,r=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["icon","fallback"]),a=(0,v.useRef)(document.getElementById(n));return(0,v.useEffect)(function(){var e=document.getElementById("omrs-svgs-container"),t=new MutationObserver(function(e){var t=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var l=o.value;"childList"===l.type&&(a.current=document.getElementById(n))}}catch(e){i=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(i)throw r}}});return e&&t.observe(e,{childList:!0}),function(){return t.disconnect()}},[n]),A().createElement(k.fS,{value:a.current,fallback:i},A().createElement(o6,{ref:t,icon:n,iconProps:r}))})),o6=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.icon,i=Object.assign({},{fill:"currentColor",size:20},e.iconProps),r=i.className,a=i.fill,o=i.size;(o<=0||o>72)&&(console.error("Invalid size '".concat(o,"' specified for ").concat(n,". Defaulting to 20.")),o=20);var s=(0,v.useRef)(null);return(0,v.useImperativeHandle)(t,function(){return s.current}),(0,v.useEffect)(function(){s.current&&"currentColor"!==a&&s.current.style.setProperty("--omrs-icon-fill",a)},[]),A().createElement("svg",{ref:s,className:$()("omrs-icon",aS.icon,r),height:o,width:o,viewBox:"0 0 16 16"},A().createElement("use",{href:"#".concat(n)}))})),o7=n(23464),o8=n.n(o7);function o9(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(o9(e,i0.ng)||o9(e,i0._l)||o9(e,i0.Ip))return t?(0,Z.yP)(e,t):e;var i=o8()(e).toDate(),r=new i0.ng(i.getFullYear(),i.getMonth()+1,i.getDate());return t?(0,Z.yP)(r,t):r}function st(e){if(e)return e.toDate((0,X.Xj)())}var sn=(0,v.createContext)(null),si={};function sr(){return"undefined"!=typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}si={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`\u{62D}\u{642}\u{644} \u{631}\u{642}\u{645}\u{64A}`},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`\u{41D}\u{43E}\u{43C}\u{435}\u{440} \u{43D}\u{430} \u{43F}\u{43E}\u{43B}\u{435}\u{442}\u{43E}`},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`\u{10C}\xedseln\xe9 pole`},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`\u{3A0}\u{3B5}\u{3B4}\u{3AF}\u{3BF} \u{3B1}\u{3C1}\u{3B9}\u{3B8}\u{3BC}\u{3BF}\u{3CD}`},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de n\xfamero`},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri v\xe4li`},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokentt\xe4`},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`\u{5E9}\u{5D3}\u{5D4} \u{5DE}\u{5E1}\u{5E4}\u{5E8}`},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Sz\xe1mmez\u{151}`},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`\u{6570}\u{5024}\u{30D5}\u{30A3}\u{30FC}\u{30EB}\u{30C9}`},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`\u{BC88}\u{D638} \u{D544}\u{B4DC}`},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skait\u{13C}u lauks`},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de n\xfamero`},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo num\xe9rico`},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`C\xe2mp numeric`},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`\u{427}\u{438}\u{441}\u{43B}\u{43E}\u{432}\u{43E}\u{435} \u{43F}\u{43E}\u{43B}\u{435}`},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`\u{10C}\xedseln\xe9 pole`},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`\u{160}tevil\u{10D}no polje`},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerf\xe4lt`},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Say\u{131} alan\u{131}`},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`\u{41F}\u{43E}\u{43B}\u{435} \u{43D}\u{43E}\u{43C}\u{435}\u{440}\u{430}`},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`\u{6570}\u{5B57}\u{5B57}\u{6BB5}`},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`\u{6578}\u{5B57}\u{6B04}\u{4F4D}`}};var sa=n(93092);function so(e={}){let{locale:t}=eA();return(0,v.useMemo)(()=>new(0,sa.K)(t,e),[t,e])}var ss={};function sl(e){var t;let n=(0,v.useRef)(void 0),{value:i,textValue:r,minValue:a,maxValue:o,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:u,onIncrementPage:p,onDecrement:d,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=nC((t=ss)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,v.useEffect)(()=>()=>clearTimeout(n.current),[]);let y=(0,v.useRef)(!1),b=()=>{y.current=!0},A=()=>{y.current=!1},w=""===r?g.format("Empty"):(r||`${i}`).replace("-","−");(0,v.useEffect)(()=>{y.current&&(eV&&eV.clear("assertive"),eH(w,"assertive"))},[w]);let $=eE(e=>{clearTimeout(n.current),null==u||u(),n.current=window.setTimeout(()=>{(void 0===o||isNaN(o)||void 0===i||isNaN(i)||i<o)&&$(60)},e)}),k=eE(e=>{clearTimeout(n.current),null==d||d(),n.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===i||isNaN(i)||i>a)&&k(60)},e)}),x=e=>{e.preventDefault()},{addGlobalListener:C,removeAllGlobalListeners:E}=tD();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===i||isNaN(i)?void 0:i,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":o,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(p){e.preventDefault(),null==p||p();break}case"ArrowUp":case"Up":u&&(e.preventDefault(),null==u||u());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:b,onBlur:A},incrementButtonProps:{onPressStart:()=>{$(400),C(window,"contextmenu",x)},onPressEnd:()=>{clearTimeout(n.current),E()},onFocus:b,onBlur:A},decrementButtonProps:{onPressStart:()=>{k(400),C(window,"contextmenu",x)},onPressEnd:()=>{clearTimeout(n.current),E()},onFocus:b,onBlur:A}}}ss={"ar-AE":{Empty:`\u{641}\u{627}\u{631}\u{63A}`},"bg-BG":{Empty:`\u{418}\u{437}\u{43F}\u{440}\u{430}\u{437}\u{43D}\u{438}`},"cs-CZ":{Empty:`Pr\xe1zdn\xe9`},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:`\u{386}\u{3B4}\u{3B5}\u{3B9}\u{3BF}`},"en-US":{Empty:"Empty"},"es-ES":{Empty:`Vac\xedo`},"et-EE":{Empty:`T\xfchjenda`},"fi-FI":{Empty:`Tyhj\xe4`},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:`\u{5E8}\u{5D9}\u{5E7}`},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:`\xdcres`},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:`\u{7A7A}`},"ko-KR":{Empty:`\u{BE44}\u{C5B4} \u{C788}\u{C74C}`},"lt-LT":{Empty:`Tu\u{161}\u{10D}ias`},"lv-LV":{Empty:`Tuk\u{161}s`},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:`\u{41D}\u{435} \u{437}\u{430}\u{43F}\u{43E}\u{43B}\u{43D}\u{435}\u{43D}\u{43E}`},"sk-SK":{Empty:`Pr\xe1zdne`},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:`Bo\u{15F}`},"uk-UA":{Empty:`\u{41F}\u{443}\u{441}\u{442}\u{43E}`},"zh-CN":{Empty:`\u{7A7A}`},"zh-TW":{Empty:`\u{7A7A}\u{767D}`}};var sc=n(95899);function su(e,t,n){let i="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let r=t.toString().split("."),a=n.toString().split("."),o=Math.pow(10,Math.max(r[1]&&r[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*o),n=Math.round(n*o),i=("+"===e?t+n:t-n)/o}return i}let sp=(0,v.createContext)(null),sd=(0,v.createContext)(null),sf=(0,v.forwardRef)(function(e,t){var n,i;[e,t]=eN(e,t,sp);let{validationBehavior:r}=eI(rT)||{},a=null!=(i=null!=(n=e.validationBehavior)?n:r)?i:"native",{locale:o}=eA(),s=function(e){let{minValue:t,maxValue:n,step:i,formatOptions:r,value:a,defaultValue:o=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:u}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===i||isNaN(i)?rG(a,t,n):rq(a,t,n,i)),isNaN(o)||(o=void 0===i||isNaN(i)?rG(o,t,n):rq(o,t,n,i));let[p,d]=n9(a,isNaN(o)?NaN:o,s),[f]=(0,v.useState)(p),[m,h]=(0,v.useState)(()=>isNaN(p)?"":new(0,sa.K)(l,r).format(p)),g=(0,v.useMemo)(()=>new(0,sc.d)(l,r),[l,r]),y=(0,v.useMemo)(()=>g.getNumberingSystem(m),[g,m]),b=(0,v.useMemo)(()=>new(0,sa.K)(l,{...r,numberingSystem:y}),[l,r,y]),A=(0,v.useMemo)(()=>b.resolvedOptions(),[b]),w=(0,v.useCallback)(e=>isNaN(e)||null===e?"":b.format(e),[b]),$=i6({...e,value:p}),k=void 0===i||isNaN(i)?1:i;"percent"===A.style&&(void 0===i||isNaN(i))&&(k=.01);let[x,C]=(0,v.useState)(p),[E,D]=(0,v.useState)(l),[S,B]=(0,v.useState)(r);Object.is(p,x)&&l===E&&r===S||(h(w(p)),C(p),D(l),B(r));let z=(0,v.useMemo)(()=>g.parse(m),[g,m]),P=(e,i=0)=>{if(isNaN(z))return rq(isNaN(i)?0:i,t,n,k);{let i=rq(z,t,n,k);return"+"===e&&i>z||"-"===e&&i<z?i:rq(su(e,z,k),t,n,k)}},T=(0,v.useMemo)(()=>!c&&!u&&(isNaN(z)||void 0===n||isNaN(n)||rq(z,t,n,k)>z||su("+",z,k)<=n),[c,u,t,n,k,z]),M=(0,v.useMemo)(()=>!c&&!u&&(isNaN(z)||void 0===t||isNaN(t)||rq(z,t,n,k)<z||su("-",z,k)>=t),[c,u,t,n,k,z]);return{...$,validate:e=>g.isValidPartialNumber(e,t,n),increment:()=>{let e=P("+",t);e===p&&h(w(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=n&&(d(rq(n,t,n,k)),$.commitValidation())},decrement:()=>{let e=P("-",n);e===p&&h(w(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=t&&(d(t),$.commitValidation())},canIncrement:T,canDecrement:M,minValue:t,maxValue:n,numberValue:z,defaultNumberValue:isNaN(o)?f:o,setNumberValue:d,setInputValue:h,inputValue:m,commit:()=>{let e;if(!m.length){d(NaN),h(void 0===a?"":w(p));return}isNaN(z)?h(w(p)):(e=void 0===i||isNaN(i)?rG(z,t,n):rq(z,t,n,i),d(e=g.parse(w(e))),h(w(void 0===a?e:p)),$.commitValidation())}}}({...e,locale:o,validationBehavior:a}),l=(0,v.useRef)(null),[c,u]=ej(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:p,groupProps:d,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,t,n){var i,r;let a,{id:o,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:u,isRequired:p,minValue:d,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:A,onKeyDown:w,onKeyUp:$,description:k,errorMessage:x,isWheelDisabled:C,...E}=e,{increment:D,incrementToMax:S,decrement:B,decrementToMin:z,numberValue:P,inputValue:T,commit:M,commitValidation:O}=t,F=nC((r=si)&&r.__esModule?r.default:r,"@react-aria/numberfield"),I=eB(o),{focusProps:N}=t9({onBlur(){M()}}),j=so(g),R=(0,v.useMemo)(()=>j.resolvedOptions(),[j]),L=so({...g,currencySign:void 0}),V=(0,v.useMemo)(()=>isNaN(P)?"":L.format(P),[L,P]),{spinButtonProps:H,incrementButtonProps:G,decrementButtonProps:U}=sl({isDisabled:c,isReadOnly:u,isRequired:p,maxValue:f,minValue:d,onIncrement:D,onIncrementToMax:S,onDecrement:B,onDecrementToMin:z,value:P,textValue:V}),[q,W]=(0,v.useState)(!1),{focusWithinProps:K}=ni({isDisabled:c,onFocusWithinChange:W});!function(e,t){let{onScroll:n,isDisabled:i}=e,r=(0,v.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);nW(t,"wheel",i?void 0:r)}({onScroll:(0,v.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?D():e.deltaY<0&&B())},[B,D]),isDisabled:C||c||u||!q},n);let Y=(null!=(i=R.maximumFractionDigits)?i:0)>0,J=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Z="numeric";tl()?J?Z="text":Y&&(Z="decimal"):tf()&&(J?Z="numeric":Y&&(Z="decimal"));let X=eZ(e),Q=(0,v.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?(M(),O()):e.continuePropagation())},[M,O]),{isInvalid:ee,validationErrors:et,validationDetails:en}=t.displayValidation,{labelProps:ei,inputProps:er,descriptionProps:ea,errorMessageProps:eo}=function(e,t,n){let i=eE(e=>{let i=n.current;if(!i)return;let r=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":r=i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteContentForward":r=i.selectionEnd===i.selectionStart?i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd+1):i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteContentBackward":r=i.selectionEnd===i.selectionStart?i.value.slice(0,i.selectionStart-1)+i.value.slice(i.selectionStart):i.value.slice(0,i.selectionStart)+i.value.slice(i.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":r=i.value.slice(i.selectionStart);break;default:null!=e.data&&(r=i.value.slice(0,i.selectionStart)+e.data+i.value.slice(i.selectionEnd))}null!=r&&t.validate(r)||e.preventDefault()});(0,v.useEffect)(()=>{if(!sr()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",i,!1),()=>{e.removeEventListener("beforeinput",i,!1)}},[n,i]);let r=sr()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:l,...c}=function(e,t){var n;let{inputElementType:i="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:o=!1,type:s="text",validationBehavior:l="aria"}=e,[c,u]=n9(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=nn(e,t),d=i6({...e,value:c}),{isInvalid:f,validationErrors:m,validationDetails:h}=d.displayValidation,{labelProps:g,fieldProps:y,descriptionProps:b,errorMessageProps:A}=iW({...e,isInvalid:f,errorMessage:e.errorMessage||m}),w=eZ(e,{labelable:!0}),$={type:s,pattern:e.pattern},[k]=(0,v.useState)(c);return iq(t,null!=(n=e.defaultValue)?n:k,u),iK(e,d,t),(0,v.useEffect)(()=>{if(t.current instanceof eQ(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:g,inputProps:eT(w,"input"===i?$:void 0,{disabled:r,readOnly:o,required:a&&"native"===l,"aria-required":a&&"aria"===l||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:c,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...p,...y}),descriptionProps:b,errorMessageProps:A,isInvalid:f,validationErrors:m,validationDetails:h}}(e,n),u=(0,v.useRef)(null);return{inputProps:eT(o,{onBeforeInput:r,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:i}=n.current;u.current={value:e,selectionStart:t,selectionEnd:i}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:i,selectionEnd:r}=u.current;n.current.value=e,n.current.setSelectionRange(i,r),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...c}}({...E,...X,name:void 0,form:void 0,label:h,autoFocus:m,isDisabled:c,isReadOnly:u,isRequired:p,validate:void 0,[i5]:t,value:T,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Z,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:A,onKeyDown:(0,v.useMemo)(()=>ek(Q,w),[Q,w]),onKeyUp:$,description:k,errorMessage:x},t,n);iq(n,t.defaultNumberValue,t.setNumberValue);let es=eT(H,N,er,{role:null,"aria-roledescription":tu()?null:F.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(es["aria-required"]=void 0);let el=e=>{var t;document.activeElement!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},ec=e["aria-label"]||("string"==typeof e.label?e.label:"");ec||(a=null!=e.label?ei.id:e["aria-labelledby"]);let eu=eB(),ep=eB(),ed=eT(G,{"aria-label":l||F.format("increase",{fieldLabel:ec}).trim(),id:a&&!l?eu:null,"aria-labelledby":a&&!l?`${eu} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:el}),ef=eT(U,{"aria-label":s||F.format("decrease",{fieldLabel:ec}).trim(),id:a&&!s?ep:null,"aria-labelledby":a&&!s?`${ep} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:el});return{groupProps:{...K,role:"group","aria-disabled":c,"aria-invalid":ee?"true":void 0},labelProps:ei,inputProps:es,incrementButtonProps:ed,decrementButtonProps:ef,errorMessageProps:eo,descriptionProps:ea,isInvalid:ee,validationErrors:et,validationDetails:en}}({...eR(e),label:u,validationBehavior:a},s,l),A=eF({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=eZ(e,{global:!0});return delete w.id,v.createElement(eO,{values:[[sd,s],[ib,d],[iA,{...f,ref:l}],[rN,{...p,ref:c}],[nd,{slots:{increment:m,decrement:h}}],[nh,{slots:{description:g,errorMessage:y}}],[rB,b]]},v.createElement("div",{...w,...A,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&v.createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(s.numberValue)?"":s.numberValue}))});function sm(e,t){return parseInt((0,aC.Yq)(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}var sh=(0,v.forwardRef)(function(e,t){var n=e.className,i=(0,v.useContext)(il),r=(0,v.useContext)(ic),a=null!=i?i:r,o=(0,v.useContext)(sn),s=(0,X.Xj)(),l=(0,aC.Yq)(a.visibleRange.start.toDate(s),{calendar:o.calendar,locale:o.baseName,day:!1,year:!1,noToday:!0}),c=sm(a.visibleRange.start.toDate(s),o),u=a.maxValue?sm(a.maxValue.toDate(s),o):void 0,p=a.minValue?sm(a.minValue.toDate(s),o):void 0,d=(0,v.useCallback)(function(e){a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&A().createElement("span",{ref:t,className:n},A().createElement("span",null,l),A().createElement(sf,{formatOptions:{useGrouping:!1},maxValue:u,minValue:p,onChange:d,value:c},A().createElement(iw,null),A().createElement(iv,null,A().createElement(nf,{slot:"increment"},A().createElement(aV,{size:8})),A().createElement(nf,{slot:"decrement"},A().createElement(aj,{size:8})))))});function s_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function sg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sy(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var sb=(0,v.forwardRef)(function(e,t){var n,i=(0,v.useContext)(av),r=(n=eN({slot:e.slot},t,rg),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(n,2)||function(e,t){if(e){if("string"==typeof e)return s_(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s_(e,t)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],o=r[1],s=eA().locale,l=rh(sy(sg({},a),{locale:s,createCalendar:J.d})),c=(0,v.useRef)(null),u=iX(sy(sg({},a),{inputRef:c}),l,o),p=u.fieldProps,d=u.inputProps,f=(0,v.useCallback)(function(){l.isDisabled||i.toggle()},[]);return A().createElement(eO,{values:[[ry,l],[iA,sy(sg({},d),{ref:c})],[ib,sy(sg({},p),{ref:o,isInvalid:l.isInvalid})]]},A().createElement(iv,sy(sg({},e),{id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:l.isDisabled,isInvalid:l.isInvalid,onClick:f}),l.segments.map(function(t,n){return(0,v.cloneElement)(e.children(t),{key:n})})),A().createElement(iw,null))});function sv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}var sA=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(av).isInvalid?A().createElement(oQ,sv({ref:t,size:16},e)):A().createElement(aN,sv({ref:t,size:16},e))});class sw{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let s$=new Map;function sk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sx(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function sC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function sE(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var sD=(0,v.forwardRef)(function(e,t){var n,i,r,a,o,s,l,c,u,p,d=e.segment,f=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["segment"]),m=(0,v.useContext)(ry),h=ew(t),g=function(e,t,n){let i,r,a,o,s=(0,v.useRef)(""),{locale:l,direction:c}=eA(),u=function(){var e;let{locale:t}=eA(),n=nx((e=i$)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,v.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new sw(t,n)}},[t,n])}(),{ariaLabel:p,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:m}=iY.get(t),h=e.isPlaceholder?"":e.text,g=(0,v.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=nM({month:"long",timeZone:g.timeZone}),b=nM({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=b.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:A}=sl({value:e.value,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,v.useMemo)(()=>new(0,sc.d)(l,{maximumFractionDigits:0}),[l]),$=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),i=w.parse(n);0===(n=0===i?"":n).length||0===i?t.clearSegment(e.type):t.setSegment(e.type,i),s.current=n}},{startsWith:k}=(i=function(e){let{locale:t}=eA(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(s$.has(n))return s$.get(n);let i=new Intl.Collator(t,e);return s$.set(n,i),i}({usage:"search",sensitivity:"base"}),r=(0,v.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===i.compare(e.slice(0,t.length),t)),[i]),a=(0,v.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===i.compare(e.slice(-t.length),t)),[i]),o=(0,v.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,r=(t=t.normalize("NFC")).length;for(;n+r<=e.length;n++){let a=e.slice(n,n+r);if(0===i.compare(t,a))return!0}return!1},[i]),(0,v.useMemo)(()=>({startsWith:r,endsWith:a,contains:o}),[r,a,o])),x=nM({hour:"numeric",hour12:!0}),C=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(0),x.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[x]),E=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(12),x.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[x]),D=nM({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,v.useMemo)(()=>{if("era"!==e.type)return[];let n=(0,Z.yP)(new(0,i0.ng)(1,1,1),t.calendar),i=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:D.formatToParts(t).find(e=>"era"===e.type).value}}),r=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(i.map(e=>e.formatted));if(r)for(let e of i)e.formatted=e.formatted.slice(r);return i},[D,t.calendar,e.type]),B=n=>{if(t.isDisabled||t.isReadOnly)return;let i=s.current+n;switch(e.type){case"dayPeriod":if(k(C,n))t.setSegment("dayPeriod",0);else if(k(E,n))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=S.find(e=>k(e.formatted,n));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(i))return;let r=w.parse(i),a=r,o=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":r>11&&(a=w.parse(n));break;case"h12":o=!1,r>12&&(a=w.parse(n))}void 0!==e.value&&e.value>=12&&r>1&&(r+=12)}else void 0!==e.maxValue&&r>e.maxValue&&(a=w.parse(n));if(isNaN(r))return;let l=0!==a||o;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(r+"0")>e.maxValue||i.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=i}}};nW((0,v.useRef)("undefined"!=typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=n.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(n.current)});let z=(0,v.useRef)("");nW(n,"beforeinput",i=>{if(n.current)switch(i.preventDefault(),i.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&$();break;case"insertCompositionText":z.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=i.data&&B(i.data)}}),nW(n,"input",e=>{let{inputType:t,data:i}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=z.current),null!=i&&(k(C,i)||k(E,i))&&B(i))}),ex(()=>{let e=n.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[n,m]);let P=tu()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,v.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let T=eB(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,O="literal"===e.type?"":u.of(e.type),F=nV({"aria-label":`${O}${p?`, ${p}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===c){I.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:eT(A,F,{id:T,...P,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(ts()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),$()}},onFocus:()=>{s.current="",n.current&&nQ(n.current,{containingElement:n0(n.current)});let e=window.getSelection();null==e||e.collapse(n.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(d,m,h).segmentProps,y=nr(),b=y.focusProps,w=y.isFocused,$=y.isFocusVisible,k=nc(sE(sC({},f),{isDisabled:m.isDisabled||"literal"===d.type})),x=k.hoverProps,C=k.isHovered,E=(i=(n=sE(sC({},f),{values:sE(sC({},d),{isReadOnly:!d.isEditable,isInvalid:m.isInvalid,isDisabled:m.isDisabled,isHovered:C,isFocused:w,isFocusVisible:$}),defaultChildren:d.text})).className,r=n.style,a=n.children,s=void 0===(o=n.defaultClassName)?void 0:o,c=void 0===(l=n.defaultChildren)?void 0:l,u=n.defaultStyle,p=n.values,(0,v.useMemo)(function(){var e,t,n;return e="function"==typeof i?i(sx(sk({},p),{defaultClassName:s})):i,t="function"==typeof r?r(sx(sk({},p),{defaultStyle:u||{}})):r,n="function"==typeof a?a(sx(sk({},p),{defaultChildren:c})):null==a?c:a,{className:null!=e?e:s,style:t||u?sk({},u,t):void 0,children:null!=n?n:c,"data-rac":""}},[i,r,a,s,c,u,p])),D=(0,v.useCallback)(function(e){e.stopPropagation()},[]);return A().createElement("span",sE(sC({},eT(eZ(f),g,b,x),E),{ref:h,style:g.style,"data-placeholder":d.isPlaceholder||void 0,"data-invalid":m.isInvalid||void 0,"data-readonly":!d.isEditable||void 0,"data-disabled":m.isDisabled||void 0,"data-type":d.type,"data-hovered":C||void 0,"data-focused":w||void 0,"data-focus-visible":$||void 0,onClick:D}))}),sS=n(73335),sB={};sB.styleTagTransform=F(),sB.setAttributes=P(),sB.insert=B().bind(null,"head"),sB.domAPI=D(),sB.insertStyleElement=M(),C()(sS.A,sB);let sz=sS.A&&sS.A.locals?sS.A.locals:void 0;function sP(e){var t=e.children,n=e.isRangePicker,i=(0,v.useContext)(av),r=(0,v.useContext)(aA),a=void 0!==n&&n?r:i,o=(0,U.useOnClickOutside)(function(){return null==a?void 0:a.close()});return A().createElement(rS,{className:sz.dialog,ref:o},t)}function sT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sM={short:!1,size:"md"};function sO(e){return A().createElement(ev,e)}var sF=(0,v.forwardRef)(function(e,t){var n,i,r,a=Object.assign({},sM,e),o=a.className,s=a.defaultValue,l=a.isDisabled,c=a.invalid,u=a.invalidText,p=a.isInvalid,d=a.label,f=a.labelText,m=a.light,h=a.maxDate,g=a.minDate,y=a.onChange,b=a.onChangeRaw,w=a.short,x=a.size,C=a.value,E=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(a,["className","defaultValue","isDisabled","invalid","invalidText","isInvalid","label","labelText","light","maxDate","minDate","onChange","onChangeRaw","short","size","value"]),D=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,S=(0,v.useId)(),B=(0,v.useMemo)(function(){var e=(0,ax.J)();return D[e]&&(e=D[e]),e},[window.i18next.language]),z=(0,v.useMemo)(function(){var e=(0,aC.a7)(B);return void 0!==e?(0,J.d)(e):void 0},[B]),P=(0,v.useMemo)(function(){return new Intl.Locale(B,{calendar:null==z?void 0:z.identifier})},[B,z]),T=(0,v.useMemo)(function(){return se(s,z)},[s]),M=(0,v.useMemo)(function(){return se(C,z,!0)},[C]),O=(0,v.useMemo)(function(){return se(h,z)},[h]),F=(0,v.useMemo)(function(){return se(g,z)},[g]),I=(0,v.useMemo)(function(){return null!=c?c:p},[c,p]),N=z?(0,Z.yP)((0,X.Ec)((0,X.Xj)()),z):(0,X.Ec)((0,X.Xj)()),j=(0,v.useMemo)(function(){return b&&y&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),b||function(e){return null==y?void 0:y(st(e))}},[b,y]);return A().createElement(sO,{locale:P.toString()},A().createElement("div",{className:$()("cds--form-item",o)},A().createElement(eO,{values:[[sn,P]]},A().createElement(a$,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){sT(e,t,n[t])})}return e}({className:$()("cds--date-picker","cds--date-picker--single",(sT(r={},"cds--date-picker--short",w),sT(r,"cds--date-picker--light",m),r)),defaultValue:T,isDisabled:l,isInvalid:I,maxValue:O,minValue:F,value:M,shouldForceLeadingZeros:"en"===P.language||void 0},E),i=i={onChange:j},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n),A().createElement("div",{className:"cds--date-picker-container"},(null!=f?f:d)&&A().createElement(rj,{className:$()("cds--label",{"cds--label--disabled":l}),htmlFor:S},null!=f?f:d),A().createElement(iv,{className:sz.inputGroup},A().createElement(sb,{id:S,ref:t,className:$()("cds--date-picker-input__wrapper",sz.inputWrapper,sT({},sz.inputWrapperMd,"md"===x||!x||0===x.length))},function(e){return"era"!==e.type?A().createElement(sD,{className:sz.inputSegment,segment:e}):A().createElement(A().Fragment,null)}),A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd)},A().createElement(sA,null))),I&&u&&A().createElement(rz,{className:sz.invalidText},u)),A().createElement(ah,{className:sz.popover,placement:"bottom start",offset:1,isNonModal:!0},A().createElement(sP,null,A().createElement(iu,null,A().createElement("header",{className:sz.header},A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd),slot:"previous"},A().createElement(aK,{size:16})),A().createElement(sh,{className:sz.monthYear}),A().createElement(nf,{className:$()(sz.flatButton,sz.flatButtonMd),slot:"next"},A().createElement(aY,{size:16}))),A().createElement(im,{className:sz.calendarGrid},function(e){return A().createElement(iy,{key:e.toString(),className:$()("cds--date-picker__day",sT({},sz.today,0===N.compare(e))),date:e})}))))))))}),sI=n(99939),sN={};sN.styleTagTransform=F(),sN.setAttributes=P(),sN.insert=B().bind(null,"head"),sN.domAPI=D(),sN.insertStyleElement=M(),C()(sI.A,sN);let sj=sI.A&&sI.A.locals?sI.A.locals:void 0;function sR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}var sL=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(aA).isInvalid?A().createElement(oQ,sR({ref:t,size:16},e)):A().createElement(aN,sR({ref:t,size:16},e))});function sV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sH=(0,v.forwardRef)(function(e,t){var n,i,r=e.className,a=e.defaultValue,o=e.invalid,s=e.invalidText,l=e.isDisabled,c=e.isInvalid,u=e.label,p=e.labelText,d=e.light,f=e.maxDate,m=e.minDate,h=e.onChange,g=e.onChangeRaw,y=e.value,b=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","defaultValue","invalid","invalidText","isDisabled","isInvalid","label","labelText","light","maxDate","minDate","onChange","onChangeRaw","value"]),w=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,x=(0,v.useId)(),C=(0,v.useMemo)(function(){var e=(0,ax.J)();return w[e]&&(e=w[e]),e},[window.i18next.language]),E=(0,v.useMemo)(function(){var e=(0,aC.a7)(C);return void 0!==e?(0,J.d)(e):void 0},[C]),D=(0,v.useMemo)(function(){return new Intl.Locale(C,{calendar:null==E?void 0:E.identifier})},[C,E]),S=(0,v.useMemo)(function(){if(y)return{start:se(y[0],E,!0),end:se(y[1],E,!0)}},[y]),B=(0,v.useMemo)(function(){if(a)return{start:se(a[0],E,!0),end:se(a[1],E,!0)}},[a]),z=(0,v.useMemo)(function(){return se(m,E,!0)},[m]),P=(0,v.useMemo)(function(){return se(f,E,!0)},[f]),T=(0,v.useMemo)(function(){return null!=o?o:c},[o,c]),M=E?(0,Z.yP)((0,X.Ec)((0,X.Xj)()),E):(0,X.Ec)((0,X.Xj)()),O=(0,v.useMemo)(function(){return g&&h&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),g||function(e){return null==h?void 0:h([st(e.start),st(e.end)])}},[g,h]);return A().createElement(sO,{locale:D.toString()},A().createElement("div",{className:$()("cds--form-item",r)},A().createElement(eO,{values:[[sn,D]]},A().createElement(ak,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){sV(e,t,n[t])})}return e}({id:x,className:$()("cds--date-picker",{"cds--date-picker--light":d,"cds--date-picker--disabled":l}),isInvalid:T,shouldForceLeadingZeros:"en"===D.language||void 0,maxValue:P,minValue:z,value:S,defaultValue:B,ref:t,isDisabled:l},b),i=i={onChange:O},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n),A().createElement("div",{className:"cds--date-picker-container"},(null!=p?p:u)&&A().createElement(rj,{className:$()("cds--label",{"cds--label--disabled":l})},null!=p?p:u),A().createElement(iv,{className:sj.inputGroup},A().createElement("div",{className:sj.inputsWrapper},A().createElement(rv,{className:$()("cds--date-picker-input__wrapper",sj.startInput,sj.dateInputWrapper),slot:"start"},function(e){return A().createElement(sD,{className:sj.inputSegment,segment:e})}),A().createElement("div",{className:sj.separator},A().createElement("span",{"aria-hidden":"true","data-readonly":!0},"–")),A().createElement(rv,{className:$()("cds--date-picker-input__wrapper",sj.endInput,sj.dateInputWrapper),slot:"end"},function(e){return A().createElement(sD,{className:sj.inputSegment,segment:e})})),A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd)},A().createElement(sL,null))),T&&s&&A().createElement(rz,{className:sj.invalidText},s),A().createElement(ah,{className:sj.popover,placement:"bottom start",offset:1,isNonModal:!0},A().createElement(sP,{isRangePicker:!0},A().createElement(ip,{minValue:z,maxValue:P,className:"cds--date-picker__calendar"},A().createElement("header",{className:sj.header},A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd),slot:"previous"},A().createElement(aK,{size:16})),A().createElement(sh,{className:sj.monthYear}),A().createElement(nf,{className:$()(sj.flatButton,sj.flatButtonMd),slot:"next"},A().createElement(aY,{size:16}))),A().createElement(im,{className:sj.calendarGrid},function(e){return A().createElement(iy,{key:e.toString(),className:$()("cds--date-picker__day",sV({},sj.today,0===M.compare(e))),date:e})})))))))))}),sG=n(70438),sU=function(e){var t=e.diagnoses,n=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).diagnosisTags;return A().createElement(A().Fragment,null,t.map(function(e){var t=e.rank,i=e.uuid,r=e.display,a=n[1===t?"primaryColor":"secondaryColor"];return A().createElement(sG.Tag,{key:i,type:a},r)}))},sq=n(61836),sW=n(30949),sK={};sK.styleTagTransform=F(),sK.setAttributes=P(),sK.insert=B().bind(null,"head"),sK.domAPI=D(),sK.insertStyleElement=M(),C()(sW.A,sK);let sY=sW.A&&sW.A.locals?sW.A.locals:void 0;var sJ=function(e){var t,n,i=e.error,r=e.headerTitle,a="tablet"===(0,k.qv)();return A().createElement(sG.Layer,null,A().createElement(sG.Tile,{className:sY.tile},A().createElement("div",{className:a?sY.tabletHeading:sY.desktopHeading},A().createElement("h4",null,r)),A().createElement("p",{className:sY.errorMessage},(0,sq.V)("error","Error")," ","".concat(null==i||null==(t=i.response)?void 0:t.status,": "),null==i||null==(n=i.response)?void 0:n.statusText),A().createElement("p",{className:sY.errorCopy},(0,sq.V)("errorCopy"))))},sZ=n(81369),sX={};sX.styleTagTransform=F(),sX.setAttributes=P(),sX.insert=B().bind(null,"head"),sX.domAPI=D(),sX.insertStyleElement=M(),C()(sZ.A,sX);let sQ=sZ.A&&sZ.A.locals?sZ.A.locals:void 0;var s0=A().forwardRef(function(e,t){var n,i=(0,k.TA)(),r=i.slotName,a=i.basePath,o=i.componentContext,s=null!=(n=window.location)?n:{pathname:""},l=(0,k.CX)(null!=r?r:"");return e.isChildOfHeader&&r&&l.length>0?A().createElement(sG.SideNav,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({ref:t,expanded:!0,"aria-label":"Left navigation",className:sQ.leftNav},e),A().createElement(k.W3,{name:"global-nav-menu-slot"}),r?A().createElement(k.fS,{value:o,fallback:A().createElement(k.W3,{name:r,state:{basePath:a,currentPath:s}})},A().createElement(k.zq.Provider,{value:o},A().createElement(k.W3,{name:r,state:{basePath:a,currentPath:s}}))):null):A().createElement(A().Fragment,null)}),s1=n(44924),s2=n(82910),s3=n(70937),s4=n(60482),s5=function(e){var t=e.notification,n=t.description,i=t.action,r=t.kind,a=t.critical,o=t.title,s=t.onAction;return A().createElement(sG.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",inline:!0,onActionButtonClick:s})};function s6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function s7(e,t){if(e){if("string"==typeof e)return s6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s6(e,t)}}let s8=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||s7(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return s6(e)})(n=t.filter(function(t){return t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||s7(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(s5,{key:e.id,notification:e})}))};function s9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var le=function(e){var t,n=e.notification,i=n.actionButtonLabel,r=n.onActionButtonClick,a=void 0===r?function(){}:r,o=n.subtitle,s=n.kind,l=n.title,c=n.critical,u=n.progressActionLabel,p=(n.id,function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,["actionButtonLabel","onActionButtonClick","subtitle","kind","title","critical","progressActionLabel","id"])),d=(t=(0,v.useState)(i),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return s9(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s9(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=d[0],m=d[1];return A().createElement(sG.ActionableNotification,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({kind:s||"info",actionButtonLabel:f,ariaLabel:"Closes actionable notification",onActionButtonClick:function(){a(),u&&m(u)},statusIconDescription:"Actionable notification",subtitle:o,title:l,lowContrast:c,inline:!0},p))};function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ln(e,t){if(e){if("string"==typeof e)return lt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lt(e,t)}}let li=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||ln(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return lt(e)})(n=t.filter(function(t){return t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||ln(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(le,{key:e.id,notification:e})}))};var lr=n(62926),la=n(55492),lo=n(17820),ls=n(36820),ll=n(55259),lc=n(75323),lu=n(24956),lp=n(43148),ld=Object.prototype.hasOwnProperty;let lf=function(e){if(null==e)return!0;if((0,ll.A)(e)&&((0,ls.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,lc.A)(e)||(0,lp.A)(e)||(0,lo.A)(e)))return!e.length;var t=(0,la.A)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,lu.A)(e))return!(0,lr.A)(e).length;for(var n in e)if(ld.call(e,n))return!1;return!0};var lm=n(25873);function lh(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function l_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function lg(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ly(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var lb=new s4.B7,lv=0,lA=new s4.B7,lw=0;function l$(e){e&&(0,lm.createRoot)(e).render(A().createElement(s8,{subject:lb}))}function lk(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:(void 0===t?"undefined":ly(t))==="object"&&(lh(t,Error)||!lf(t)))?(lh(e.description,Error)&&(e.description=e.description.toLocaleString()),setTimeout(function(){lb.next(lg(l_({},e),{id:lv++}))},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function lx(e){e&&(0,lm.createRoot)(e).render(A().createElement(li,{subject:lA}))}function lC(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:(void 0===t?"undefined":ly(t))==="object"&&!lf(t))?setTimeout(function(){lA.next(lg(l_({},e),{id:lw++}))},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}var lE=n(8569),lD={};lD.styleTagTransform=F(),lD.setAttributes=P(),lD.insert=B().bind(null,"head"),lD.domAPI=D(),lD.insertStyleElement=M(),C()(lE.A,lD);let lS=lE.A&&lE.A.locals?lE.A.locals:void 0;function lB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function lz(e,t){if(e){if("string"==typeof e)return lB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lB(e,t)}}var lP=function(e){var t,n,i,r,a,o,s=e.selectedLocationUuid,l=e.defaultLocationUuid,c=e.locationTag,u=e.locationsPerRequest,p=void 0===u?50:u,d=e.onChange,f=(0,V.useTranslation)().t,m=(t=(0,v.useState)(""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||lz(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=m[0],g=m[1],y=(n=l?"/ws/fhir2/R4/Location?_id=".concat(l):null,r=(i=(0,s1.A)(n,s3.lo,{shouldRetryOnError:function(e){var t;return null!=e&&null!=(t=e.response)&&!!t.status&&e.response.status>=500}})).data,a=i.error,o=i.isLoading,(0,v.useMemo)(function(){var e;return{location:(null==r||null==(e=r.data)?void 0:e.entry)?r.data.entry[0]:null,error:n?a:null,isLoading:!!n&&o}},[r,o,a,n])).location,b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=(0,V.useTranslation)().t,r=(0,k.d7)(n),a=(0,s2.Ay)(function(n,i){if(i){var a,o,s=null==(o=i.data)||null==(a=o.link)?void 0:a.find(function(e){return"next"===e.relation});if(!s)return null;var l=new URL(s.url);return l.origin===window.location.origin?s.url:new URL("".concat(l.pathname).concat(l.search?"?".concat(l.search):""),window.location.origin).toString()}var c="".concat(s3.IU,"/Location?"),u=new URLSearchParams;return u.append("_summary","data"),t&&u.append("_count",""+t),n&&u.append("_getpagesoffset",""+n*t),e&&u.append("_tag",e),"string"==typeof r&&""!=r&&u.append("name:contains",r),c+u.toString()},s3.lo),o=a.data,s=a.isLoading,l=a.isValidating,c=a.setSize,u=a.error;return u&&lk({title:i("errorLoadingLoginLocations","Error loading login locations"),kind:"error",critical:!0,description:null==u?void 0:u.message}),(0,v.useMemo)(function(){var e,t,n,i,r;return{locations:(null==o?void 0:o.length)?null==o?void 0:o.flatMap(function(e){var t,n;return null!=(n=null==e||null==(t=e.data)?void 0:t.entry)?n:[]}):[],isLoading:s,totalResults:null==o||null==(t=o[0])||null==(e=t.data)?void 0:e.total,hasMore:null!=o&&!!o.length&&(null==o||null==(r=o[o.length-1])||null==(i=r.data)||null==(n=i.link)?void 0:n.some(function(e){return"next"===e.relation})),loadingNewData:l,setPage:c}},[s,o,l,c])}(c,p,h),w=b.locations,$=b.isLoading,x=b.hasMore,C=b.loadingNewData,E=b.setPage,D=(0,v.useMemo)(function(){if(y&&!h){var e;return[y].concat(function(e){if(Array.isArray(e))return lB(e)}(e=null==w?void 0:w.filter(function(e){return e.resource.id!==l}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lz(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return w},[y,w]),S=function(e){d(),g(e)},B=(0,v.useCallback)(function(){C||!x||E(function(e){return e+1})},[C,x,E]),z=(0,U.useOnVisible)(B),P=x?D.length-p/2:-1;return A().createElement("div",null,A().createElement(sG.Search,{labelText:f("searchForLocation","Search for a location"),id:"search-1",placeholder:f("searchForLocation","Search for a location"),onChange:function(e){return S(e.target.value)},size:"lg"}),A().createElement("div",{className:lS.searchResults},$?A().createElement("div",{className:lS.loadingContainer},A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"}),A().createElement(sG.RadioButtonSkeleton,{className:lS.radioButtonSkeleton,role:"progressbar"})):A().createElement(A().Fragment,null,A().createElement("div",{className:lS.locationResultsContainer},(null==D?void 0:D.length)>0?A().createElement(sG.RadioButtonGroup,{name:"loginLocations",onChange:function(e){d(null==e?void 0:e.toString())},orientation:"vertical",valueSelected:s},D.map(function(e,t){return A().createElement(sG.RadioButton,{className:lS.locationRadioButton,key:e.resource.id,id:e.resource.id,name:e.resource.name,labelText:A().createElement("span",{ref:t==P?z:null},e.resource.name),value:e.resource.id})})):A().createElement("div",{className:lS.emptyState},A().createElement("p",{className:lS.locationNotFound},f("noResultsToDisplay","No results to display")))),C&&A().createElement("div",{className:lS.loadingIcon},A().createElement(sG.InlineLoading,{description:f("loading","Loading")})))))},lT=n(22956),lM=n(467),lO=n(11621),lF=n(64201);function lI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function lN(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(i,r)}function lj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function lR(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function lL(e,t){if(e){if("string"==typeof e)return lI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lI(e,t)}}var lV=(0,lM.Zd)("modalState",{modalContainer:null,modalStack:[]}),lH=0,lG=window.getComputedStyle(document.body).overflow;function lU(e){var t=e.modalStack,n=e.modalContainer;n&&(t.length?(n.style.visibility||(addEventListener("keydown",lW),document.body.style.overflow="hidden",n.style.visibility="unset"),t.forEach(function(e,i){switch(e.state){case"NEW":var r,a,o,s,l,c,u,p=(r=({size:null!=(u=null==(c=e.props)?void 0:c.size)?u:"md"}).size,(a=document.createElement("div")).className="cds--modal-container cds--modal-container--".concat(r),a.setAttribute("role","dialog"),a.setAttribute("tabindex","-1"),a.setAttribute("aria-modal","true"),a);e.container=p,(function(e,t){var n;return(n=function(e,t){var n,i,r,a,o,s=arguments;return function(e,t){var n,i,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&c[0]?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,i=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],i=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:if(n=s.length>2&&void 0!==s[2]?s[2]:{},i=(0,lO.Fg)(t),r=null,!e)return[3,2];if(!i)throw Error("No modal named '".concat(t,"' has been registered."));return[4,(0,i.load)()];case 1:return a=l.sent(),o=lH++,r=(0,lT.xL)(lR(lj({},a),{name:"".concat(t,"-").concat(o)}),lR(lj({},n),{domElement:e})),[3,3];case 2:(0,lF.N)("Failed to launch modal. Please notify your administrator. Modal name: ".concat(t)),l.label=3;case 3:return[2,r]}})},function(){var e=this,t=arguments;return new Promise(function(i,r){var a=n.apply(e,t);function o(e){lN(a,i,r,o,s,"next",e)}function s(e){lN(a,i,r,o,s,"throw",e)}o(void 0)})}).apply(this,arguments)})(p,e.modalName,e.props).then(function(t){e.parcel=t,e.state="MOUNTED",n.prepend(p),p.style.visibility="unset"});break;case"MOUNTED":e.container&&(e.container.style.visibility=i?"hidden":"unset");break;case"TO_BE_DELETED":e.onClose(),null==(s=e.parcel)||null==(o=s.unmount)||o.call(s),null==(l=e.container)||l.remove(),setTimeout(function(){lV.setState({modalContainer:n,modalStack:t.filter(function(t){return t!==e})})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=lG,removeEventListener("keydown",lW)))}function lq(e){var t=lV.getState(),n=t.modalStack.map(function(t){return t===e?lR(lj({},t),{state:"TO_BE_DELETED"}):t});lV.setState(lR(lj({},t),{modalStack:n}))}function lW(e){var t,n;"Escape"===e.key&&(n=(t=lV.getState().modalStack,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,1)||lL(t,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0])&&lq(n)}function lK(e){lV.subscribe(lU),lV.setState(lR(lj({},lV.getState()),{modalContainer:e}))}function lY(e){var t,n,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=function(){var e=lV.getState().modalStack.find(function(e){return e.onClose===a});e&&lq(e)};return(0,lO.Fg)(e)?(i=[{state:"NEW",onClose:a,modalName:e,props:lj({close:o},r)}].concat(function(e){if(Array.isArray(e))return lI(e)}(n=(t=lV.getState()).modalStack)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||lL(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),lV.setState(lR(lj({},t),{modalStack:i}))):(0,lF.N)('Failed to launch modal. Please notify your administrator. Modal name: "'.concat(e,'"')),o}var lJ=n(91673),lZ={};lZ.styleTagTransform=F(),lZ.setAttributes=P(),lZ.insert=B().bind(null,"head"),lZ.domAPI=D(),lZ.insertStyleElement=M(),C()(lJ.A,lZ);let lX=lJ.A&&lJ.A.locals?lJ.A.locals:void 0;function lQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function l0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function l1(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l2=function(e){if("children"in e){var t=e.children,n=e.className,i=l1(e,["children","className"]);return A().createElement("div",l0({className:$()(lX.pageHeader,n)},i),t)}var r=e.title,a=e.illustration,o=e.className,s=l1(e,["title","illustration","className"]);return A().createElement("div",l0({className:$()(lX.pageHeader,o)},s),A().createElement(l3,{title:r,illustration:a}))},l3=function(e){var t,n=e.title,i=e.illustration,r=e.className,a=(t=(0,v.useState)(null),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return lQ(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lQ(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],s=a[1];return(0,v.useEffect)(function(){(0,h.zj)("@openmrs/esm-styleguide").then(function(e){s(e)})},[]),A().createElement("div",{className:$()(lX.pageHeaderContent,r)},i,A().createElement("div",{className:lX.pageLabels},(null==o?void 0:o.implementationName)&&A().createElement("p",null,(0,sq.V)(o.implementationName)),A().createElement("p",{className:lX.pageName},n)))},l4=n(67943),l5=n(40785),l6=n(48391),l7={};l7.styleTagTransform=F(),l7.setAttributes=P(),l7.insert=B().bind(null,"head"),l7.domAPI=D(),l7.insertStyleElement=M(),C()(l6.A,l7);let l8=l6.A&&l6.A.locals?l6.A.locals:void 0;function l9(e){var t=e.showIdentifierLabel,n=e.type,i=e.value;return A().createElement("span",{className:l8.primaryIdentifier},A().createElement(sG.Tag,{className:l8.tag,type:"gray"},t&&(null==n?void 0:n.text)&&A().createElement("span",{className:l8.label},n.text,": "),A().createElement("span",{className:l8.value},i)))}function ce(e){var t=e.showIdentifierLabel,n=e.type,i=e.value;return A().createElement(sG.FormLabel,{className:l8.secondaryIdentifier,id:"patient-banner-identifier-".concat(i)},t&&A().createElement("span",{className:l8.label},null==n?void 0:n.text,": "),A().createElement("span",{className:l8.value},i))}function ct(e){var t,n=e.identifiers,i=e.showIdentifierLabel,r=(0,k.UK)().excludePatientIdentifierCodeTypes,a=(0,k.wJ)().primaryIdentifierCode,o=null!=(t=null==n?void 0:n.filter(function(e){var t,n,i,a=null==(i=e.type)||null==(n=i.coding)||null==(t=n[0])?void 0:t.code;return a&&!(null==r?void 0:r.uuids.includes(a))}))?t:[];return A().createElement(A().Fragment,null,(null==o?void 0:o.length)?o.map(function(e,t){var n,r,s=e.value,l=e.type;return A().createElement(A().Fragment,{key:s},A().createElement("span",{className:l8.identifier},(null==l||null==(r=l.coding)||null==(n=r[0])?void 0:n.code)===a?A().createElement(l9,{showIdentifierLabel:i,type:l,value:s}):A().createElement(ce,{showIdentifierLabel:i,type:l,value:s})),t<o.length-1&&A().createElement("span",{className:l8.separator},"\xb7"))}):"")}var cn={Female:a7,Male:a8,Other:a9,Unknown:oe},ci=function(e){var t=cn[e.gender];return t?A().createElement(t,{fill:"#525252"}):null},cr={male:"Male",female:"Female",other:"Other",unknown:"Unknown"},ca=function(e){var t,n=e.toLowerCase(),i=null!=(t=cr[n])?t:"Unknown";return{displayText:(0,sq.V)(n,e),iconKey:i}};function co(e){var t=e.patient,n=e.renderedFrom,i=(0,l4.Vp)(t),r=(null==t?void 0:t.gender)&&ca(t.gender),a=(0,v.useMemo)(function(){return{patientUuid:t.id,patient:t,renderedFrom:n}},[t.id,t,n]);return A().createElement("div",{className:l8.patientInfo},A().createElement("div",{className:$()(l8.row,l8.patientNameRow)},A().createElement("div",{className:l8.flexRow},A().createElement("span",{className:l8.patientName},i),r&&A().createElement("div",{className:l8.gender},A().createElement(ci,{gender:r.iconKey}),A().createElement("span",null,r.displayText)),A().createElement(k.W3,{className:l8.tagsSlot,name:"patient-banner-tags-slot",state:a}))),A().createElement("div",{className:l8.demographics},t.birthDate&&A().createElement(A().Fragment,null,A().createElement("span",null,(0,l5.K)(t.birthDate)),A().createElement("span",{className:l8.separator},"\xb7"),A().createElement("span",null,(0,aC.LW)(t.birthDate,{time:!1})),A().createElement("span",{className:l8.separator},"\xb7")),A().createElement(ct,{identifiers:t.identifier,showIdentifierLabel:!0}),A().createElement(k.W3,{className:l8.extensionSlot,name:"patient-banner-bottom-slot",state:a})))}var cs=n(18282),cl=n(33539),cc={};cc.styleTagTransform=F(),cc.setAttributes=P(),cc.insert=B().bind(null,"head"),cc.domAPI=D(),cc.insertStyleElement=M(),C()(cl.A,cc);let cu=cl.A&&cl.A.locals?cl.A.locals:void 0;function cp(e){var t=e.patient,n=e.patientUuid,i=e.actionsSlotName,r=e.additionalActionsSlotState,a=(0,k.br)(i).extensions,o=(0,v.useMemo)(function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({patientUuid:n,patient:t},r)},[n,r]);return A().createElement(A().Fragment,null,a.length>0?A().createElement("div",{className:cu.overflowMenuContainer},A().createElement(L,{menuTitle:A().createElement(A().Fragment,null,A().createElement("span",{className:cu.actionsButtonText},(0,sq.V)("actions","Actions"))," ",A().createElement(cs.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}}))},A().createElement(k.W3,{name:"patient-actions-slot",key:"patient-actions-slot",state:o}))):null)}var cd=function(e){var t=e.toast,n=e.closeToast,i=t.description,r=t.kind,a=t.critical,o=t.title,s=t.actionButtonLabel,l=t.onActionButtonClick,c=void 0===l?function(){}:l,u=(0,v.useCallback)(function(){c(),n()},[n,c]);return A().createElement("div",null,A().createElement(sG.ActionableNotification,{actionButtonLabel:s,kind:r||"info",lowContrast:a,subtitle:i,title:o||"",onActionButtonClick:u,onClose:n}))};function cf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function cm(e,t){if(e){if("string"==typeof e)return cf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cf(e,t)}}let ch=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||cm(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1],o=(0,v.useCallback)(function(e){a(function(t){return t.filter(function(t){return t!==e})})},[]);return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return cf(e)})(n=t.filter(function(t){return t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||cm(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(cd,{key:e.id,toast:e,closeToast:function(){return o(e)}})}))};var c_=new s4.B7,cg=0;function cy(e){e&&(0,lm.createRoot)(e).render(A().createElement(ch,{subject:c_}))}function cb(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:(void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"&&!lf(t))?setTimeout(function(){var t,n;c_.next((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},e),n=n={id:cg++},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}var cv=n(17744);function cA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function cw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function c$(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ck(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return!0;var n=cS[e];return!n||!n()}function cx(e,t){var n,i=null==(n=cI.getState())?void 0:n.workspaceGroup,r=null==i?void 0:i.name;r&&e===r&&cL(function(){var n=cq(e);n&&(n.setState({},!0),n.subscribe(function(){})()),"function"==typeof(null==i?void 0:i.cleanup)&&i.cleanup(),cI.setState(function(e){return c$(cw({},e),{workspaceGroup:void 0})}),"function"==typeof t&&t()},r?function(e){return e.currentWorkspaceGroup===r}:function(){return!0})}function cC(e,t){var n,i=t.name,r=t.additionalProps;(0,lO.Xb)(i);var a=function(){cM(e.name,{ignoreChanges:!0,onWorkspaceClose:function(){return cE(i,r)},closeWorkspaceGroup:!1})};ck(e.name)?a():cH("closing-workspace-launching-new-workspace",a,null!=(n=e.title)?n:e.name)}function cE(e,t){var n,i,r=(0,lO.Xb)(e),a=cI.getState().workspaceGroup;if(a&&!(null==(n=a.members)?void 0:n.includes(e)))return void cx(a.name,function(){cE(e,t)});var o=null==(i=cI.getState().workspaceGroup)?void 0:i.name,s=c$(cw({},r),{title:cG(r,t),closeWorkspace:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return cM(e,t)},closeWorkspaceWithSavedChanges:function(t){return cM(e,cw({ignoreChanges:!0},t))},promptBeforeClosing:function(t){var n,i;return n=e,i=t,void(cS[n]=i)},setTitle:function(t,n){s.title=t,s.titleNode=n,cI.setState(function(t){var n=t.openWorkspaces.map(function(t){return t.name===e?s:t});return c$(cw({},t),{openWorkspaces:n})})},currentWorkspaceGroup:o,additionalProps:null!=t?t:{}});function l(e,t){cI.setState(function(n){var i,r=[e].concat(function(e){if(Array.isArray(e))return cA(e)}(i=null!=t?t:n.openWorkspaces)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return cA(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cA(e,t)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=cR(e);return c$(cw({},n),{openWorkspaces:r,workspaceWindowState:a})})}o&&cq(o,t);var c=cI.getState().openWorkspaces,u=c.findIndex(function(t){return t.name===e}),p=c.find(function(e){return e.type==s.type});if(0===c.length)l(s);else if(c[0].canHide||0===u)if(u>=0){var d=c[u];d.title===cG(d,d.additionalProps)&&(d.title=cG(s,s.additionalProps)),d.additionalProps=s.additionalProps;var f=c.filter(function(t){return t.name!=e});l(c[u],f)}else p?(l(p,cI.getState().openWorkspaces.filter(function(e){return e.type!=s.type})),cC(p,{name:e,additionalProps:t})):l(s);else cC(c[0],{name:e,additionalProps:t})}function cD(e){var t=e.targetUrl,n=e.contextKey,i=e.workspaceName,r=e.additionalProps;cO(n),cE(i,r),(0,cv.oo)({to:t})}var cS={};function cB(e,t){cS[e]=t}function cz(e){return cS[e]}function cP(){var e=cI.getState();cI.setState(c$(cw({},e),{prompt:null}))}var cT={ignoreChanges:!1,onWorkspaceClose:function(){},closeWorkspaceGroup:!0};function cM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=cw({},cT,n);var i=function(){var t,i,r=cI.getState();r.openWorkspaces.find(function(t){return t.name===e});var a=r.openWorkspaces.filter(function(t){return t.name!=e}),o=null==(t=cI.getState().workspaceGroup)?void 0:t.name;o&&n.closeWorkspaceGroup&&cx(o),cS[e]=function(){return!1},cI.setState(function(e){return c$(cw({},e),{prompt:null,openWorkspaces:a,workspaceWindowState:cR(null==a?void 0:a[0])})}),null==n||null==(i=n.onWorkspaceClose)||i.call(n)};return ck(e,null==n?void 0:n.ignoreChanges)?(i(),!0):(cH("closing-workspace",i,null!=(t=(0,lO.Xb)(e).title)?t:e),!1)}function cO(e){cI.getState().context!=e&&cI.setState({context:e,openWorkspaces:[],prompt:null})}var cF={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},cI=(0,lM.Zd)("workspace",cF);function cN(){return cI}function cj(e){var t=cI.getState();cI.setState(c$(cw({},t),{workspaceWindowState:e}))}function cR(e){var t;return null!=(t=null==e?void 0:e.preferredWindowSize)?t:"normal"}function cL(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=cI.getState().openWorkspaces.filter(t).every(function(e){return ck(e.name)}),i=function(){cU(),null==e||e()};n?i():cH("closing-all-workspaces",i)}function cV(){var e=(0,k.Pj)(cI),t=e.workspaceWindowState,n=e.openWorkspaces,i=e.prompt,r=e.workspaceGroup;return(0,v.useMemo)(function(){return{active:n.length>0,prompt:i,workspaceWindowState:t,workspaces:n,workspaceGroup:r}},[n,t,i,r])}function cH(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";switch(e){case"closing-workspace":t={title:(0,sq.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,sq.V)("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:function(){null==n||n()},confirmText:(0,sq.V)("discard","Discard")};break;case"closing-all-workspaces":var r=cI.getState().openWorkspaces.filter(function(e){return!ck(e.name)}).map(function(e,t){var n=e.title;return"".concat(t+1,". ").concat(n)});t={title:(0,sq.V)("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:(0,sq.V)("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:r.join(",")}),onConfirm:function(){null==n||n()},confirmText:(0,sq.V)("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:r.length})};break;case"closing-workspace-launching-new-workspace":t={title:(0,sq.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,sq.V)("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:i}),onConfirm:function(){cI.setState(function(e){return c$(cw({},e),{prompt:null})}),null==n||n()},confirmText:(0,sq.V)("openAnyway","Open anyway")};break;default:console.error('Workspace system trying to open unknown prompt type "'.concat(e,'" in function "showWorkspacePrompts"')),null==n||n();return}cI.setState(function(e){return c$(cw({},e),{prompt:t})})}function cG(e,t){var n;return null!=(n=null==t?void 0:t.workspaceTitle)?n:e.title}function cU(){cI.setState(cF)}function cq(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&"default"!==e){var n=(0,lM.jf)(e,{});return t&&n.setState(function(e){return cw({},e,t)}),n}}var cW=n(33794),cK={};cK.styleTagTransform=F(),cK.setAttributes=P(),cK.insert=B().bind(null,"head"),cK.domAPI=D(),cK.insertStyleElement=M(),C()(cW.A,cK);let cY=cW.A&&cW.A.locals?cW.A.locals:void 0;function cJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cZ(e){var t=e.getIcon,n=e.formOpenInTheBackground,i=e.tagContent;return A().createElement(A().Fragment,null,t({size:16}),n?A().createElement("span",{className:cY.interruptedTag},"!"):A().createElement("span",{className:cY.countTag},i))}var cX=function(e){var t,n=e.getIcon,i=e.label,r=e.iconDescription,a=e.handler,o=e.type,s=e.tagContent,l=(0,k.qv)(),c=cV(),u=c.workspaces,p=c.workspaceWindowState,d=null!=(t=null==u?void 0:u.findIndex(function(e){return e.type===o}))?t:-1,f="hidden"!==p&&0===d,m=d>0||0===d&&"hidden"===p;return"tablet"===l||"phone"===l?A().createElement(sG.Button,{className:$()(cY.container,cJ({},cY.active,f)),iconDescription:r,kind:"ghost",onClick:a,role:"button",tabIndex:0,size:"md"},A().createElement("span",{className:cY.elementContainer},A().createElement(cZ,{formOpenInTheBackground:m,getIcon:n,tagContent:s})),A().createElement("span",null,i)):A().createElement(sG.IconButton,{align:"left","aria-label":r,className:$()(cY.container,cJ({},cY.active,f)),enterDelayMs:300,kind:"ghost",label:i,onClick:a,size:"md"},A().createElement("div",{className:cY.elementContainer},A().createElement(cZ,{formOpenInTheBackground:m,getIcon:n,tagContent:s})))},cQ=n(54240),c0=n(68622),c1=n(1158),c2=/[\\^$.*+?()[\]{}|]/g,c3=RegExp(c2.source);let c4=function(e){return(e=(0,c1.A)(e))&&c3.test(e)?e.replace(c2,"\\$&"):e};var c5=n(72114),c6={};c6.styleTagTransform=F(),c6.setAttributes=P(),c6.insert=B().bind(null,"head"),c6.domAPI=D(),c6.insertStyleElement=M(),C()(c5.A,c6);let c7=c5.A&&c5.A.locals?c5.A.locals:void 0;function c8(e){var t,n,i=e.contextKey,r=(0,V.useTranslation)().t,a=cV().prompt;return(0,v.useEffect)(function(){new RegExp("/".concat(c4(i),"(/|$)")).test(window.location.pathname)||(0,lF.N)('WorkspaceContainer has provided an invalid context key: "'.concat(i,'". The context key must be part of the URL path, with no initial or trailing slash.'))},[]),(0,v.useEffect)(function(){return cO(i),function(){cO(null)}},[i]),(0,v.useEffect)(function(){var e=function(e){var t=e.detail,n=t.cancelNavigation,r=t.newUrl,a=new RegExp("/".concat(c4(i),"(/|$)")),o=new URL(r),s=a.test(o.pathname),l=cI.getState().openWorkspaces.every(function(e){return ck(e.name)});s||(l?cU():(null==n||n(),cL(function(){(0,cv.oo)({to:r})})))};return window.addEventListener("single-spa:before-routing-event",e),function(){window.removeEventListener("single-spa:before-routing-event",e)}},[]),null!=a?A().createElement(sG.ComposedModal,{open:!0,onClose:cP},A().createElement(sG.ModalHeader,{title:a.title}),A().createElement(sG.ModalBody,null,A().createElement("p",{className:c7.messageBody},a.body)),A().createElement(sG.ModalFooter,null,A().createElement(sG.Button,{kind:"secondary",onClick:cP},null!=(t=a.cancelText)?t:r("cancel","Cancel")),A().createElement(sG.Button,{kind:"danger",onClick:a.onConfirm},null!=(n=a.confirmText)?n:r("confirm","Confirm")))):null}var c9=n(6309);function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(t){ui(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ur(e){return(ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ua(e,t){return(ua=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uo(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var us=function(e){var t=v.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&ua(o,t);var n,i,r,a=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=ur(o);e=n?Reflect.construct(t,arguments,ur(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return uo(this)});function o(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),ui(uo(t=a.call(this,e)),"handleRef",function(e){t.el=e}),ui(uo(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),ui(uo(t),"getParcelProps",function(){var e=ut(ut({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return i=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,ut({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return c9.i&&c9.i.Consumer?v.createElement(c9.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=c9.i&&c9.i.Consumer?v.createElement(c9.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return v.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],un(o.prototype,i),r&&un(o,r),o}();ui(us,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var ul=n(1668),uc={};uc.styleTagTransform=F(),uc.setAttributes=P(),uc.insert=B().bind(null,"head"),uc.domAPI=D(),uc.insertStyleElement=M(),C()(ul.A,uc);let uu=ul.A&&ul.A.locals?ul.A.locals:void 0;function up(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return up(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return up(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function um(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function uh(e){var t,n,i,r,a,o,s,l,c=e.workspace,u=e.additionalPropsFromPage,p=(t=(0,v.useState)(),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return uf(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uf(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=p[0],f=p[1],m=(n=c.currentWorkspaceGroup,r=(i=ud((0,v.useState)({}),2))[0],a=i[1],s=(o=ud((0,v.useState)(n),2))[0],l=o[1],(0,v.useEffect)(function(){s!==n&&l(n)},[n]),(0,v.useEffect)(function(){var e,t=cq(s);return t&&(a(t.getState()),e=t.subscribe(a)),function(){t&&(null==e||e())}},[s]),r);(0,v.useEffect)(function(){var e=!0;return c.load().then(function(t){e&&f(t)}),function(){e=!1}},[c]);var h=(0,v.useMemo)(function(){return c&&um({closeWorkspace:c.closeWorkspace,closeWorkspaceWithSavedChanges:c.closeWorkspaceWithSavedChanges,promptBeforeClosing:c.promptBeforeClosing,setTitle:c.setTitle},u,m,c.additionalProps)},[c,u,m]);return d?A().createElement(us,um({key:c.name,config:d,mountParcel:lT.xL},h)):A().createElement(sG.InlineLoading,{className:uu.loader,description:"".concat((0,sq.V)("loading","Loading")," ...")})}var u_=n(43193),ug={};ug.styleTagTransform=F(),ug.setAttributes=P(),ug.insert=B().bind(null,"head"),ug.domAPI=D(),ug.insertStyleElement=M(),C()(u_.A,ug);let uy=u_.A&&u_.A.locals?u_.A.locals:void 0;function ub(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uA(e){var t,n,i=e.isWithinWorkspace,r=e.name,a=e.actionMenuProps,o=(t=(0,v.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return ub(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ub(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],l=o[1],c=(0,v.useRef)(window.innerHeight),u=(0,v.useContext)(k.zq).featureName,p=(0,k.qv)();return(0,v.useEffect)(function(){var e=function(){l(!(0,k.xl)(p)&&c.current>window.innerHeight),c.current!=window.innerHeight&&(c.current=window.innerHeight)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[c]),A().createElement("aside",{className:$()(uy.sideRail,(uv(n={},uy.withinWorkspace,i),uv(n,uy.sideRailHidden,s),uv(n,uy.sideRailVisible,!s),n))},A().createElement("div",{className:uy.container},A().createElement(k.W3,{className:uy.chartExtensions,name:"action-menu-".concat(r&&"default"!=r?r:u,"-items-slot"),state:void 0===a?{}:a})))}function uw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u$(e){var t,n,i,r=e.contextKey,a=e.overlay,o=e.showSiderailAndBottomNav,s=e.additionalWorkspaceProps,l=e.actionMenuProps,c=(0,k.qv)(),u=cV(),p=u.workspaces,d=u.workspaceWindowState,f=u.workspaceGroup,m=null==f?void 0:f.name,h=p[0],g="hidden"===d||null==h,y=null!=(t=null==h?void 0:h.width)?t:a?"wider":"narrow",b=(0,v.useMemo)(function(){return o||m&&!g},[m,g,o]);return(0,k.yJ)(!g&&!(0,k.xl)(c)),A().createElement(A().Fragment,null,A().createElement("div",{className:o?uu.workspaceContainerWithActionMenu:uu.workspaceContainerWithoutActionMenu},A().createElement("aside",{className:$()(a?uu.workspaceOverlayOuterContainer:uu.workspaceWindowSpacer,(uw(n={},uu.hiddenRelative,g),uw(n,uu.narrowWorkspace,"narrow"===y),uw(n,uu.widerWorkspace,"wider"===y),uw(n,uu.extraWideWorkspace,"extra-wide"===y),n))},A().createElement("div",{className:$()(uu.workspaceFixedContainer,(uw(i={},uu.maximizedWindow,"maximized"===d),uw(i,uu.hiddenFixed,g),i))},p.map(function(e,t){return A().createElement("div",{key:"workspace-container-".concat(e?e.name:"empty-".concat(t)),className:$()(uu.workspaceInnerContainer,uw({},uu.hiddenExtraWorkspace,0!==t))},A().createElement(v.Suspense,{fallback:null},A().createElement(V.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName},A().createElement(uk,{workspaceInstance:e,additionalWorkspaceProps:s}))))}))),A().createElement(c8,{contextKey:r})),b&&A().createElement(uA,{name:m,isWithinWorkspace:!o,actionMenuProps:l}))}function uk(e){var t,n=e.workspaceInstance,i=e.additionalWorkspaceProps,r=(0,V.useTranslation)().t,a=(0,k.qv)(),o=cV(),s=o.workspaceWindowState,l=o.workspaceGroup,c=null==l?void 0:l.name,u="maximized"===s;(0,v.useEffect)(function(){var e=r(n.title);e!==n.title&&n.setTitle(e)},[n.title,r,n.setTitle]);var p=(0,v.useContext)(k.zq).featureName,d=(0,v.useCallback)(function(){cj(u?"normal":"maximized")},[u]),f=(0,v.useMemo)(function(){return null!=n?n:{}},[n]),m=f.canHide,h=void 0!==m&&m,g=f.canMaximize,y=f.currentWorkspaceGroup,b=f.closeWorkspace,w=(0,v.useMemo)(function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){uw(e,t,n[t])})}return e}({},i,null==n?void 0:n.additionalProps)},[i,n]);return n&&A().createElement(A().Fragment,null,A().createElement(sG.Header,{"aria-label":(0,sq.V)("workspaceHeader","Workspace Header"),className:uu.header},!(0,k.xl)(a)&&!h&&A().createElement(sG.HeaderMenuButton,{"aria-label":(0,sq.V)("close","Close"),renderMenuIcon:A().createElement(aT,null),onClick:function(){return b()}}),A().createElement(sG.HeaderName,{prefix:""},null!=(t=n.titleNode)?t:r(n.title)),A().createElement("div",{className:uu.overlayHeaderSpacer}),A().createElement(sG.HeaderGlobalBar,{className:uu.headerButtons},A().createElement(k.W3,{name:"workspace-header-group-".concat(n.currentWorkspaceGroup,"-slot"),state:w}),A().createElement(k.W3,{name:"workspace-header-type-".concat(n.type,"-slot"),state:w}),A().createElement(k.W3,{name:"workspace-header-".concat(p,"-slot"),state:w}),(0,k.xl)(a)&&A().createElement(A().Fragment,null,(void 0!==g&&g||u)&&A().createElement(sG.HeaderGlobalAction,{"aria-label":u?(0,sq.V)("minimize","Minimize"):(0,sq.V)("maximize","Maximize"),onClick:d},u?A().createElement(cQ.Xj,null):A().createElement(cQ.hz,null)),h&&!c?A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("hide","Hide"),onClick:function(){return cj("hidden")}},A().createElement(aM,null)):A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("close","Close"),onClick:function(){return null==b?void 0:b()}},A().createElement(aQ,null))),"tablet"===a&&h&&A().createElement(sG.HeaderGlobalAction,{"aria-label":(0,sq.V)("close","Close"),onClick:function(){return null==b?void 0:b()}},A().createElement(c0.d3,null)))),A().createElement("div",{className:$()(uu.workspaceContent,uw({},uu.marginWorkspaceContent,!!(void 0===y?"":y)))},A().createElement(uh,{key:n.name,workspace:n,additionalPropsFromPage:i})))}var ux=n(94538),uC={};uC.styleTagTransform=F(),uC.setAttributes=P(),uC.insert=B().bind(null,"head"),uC.domAPI=D(),uC.insertStyleElement=M(),C()(ux.A,uC);let uE=ux.A&&ux.A.locals?ux.A.locals:void 0;function uD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uD(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var uz=function(e){var t,n=e.snackbar,i=e.closeSnackbar,r=n.actionButtonLabel,a=n.kind,o=void 0===a?"success":a,s=n.onActionButtonClick,l=void 0===s?function(){}:s,c=n.isLowContrast,u=n.progressActionLabel,p=n.subtitle,d=n.timeoutInMs,f=void 0===d?5e3:d,m=n.autoClose,h=void 0===m?"error"!==o:m,g=n.title,y=(n.id,function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,["actionButtonLabel","kind","onActionButtonClick","isLowContrast","progressActionLabel","subtitle","timeoutInMs","autoClose","title","id"])),b=uB((0,v.useState)(void 0===r?"":r),2),w=b[0],k=b[1],x=uB((0,v.useState)(!0),2),C=x[0],E=x[1],D=uB((0,v.useState)(!1),2),S=D[0],B=D[1],z=(0,v.useCallback)(function(){setTimeout(i,250)},[i]),P=(0,v.useCallback)(function(){B(!0),z()},[z]);return(0,v.useEffect)(function(){if(h){var e=setTimeout(P,f);return function(){return clearTimeout(e)}}},[f,h,P]),(0,v.useEffect)(function(){E(!1),window.setTimeout(function(){E(!0)},0)},[]),A().createElement(sG.ActionableNotification,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){uS(e,t,n[t])})}return e}({actionButtonLabel:w,"aria-label":"Close snackbar",className:$()(uE.slideIn,(uS(t={},uE.animated,C),uS(t,uE.slideOut,S),t)),inline:!0,kind:o,lowContrast:void 0===c?"error"!==o:c,onActionButtonClick:function(){l(),P(),u&&k(u)},onClose:z,statusIconDescription:"Snackbar notification",subtitle:void 0===p?"":p,title:g},y))};function uP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function uT(e,t){if(e){if("string"==typeof e)return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}let uM=function(e){var t,n=e.subject,i=(t=(0,v.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||uT(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1],o=(0,v.useCallback)(function(e){a(function(t){return t.filter(function(t){return t!==e})})},[]);return(0,v.useEffect)(function(){var e=n.subscribe(function(e){return a(function(t){var n;return((function(e){if(Array.isArray(e))return uP(e)})(n=t.filter(function(t){return t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||uT(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})});return function(){return e.unsubscribe()}},[n]),A().createElement(A().Fragment,null,r.map(function(e){return A().createElement(uz,{key:e.id,snackbar:e,closeSnackbar:function(){return o(e)}})}))};var uO=new s4.B7,uF=0;function uI(e){e&&(0,lm.createRoot)(e).render(A().createElement(uM,{subject:uO}))}function uN(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(function(){var t,n;uO.next((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},e),n=n={id:uF++},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}var uj=function(e){var t=e.children;return"tablet"===(0,k.qv)()?A().createElement(sG.Layer,null,t):A().createElement(A().Fragment,null,t)},uR=n(25391);let uL="failing",uV=function(){try{return"localStorage"in window&&window.localStorage}catch(e){return!1}}();class uH{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cachePrefix:t="react-avatar/",sourceTTL:n=6048e5,sourceSize:i=20}=e;this.cachePrefix=t,this.sourceTTL=n,this.sourceSize=i}set(e,t){if(uV){t=JSON.stringify(t);try{localStorage.setItem(this.cachePrefix+e,t)}catch(e){console.error(e)}}}get(e){if(!uV)return null;let t=localStorage.getItem(this.cachePrefix+e);return t?JSON.parse(t):null}sourceFailed(e){let t=this.get(uL)||[];return(t=t.filter(t=>{let n=t.expires>0&&t.expires<Date.now(),i=t===e||t.url==e;return!n&&!i})).unshift({url:e,expires:Date.now()+this.sourceTTL}),t=t.slice(0,this.sourceSize-1),this.set(uL,t)}hasSourceFailedBefore(e){return(this.get(uL)||[]).some(t=>{let n=t.expires>0&&t.expires<Date.now();return(t===e||t.url==e)&&!n})}}let uG=new uH;var uU=n(93442),uq=n(39067),uW=n.n(uq),uK=n(18946);let uY=n.n(uK)()(),uJ=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],uZ=/^([-+]?(?:\d+(?:\.\d+)?|\.\d+))([a-z]{2,4}|%)?$/;function uX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uJ;if(!e)return"transparent";let n=function(e,t){let n=[...e].map(e=>e.charCodeAt(0)),i=n.length,r=i%(t-1)+1,a=n.reduce((e,t)=>e+t)%t,o=n[0]%t;for(let e=0;e<i;e++)o=(r*o+a)%t;return o}(e,t.length);return t[n]}function uQ(e){e=""+e;let[,t=0,n="px"]=uZ.exec(e)||[];return{value:parseFloat(t),str:t+n,unit:n}}function u0(e){return e=isNaN((e=uQ(e)).value)?512:"px"===e.unit?e.value:512*(0!==e.value),uY&&(e*=2),e}function u1(e,t){let{maxInitials:n}=t;return e.split(/\s/).map(e=>e.substring(0,1).toUpperCase()).filter(e=>!!e).slice(0,n).join("").toUpperCase()}let u2={};function u3(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e of t){if(e||""===e)return e;if(!1===e||null===e)return null}}function u4(e){return!0===e?"100%":!1!==e?e:void 0}let u5={cache:uG,colors:uJ,initials:u1,avatarRedirectUrl:null},u6=Object.keys(u5),u7=A().createContext&&A().createContext(),u8=!u7,u9=u8?null:u7.Consumer,pe=A().forwardRef||(e=>e);class pt extends A().Component{_getContext(){let e={};return u6.forEach(t=>{void 0!==this.props[t]&&(e[t]=this.props[t])}),e}render(){let{children:e}=this.props;return u8?A().Children.only(e):A().createElement(u7.Provider,{value:this._getContext()},A().Children.only(e))}}(0,uU.A)(pt,"displayName","ConfigProvider"),(0,uU.A)(pt,"propTypes",{cache:uW().object,colors:uW().arrayOf(uW().string),initials:uW().func,avatarRedirectUrl:uW().string,children:uW().node});let pn=e=>{function t(t,n){if(u8){let i=n&&n.reactAvatar;return A().createElement(e,(0,uR.A)({},u5,i,t))}return A().createElement(u9,null,i=>A().createElement(e,(0,uR.A)({ref:n},u5,i,t)))}return t.contextTypes=pt.childContextTypes,pe(t)};u8&&(pt.childContextTypes={reactAvatar:uW().object},pt.prototype.getChildContext=function(){return{reactAvatar:this._getContext()}});class pi{constructor(){this.sourcePointer=0,this.active=!0,this.fetch=null}isActive(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.internal===this&&!!this.fetch&&!0===this.active}}class pr extends A().PureComponent{render(){let{className:e,unstyled:t,round:n,style:i,avatar:r,onClick:a,children:o}=this.props,{sourceName:s}=r,l=uQ(this.props.size),c=t?null:{display:"inline-block",verticalAlign:"middle",width:l.str,height:l.str,borderRadius:u4(n),fontFamily:"Helvetica, Arial, sans-serif",...i},u=[e,"sb-avatar"];if(s){let e=s.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"");u.push("sb-avatar--"+e)}return A().createElement("div",{className:u.join(" "),onClick:a,style:c},o)}}(0,uU.A)(pr,"propTypes",{className:uW().string,round:uW().oneOfType([uW().bool,uW().string]),style:uW().object,size:uW().oneOfType([uW().number,uW().string]),unstyled:uW().bool,avatar:uW().object,onClick:uW().func,children:uW().node});class pa extends A().PureComponent{render(){let{className:e,round:t,unstyled:n,alt:i,title:r,name:a,value:o,avatar:s}=this.props,l=uQ(this.props.size),c=n?null:{maxWidth:"100%",width:l.str,height:l.str,borderRadius:u4(t)};return A().createElement(pr,this.props,A().createElement("img",{className:e+" sb-avatar__image",width:l.str,height:l.str,style:c,src:s.src,alt:u3(i,a||o),title:u3(r,a||o),onError:s.onRenderFailed}))}}(0,uU.A)(pa,"propTypes",{alt:uW().oneOfType([uW().string,uW().bool]),title:uW().oneOfType([uW().string,uW().bool]),name:uW().string,value:uW().string,avatar:uW().object,className:uW().string,unstyled:uW().bool,round:uW().oneOfType([uW().bool,uW().string,uW().number]),size:uW().oneOfType([uW().number,uW().string])}),(0,uU.A)(pa,"defaultProps",{className:"",round:!1,size:100,unstyled:!1});class po extends A().PureComponent{constructor(){var e;super(...arguments),e=this,(0,uU.A)(this,"_scaleTextNode",function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,{unstyled:i,textSizeRatio:r,textMarginRatio:a,avatar:o}=e.props;if(e._node=t,!t||!t.parentNode||i||o.src||!e._mounted)return;let s=t.parentNode,l=s.parentNode,{width:c,height:u}=s.getBoundingClientRect();if(0==c&&0==u){let i=Math.min(1.5*n,500);!function(e,t){if(u2[t])return u2[t].push(e);let n=u2[t]=[e];setTimeout(()=>{delete u2[t],n.forEach(e=>e())},t)}(()=>e._scaleTextNode(t,i),i);return}l.style.fontSize||(l.style.fontSize="".concat(u/r,"px")),s.style.fontSize=null;let{width:p}=t.getBoundingClientRect();if(p<0)return;let d=c*(1-2*a);p>d&&(s.style.fontSize="calc(1em * ".concat(d/p,")"))})}componentDidMount(){this._mounted=!0,this._scaleTextNode(this._node)}componentWillUnmount(){this._mounted=!1}render(){let{className:e,round:t,unstyled:n,title:i,name:r,value:a,avatar:o}=this.props,s=uQ(this.props.size),l=n?null:{width:s.str,height:s.str,lineHeight:"initial",textAlign:"center",color:this.props.fgColor,background:o.color,borderRadius:u4(t)},c=[o.value,this.props.size].join("");return A().createElement(pr,this.props,A().createElement("div",{className:e+" sb-avatar__text",style:l,title:u3(i,r||a)},A().createElement("div",{style:n?null:{display:"table",tableLayout:"fixed",width:"100%",height:"100%"}},A().createElement("span",{style:n?null:{display:"table-cell",verticalAlign:"middle",fontSize:"100%",whiteSpace:"nowrap"}},A().createElement("span",{ref:this._scaleTextNode,key:c},o.value)))))}}(0,uU.A)(po,"propTypes",{name:uW().string,value:uW().string,avatar:uW().object,title:uW().oneOfType([uW().string,uW().bool]),className:uW().string,unstyled:uW().bool,fgColor:uW().string,textSizeRatio:uW().number,textMarginRatio:uW().number,round:uW().oneOfType([uW().bool,uW().string,uW().number]),size:uW().oneOfType([uW().number,uW().string])}),(0,uU.A)(po,"defaultProps",{className:"",fgColor:"#FFF",round:!1,size:100,textSizeRatio:3,textMarginRatio:.15,unstyled:!1});var ps=n(89150),pl=n.n(ps);class pc{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.email||!!this.props.md5Email),(0,uU.A)(this,"get",e=>{let{props:t}=this,n=t.md5Email||pl()(t.email),i=u0(t.size),r="https://secure.gravatar.com/avatar/".concat(n,"?d=404");i&&(r+="&s=".concat(i)),e({sourceName:"gravatar",src:r})}),this.props=e}}(0,uU.A)(pc,"propTypes",{email:uW().string,md5Email:uW().string});class pu{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.facebookId),(0,uU.A)(this,"get",e=>{let{facebookId:t}=this.props,n=u0(this.props.size),i="https://graph.facebook.com/".concat(t,"/picture");n&&(i+="?width=".concat(n,"&height=").concat(n)),e({sourceName:"facebook",src:i})}),this.props=e}}(0,uU.A)(pu,"propTypes",{facebookId:uW().string});class pp{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.githubHandle),(0,uU.A)(this,"get",e=>{let{githubHandle:t}=this.props,n=u0(this.props.size),i="https://avatars.githubusercontent.com/".concat(t,"?v=4");n&&(i+="&s=".concat(n)),e({sourceName:"github",src:i})}),this.props=e}}(0,uU.A)(pp,"propTypes",{githubHandle:uW().string});class pd{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.skypeId),(0,uU.A)(this,"get",e=>{let{skypeId:t}=this.props;e({sourceName:"skype",src:"https://api.skype.com/users/".concat(t,"/profile/avatar")})}),this.props=e}}(0,uU.A)(pd,"propTypes",{skypeId:uW().string});class pf{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!(this.props.name||this.props.value||this.props.email)),(0,uU.A)(this,"get",e=>{let t=this.getValue();if(!t)return e(null);e({sourceName:"text",value:t,color:this.getColor()})}),this.props=e}getInitials(){let{name:e,initials:t}=this.props;return"string"==typeof t?t:"function"==typeof t?t(e,this.props):u1(e,this.props)}getValue(){return this.props.name?this.getInitials():this.props.value?this.props.value:null}getColor(){let{color:e,colors:t,name:n,email:i,value:r}=this.props;return e||uX(n||i||r,t)}}(0,uU.A)(pf,"propTypes",{color:uW().string,name:uW().string,value:uW().string,email:uW().string,maxInitials:uW().number,initials:uW().oneOfType([uW().string,uW().func])});class pm{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.src),(0,uU.A)(this,"get",e=>{e({sourceName:"src",src:this.props.src})}),this.props=e}}(0,uU.A)(pm,"propTypes",{src:uW().string});class ph{constructor(e){(0,uU.A)(this,"props",null),(0,uU.A)(this,"icon","✷"),(0,uU.A)(this,"isCompatible",()=>!0),(0,uU.A)(this,"get",e=>{let{color:t,colors:n}=this.props;e({sourceName:"icon",value:this.icon,color:t||uX(this.icon,n)})}),this.props=e}}function p_(e,t){var n;return n=class{constructor(n){(0,uU.A)(this,"props",null),(0,uU.A)(this,"isCompatible",()=>!!this.props.avatarRedirectUrl&&!!this.props[t]),(0,uU.A)(this,"get",n=>{let{avatarRedirectUrl:i}=this.props,r=u0(this.props.size),a=i.replace(/\/*$/,"/"),o=this.props[t],s="".concat(a).concat(e,"/").concat(o,"?").concat(r?"size=".concat(r):"");n({sourceName:e,src:s})}),this.props=n}},(0,uU.A)(n,"propTypes",{[t]:uW().oneOfType([uW().string,uW().number])}),n}(0,uU.A)(ph,"propTypes",{color:uW().string});let pg=p_("twitter","twitterHandle"),py=p_("vkontakte","vkontakteId"),pb=p_("instagram","instagramId"),pv=(l=function(e){let{sources:t=[]}=e,n=t.reduce((e,t)=>Object.assign(e,t.propTypes),{});class i extends v.PureComponent{constructor(e){super(e),(0,uU.A)(this,"_createFetcher",e=>n=>{let{cache:i}=this.props;if(!e.isActive(this.state))return;n&&"error"===n.type&&i.sourceFailed(n.target.src);let r=e.sourcePointer;if(t.length===r)return;let a=t[r];e.sourcePointer++,function(e,t,n){let{cache:i}=t,r=new e(t);if(!r.isCompatible(t))return n();r.get(e=>{!(e&&e.src&&i.hasSourceFailedBefore(e.src))&&e?n(e):n()})}(a,this.props,t=>{if(!t)return setTimeout(e.fetch,0);e.isActive(this.state)&&(t={src:null,value:null,color:null,...t},this.setState(n=>e.isActive(n)?t:{}))})}),(0,uU.A)(this,"fetch",()=>{let e=new pi;e.fetch=this._createFetcher(e),this.setState({internal:e},e.fetch)}),this.state={internal:null,src:null,value:null,color:e.color}}componentDidMount(){this.fetch()}componentDidUpdate(e){let t=!1;for(let i in n)t=t||e[i]!==this.props[i];t&&setTimeout(this.fetch,0)}componentWillUnmount(){this.state.internal&&(this.state.internal.active=!1)}render(){let{children:e,propertyName:t}=this.props,{src:n,value:i,color:r,sourceName:a,internal:o}=this.state,s={src:n,value:i,color:r,sourceName:a,onRenderFailed:()=>o&&o.fetch()};if("function"==typeof e)return e(s);let l=A().Children.only(e);return A().cloneElement(l,{[t]:s})}}return(0,uU.A)(i,"displayName","AvatarDataProvider"),(0,uU.A)(i,"propTypes",{...n,cache:uW().object,propertyName:uW().string}),(0,uU.A)(i,"defaultProps",{propertyName:"avatar"}),(0,uU.A)(i,"Cache",uH),(0,uU.A)(i,"ConfigProvider",pt),Object.assign(pn(i),{ConfigProvider:pt,Cache:uH})}({sources:[pu,p_("google","googleId"),pp,pg,pb,py,pd,pc,pm,pf,ph]}),Object.assign(pn(A().forwardRef((e,t)=>A().createElement(l,(0,uR.A)({},e,{propertyName:"avatar"}),n=>{let i=n.src?pa:po;return A().createElement(i,(0,uR.A)({},e,{avatar:n,ref:t}))}))),{getRandomColor:uX,ConfigProvider:pt,Cache:uH}));var pA=n(35570),pw=n.n(pA),p$=n(13624);function pk(e){var t,n,i,r=(0,k.UK)({externalModuleName:"@openmrs/esm-styleguide"}).patientPhotoConceptUuid,a=r?"".concat(s3.Jj,"/obs?patient=").concat(e,"&concept=").concat(r,"&v=full"):null,o=(0,p$.default)(e?a:null,s3.lo),s=o.data,l=o.error,c=o.isLoading,u=null==s||null==(t=s.data)?void 0:t.results[0];return{data:u?{dateTime:null==u?void 0:u.obsDatetime,imageSrc:null==u||null==(i=u.value)||null==(n=i.links)?void 0:n.uri}:null,error:l,isLoading:c}}let px=function(e){var t=e.width,n=e.height,i=(0,V.useTranslation)().t;return A().createElement("svg",{"aria-label":i("patientPhotoPlaceholder","Patient photo placeholder"),width:void 0===t?56:t,height:void 0===n?56:n,fill:"none",xmlns:"http://www.w3.org/2000/svg"},A().createElement("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),A().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"}))};var pC=n(20921),pE={};pE.styleTagTransform=F(),pE.setAttributes=P(),pE.insert=B().bind(null,"head"),pE.domAPI=D(),pE.insertStyleElement=M(),C()(pC.A,pE);let pD=pC.A&&pC.A.locals?pC.A.locals:void 0;function pS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function pB(e){var t,n=e.patientUuid,i=e.patientName,r=(0,V.useTranslation)().t,a=pk(n),o=a.data,s=a.isLoading,l=(t=(0,v.useState)(null),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return pS(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pS(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],p=(0,v.useMemo)(function(){return pw().generate(n)},[n]);(0,v.useEffect)(function(){if(null==o?void 0:o.imageSrc){var e=new Image;e.onload=function(){return u(o.imageSrc)},e.onerror=function(){return u(null)},e.src=o.imageSrc}},[null==o?void 0:o.imageSrc]);var d=r("avatarAltText","Profile photo unavailable - grey placeholder image");return s?A().createElement(sG.SkeletonIcon,{className:pD.skeleton,"data-testid":"skeleton-icon"}):(null==o?void 0:o.imageSrc)&&!c?A().createElement(px,null):A().createElement(pv,{alt:d,color:"rgba(0,0,0,0)",maxInitials:3,name:i,size:"56",src:null!=c?c:void 0,style:c?void 0:{backgroundImage:p.toDataUrl(),backgroundRepeat:"round"},textSizeRatio:2})}var pz=n(13489),pP={};pP.styleTagTransform=F(),pP.setAttributes=P(),pP.insert=B().bind(null,"head"),pP.domAPI=D(),pP.insertStyleElement=M(),C()(pz.A,pP);let pT=pz.A&&pz.A.locals?pz.A.locals:void 0;var pM=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),pO=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-home",pictogramProps:e})})),pF=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),pI=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),pN=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-patient-lists",pictogramProps:e})})),pj=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),pR=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),pL=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),pV=(0,v.memo)((0,v.forwardRef)(function(e,t){return A().createElement(pG,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),pH=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.pictogram,i=e.fallback,r=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["pictogram","fallback"]),a=(0,v.useRef)(document.getElementById(n));return(0,v.useEffect)(function(){var e=document.getElementById("omrs-svgs-container"),t=new MutationObserver(function(e){var t=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var l=o.value;"childList"===l.type&&(a.current=document.getElementById(n))}}catch(e){i=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(i)throw r}}});return e&&t.observe(e,{childList:!0}),function(){return t.disconnect()}},[n]),A().createElement(k.fS,{value:a.current,fallback:i},A().createElement(pG,{ref:t,pictogram:n,pictogramProps:r}))})),pG=(0,v.memo)((0,v.forwardRef)(function(e,t){var n=e.pictogram,i=Object.assign({},{size:92},e.pictogramProps),r=i.className,a=i.size;return(a<=26||a>144)&&(console.error("Invalid size '".concat(a,"' specified for ").concat(n,". Defaulting to 92.")),a=92),A().createElement("svg",{ref:t,className:$()(pT.pictogram,r),height:a,width:a},A().createElement("use",{href:"#".concat(n)}))}));function pU(e){var t=e.showContactDetails,n=e.toggleContactDetails,i=e.className;return A().createElement(sG.Button,{className:i,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:t?aJ:aW},t?(0,sq.V)("showLess","Show less"):(0,sq.V)("showMore","Show more"))}var pq=function(e){var t,n=(0,s1.A)("".concat(s3.Jj,"/patient/").concat(e,"?v=").concat("custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))"),s3.lo),i=n.data,r=n.error;return{isLoading:n.isLoading,attributes:null!=(t=null==i?void 0:i.data.person.attributes)?t:[],error:r}},pW=function(e){var t=(0,k.UK)({externalModuleName:"@openmrs/esm-patient-banner-app"}).contactAttributeTypes,n=void 0===t?[]:t,i=pq(e),r=i.attributes,a=i.error,o=i.isLoading;return{contactAttributes:(0,v.useMemo)(function(){return r.filter(function(e){var t=e.attributeType;return null==n?void 0:n.some(function(e){return t.uuid===e})})},[r,n]),isLoading:o,error:a}},pK=n(25377),pY={};pY.styleTagTransform=F(),pY.setAttributes=P(),pY.insert=B().bind(null,"head"),pY.domAPI=D(),pY.insertStyleElement=M(),C()(pK.A,pY);let pJ=pK.A&&pK.A.locals?pK.A.locals:void 0;function pZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function pX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,t)||pQ(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pQ(e,t){if(e){if("string"==typeof e)return pZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pZ(e,t)}}var p0=function(e){var t,n,i,r,a,o,s,l,c=(r=(n=e.patientUuid)?"".concat(s3.Jj,"/cohortm/cohortmember?patient=").concat(n,"&v=").concat("custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))"):null,o=(a=(0,p$.default)(r,s3.lo)).data,s=a.isLoading,l=null==o||null==(i=o.data)?void 0:i.results.map(function(e){return{uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}}),(0,v.useMemo)(function(){return{cohorts:l,isLoading:s}},[s,l])),u=c.cohorts,p=void 0===u?[]:u,d=c.isLoading;return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("patientLists","Patient Lists")," (",null!=(t=null==p?void 0:p.length)?t:0,")"),d?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,function(){if((null==p?void 0:p.length)>0){var e=p.sort(function(e,t){return(0,aC._U)(null==e?void 0:e.startDate).getTime()-(0,aC._U)(null==t?void 0:t.startDate).getTime()}).slice(0,3);return null==e?void 0:e.map(function(e){return A().createElement("li",{key:e.uuid},A().createElement(k.i_,{to:"".concat(window.spaBase,"/home/patient-lists/").concat(e.uuid),key:e.uuid},e.name))})}return A().createElement("li",null,"--")}(),p.length>3&&A().createElement("li",{className:pJ.link},A().createElement(k.i_,{to:"".concat(window.spaBase,"/home/patient-lists")},(0,sq.V)("seeMoreLists","See {{count}} more lists",{count:(null==p?void 0:p.length)-3})))))},p1=function(e){var t,n=e.patientId,i=(0,k.tQ)(n),r=i.patient,a=i.isLoading,o=null==r||null==(t=r.address)?void 0:t.find(function(e){return"home"===e.use}),s=function(e){return e.split("#")[1]};return a?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("address","Address")),A().createElement("ul",null,o?Object.entries(o).filter(function(e){var t=pX(e,1)[0];return"id"!==t&&"use"!==t}).map(function(e){var t,n,i,r=pX(e,2),a=r[0],l=r[1];return"extension"===a?null==(i=o.extension)||null==(n=i[0])||null==(t=n.extension)?void 0:t.map(function(e,t){return A().createElement("li",{key:"address-".concat(a,"-").concat(t)},(0,sq.V)(s(e.url),s(e.url)),": ",e.valueString)}):A().createElement("li",{key:"address-".concat(a)},(0,sq.V)(a,a),": ",l)}):A().createElement("li",null,"--")))},p2=function(e){var t=pW(e.patientUuid),n=t.isLoading,i=t.contactAttributes,r=(0,v.useMemo)(function(){var e;return i?function(e){if(Array.isArray(e))return pZ(e)}(e=null==i?void 0:i.map(function(e){return[e.attributeType.display?(0,sq.V)(e.attributeType.display,e.attributeType.display):"",e.value]}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pQ(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[]},[i]);return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("contactDetails","Contact Details")),n?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,r.length?r.map(function(e,t){var n=pX(e,2),i=n[0],r=n[1];return A().createElement("li",{key:"".concat(i,"-").concat(r,"-").concat(t)},i,": ",r)}):A().createElement("li",null,"--")))},p3=function(e){var t,n,i,r,a,o,s,l,c,u,p=(t=e.patientId,r="".concat(s3.Jj,"/relationship?v=").concat("custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))","&person=").concat(t),o=(a=(0,p$.default)(t?r:null,s3.lo)).data,s=a.error,l=a.isLoading,c=a.isValidating,u=(null==o||null==(i=o.data)||null==(n=i.results)?void 0:n.length)?function(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;e===l.personA.uuid?n.push({uuid:"".concat(l.uuid),display:l.personB.display,relativeAge:l.personB.age,relativeUuid:l.personB.uuid,relationshipType:l.relationshipType.bIsToA}):n.push({uuid:"".concat(l.uuid),display:l.personA.display,relativeAge:l.personA.age,relativeUuid:l.personA.uuid,relationshipType:l.relationshipType.aIsToB})}}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,o.data.results):null,{data:o?u:null,error:s,isLoading:l,isValidating:c}),d=p.data,f=p.isLoading;return A().createElement(A().Fragment,null,A().createElement("p",{className:pJ.heading},(0,sq.V)("relationships","Relationships")),f?A().createElement(sG.InlineLoading,{description:"".concat((0,sq.V)("loading","Loading")," ..."),role:"progressbar"}):A().createElement("ul",null,d&&d.length>0?A().createElement(A().Fragment,null,d.map(function(e){return A().createElement("li",{key:e.uuid,className:pJ.relationship},A().createElement("div",null,A().createElement(k.i_,{to:"".concat(window.spaBase,"/patient/").concat(e.relativeUuid,"/chart")},e.display)),A().createElement("div",null,e.relationshipType),A().createElement("div",null,"".concat(e.relativeAge?e.relativeAge:"--"," ").concat(e.relativeAge?1===e.relativeAge?"yr":"yrs":"")))})):A().createElement("li",null,"--")))};function p4(e){var t,n,i=e.patientId,r=e.deceased;return A().createElement("div",{className:$()(pJ.contactDetails,(t={},n=pJ.deceased,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t))},A().createElement("div",{className:pJ.row},A().createElement("div",{className:pJ.col},A().createElement(p1,{patientId:i})),A().createElement("div",{className:pJ.col},A().createElement(p2,{patientUuid:i}))),A().createElement("div",{className:pJ.row},A().createElement("div",{className:pJ.col},A().createElement(p3,{patientId:i})),A().createElement("div",{className:pJ.col},A().createElement(p0,{patientUuid:i}))))}function p5(e){var t=document.querySelector("template#loading-spinner");if(t){var n=t.content.cloneNode(!0),i=Array.prototype.map.call(n.childNodes,function(e){return e});return e.appendChild(n),function(){return i.forEach(function(e){return e.remove()})}}return function(){}}},93296:function(e,t,n){"use strict";var i=n(35400),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useState,o=i.useEffect,s=i.useLayoutEffect,l=i.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(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(),i=a({inst:{value:n,getSnapshot:t}}),r=i[0].inst,u=i[1];return s(function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})},[e,n,t]),o(function(){return c(r)&&u({inst:r}),e(function(){c(r)&&u({inst:r})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:u},58139:function(e,t,n){"use strict";e.exports=n(93296)},79736:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{A:()=>i})},36678:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(33780);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,i.A)(r.key),r)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},93442:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(33780);function r(e,t,n){return(t=(0,i.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},33780:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(85761);function r(e){var t=function(e,t){if("object"!=(0,i.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,i.A)(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,i.A)(t)?t:t+""}},85761:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{A:()=>i})},27532:function(e,t,n){"use strict";n.d(t,{Ip:()=>y,_l:()=>h,gX:()=>f,ng:()=>p});var i=n(2385),r=n(34324),a=n(68569),o=n(12748),s=n(31530),l=n(91805);function c(e){let t,n="object"==typeof e[0]?e.shift():new(0,o.FG);if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var u=new WeakMap;class p{copy(){return this.era?new p(this.calendar,this.era,this.year,this.month,this.day):new p(this.calendar,this.year,this.month,this.day)}add(e){return(0,i.WQ)(this,e)}subtract(e){return(0,i.Re)(this,e)}set(e){return(0,i.hZ)(this,e)}cycle(e,t,n){return(0,i.xy)(this,e,t,n)}toDate(e){return(0,s.ay)(this,e)}toString(){return(0,a.$T)(this)}compare(e){return(0,r.SE)(this,e)}constructor(...e){(0,l._)(this,u,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,(0,i.AU)(this)}}var d=new WeakMap;class f{copy(){return new f(this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.tY)(this,e)}subtract(e){return(0,i.YP)(this,e)}set(e){return(0,i.ib)(this,e)}cycle(e,t,n){return(0,i.gt)(this,e,t,n)}toString(){return(0,a.ot)(this)}compare(e){return(0,r.Nu)(this,e)}constructor(e=0,t=0,n=0,r=0){(0,l._)(this,d,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,(0,i.Rb)(this)}}var m=new WeakMap;class h{copy(){return this.era?new h(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new h(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.WQ)(this,e)}subtract(e){return(0,i.Re)(this,e)}set(e){return(0,i.hZ)((0,i.ib)(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return(0,i.xy)(this,e,t,n);default:return(0,i.gt)(this,e,t,n)}}toDate(e,t){return(0,s.ay)(this,e,t)}toString(){return(0,a.qk)(this)}compare(e){let t=(0,r.SE)(this,e);return 0===t?(0,r.Nu)(this,(0,s.tR)(e)):t}constructor(...e){(0,l._)(this,m,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,(0,i.AU)(this)}}var g=new WeakMap;class y{copy(){return this.era?new y(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new y(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return(0,i.E0)(this,e)}subtract(e){return(0,i.d_)(this,e)}set(e,t){return(0,i.D8)(this,e,t)}cycle(e,t,n){return(0,i.XH)(this,e,t,n)}toDate(){return(0,s.cd)(this)}toString(){return(0,a.e6)(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(0,s.uB)(e,this.timeZone).toDate().getTime()}constructor(...e){(0,l._)(this,g,{writable:!0,value:void 0});let[t,n,r,a,o]=c(e),s=e.shift(),u=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=s,this.offset=u,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,(0,i.AU)(this)}}},12748:function(e,t,n){"use strict";n.d(t,{FG:()=>u,LA:()=>s,U_:()=>o,f5:()=>l,rG:()=>a});var i=n(27532),r=n(36829);function a(e,t,n,i){let r=(t=s(e,t))-1,a=-2;return n<=2?a=0:o(t)&&(a=-1),1721425+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+a+i)}function o(e){return e%4==0&&(e%100!=0||e%400==0)}function s(e,t){return"BC"===e?1-t:t}function l(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let c={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class u{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),s=(0,r.z)(t,146097),c=Math.floor(s/36524),u=(0,r.z)(s,36524),p=Math.floor(u/1461),d=Math.floor((0,r.z)(u,1461)/365),[f,m]=l(400*n+100*c+4*p+d+ +(4!==c&&4!==d)),h=e-a(f,m,1,1),g=2;e<a(f,m,3,1)?g=0:o(m)&&(g=1);let y=Math.floor(((h+g)*12+373)/367),b=e-a(f,m,y,1)+1;return new(0,i.ng)(f,m,y,b)}toJulianDay(e){return a(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return c[o(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return o(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}},31530:function(e,t,n){"use strict";n.d(t,{Tr:()=>d,Yd:()=>m,ay:()=>f,cd:()=>v,gw:()=>h,oU:()=>s,tR:()=>g,uB:()=>b,yP:()=>y});var i=n(27532),r=n(2385),a=n(12748),o=n(34324);function s(e){return e=y(e,new(0,a.FG)),l((0,a.LA)(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function l(e,t,n,i,r,a,o){let s=new Date;return s.setUTCHours(i,r,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function c(e,t){if("UTC"===t)return 0;if(e>0&&t===(0,o.Xj)())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:i,day:r,hour:a,minute:s,second:c}=p(e,t);return l(n,i,r,a,s,c,0)-1e3*Math.floor(e/1e3)}let u=new Map;function p(e,t){let n=u.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),u.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let e of i)"literal"!==e.type&&(r[e.type]=e.value);return{year:"BC"===r.era||"B"===r.era?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:"24"===r.hour?0:+r.hour,minute:+r.minute,second:+r.second}}function d(e,t,n="compatible"){var i,r,l;let u=g(e);if("UTC"===t)return s(u);if(t===(0,o.Xj)()&&"compatible"===n){u=y(u,new(0,a.FG));let e=new Date,t=(0,a.LA)(u.era,u.year);return e.setFullYear(t,u.month-1,u.day),e.setHours(u.hour,u.minute,u.second,u.millisecond),e.getTime()}let f=s(u),m=c(f-864e5,t),h=c(f+864e5,t),b=(i=u,((r=f-m)==(l=f-h)?[r]:[r,l]).filter(e=>{var n;let r;return n=i,r=p(e,t),n.year===r.year&&n.month===r.month&&n.day===r.day&&n.hour===r.hour&&n.minute===r.minute&&n.second===r.second}));if(1===b.length)return b[0];if(b.length>1)switch(n){case"compatible":case"earlier":return b[0];case"later":return b[b.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(f-m,f-h);case"compatible":case"later":return Math.max(f-m,f-h);case"reject":throw RangeError("No such absolute time found")}}function f(e,t,n="compatible"){return new Date(d(e,t,n))}function m(e,t){let n=c(e,t),r=new Date(e+n),a=r.getUTCFullYear(),o=r.getUTCMonth()+1,s=r.getUTCDate(),l=r.getUTCHours(),u=r.getUTCMinutes(),p=r.getUTCSeconds(),d=r.getUTCMilliseconds();return new(0,i.Ip)(a<1?"BC":"AD",a<1?-a+1:a,o,s,t,n,l,u,p,d)}function h(e){return new(0,i.ng)(e.calendar,e.era,e.year,e.month,e.day)}function g(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new(0,i._l)(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function y(e,t){if((0,o.Jg)(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,(0,r.AU)(i),i}function b(e,t,n){if(e instanceof i.Ip){var r,a;return e.timeZone===t?e:(r=e,a=t,y(m(s(r)-r.offset,a),r.calendar))}return m(d(e,t,n),t)}function v(e){return new Date(s(e)-e.offset)}},32878:function(e,t,n){"use strict";let i,r;n.d(t,{d:()=>J});var a=n(27532),o=n(12748);class s extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),n=(0,o.LA)(t.era,t.year);return new(0,a.ng)(this,n- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(l(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(l(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function l(e){let[t,n]=(0,o.f5)(e.year+-543);return new(0,a.ng)(t,n,e.month,e.day)}function c(e,t,n,i){return e+365*t+Math.floor(t/4)+30*(n-1)+i-1}function u(e,t){let n=Math.floor(4*(t-e)/1461),i=1+Math.floor((t-c(e,n,1,1))/30),r=t+1-c(e,n,i,1);return[n,i,r]}function p(e){return Math.floor(e%4/3)}function d(e,t){return t%13!=0?30:p(e)+5}class f{fromJulianDay(e){let[t,n,i]=u(1723856,e),r="AM";return t<=0&&(r="AA",t+=5500),new(0,a.ng)(this,r,t,n,i)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),c(1723856,t,e.month,e.day)}getDaysInMonth(e){return d(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+p(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class m extends f{fromJulianDay(e){let[t,n,i]=u(1723856,e);return t+=5500,new(0,a.ng)(this,"AA",t,n,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class h extends f{fromJulianDay(e){let[t,n,i]=u(1824665,e),r="CE";return t<=0&&(r="BCE",t=1-t),new(0,a.ng)(this,r,t,n,i)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),c(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),d(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}var g=n(36829);let y=765433;function b(e){return 7>(0,g.z)(7*e+1,19)}function v(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>(0,g.z)(3*(n+1),7)&&(n+=1),n}function A(e){let t,n;return v(e)+(t=v(e-1),n=v(e),v(e+1)-n==356?2:+(n-t==382))}function w(e){return A(e+1)-A(e)}function $(e,t){if(t>=6&&!b(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=w(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!b(e):30}class k{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/y*19+234)/235)+1,i=A(n),r=Math.floor(t-i);for(;r<1;)r=Math.floor(t-(i=A(--n)));let o=1,s=0;for(;s<r;)s+=$(n,o),o++;let l=r-(s-=$(n,--o));return new(0,a.ng)(this,n,o,l)}toJulianDay(e){let t=A(e.year);for(let n=1;n<e.month;n++)t+=$(e.year,n);return t+e.day+347997}getDaysInMonth(e){return $(e.year,e.month)}getMonthsInYear(e){return b(e.year)?13:12}getDaysInYear(e){return w(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(b(t.year)&&!b(e.year)&&t.month>6?e.month--:!b(t.year)&&b(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class x extends o.FG{fromJulianDay(e){let t,n,i,r=super.fromJulianDay(e),s=r.year-78,l=e-(0,o.rG)(r.era,r.year,1,1);if(l<80?(s--,l+=(t=(0,o.U_)(r.year-1)?31:30)+155+90+10):(t=(0,o.U_)(r.year)?31:30,l-=80),l<t)n=1,i=l+1;else{let e=l-t;e<155?(n=Math.floor(e/31)+2,i=e%31+1):(e-=155,n=Math.floor(e/30)+7,i=e%30+1)}return new(0,a.ng)(this,s,n,i)}toJulianDay(e){let t,n,i=e.year+78,[r,a]=(0,o.f5)(i);return((0,o.U_)(a)?(t=31,n=(0,o.rG)(r,a,3,21)):(t=30,n=(0,o.rG)(r,a,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&(0,o.U_)(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function C(e,t,n,i){return i+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function E(e,t,n){let i=Math.floor((30*(n-t)+10646)/10631),r=Math.min(12,Math.ceil((n-(29+C(t,i,1,1)))/29.5)+1),o=n-C(t,i,r,1)+1;return new(0,a.ng)(e,i,r,o)}function D(e){return(14+11*e)%30<11}class S{fromJulianDay(e){return E(this,1948440,e)}toJulianDay(e){return C(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&D(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return D(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class B extends S{fromJulianDay(e){return E(this,1948439,e)}toJulianDay(e){return C(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function z(e){return 460322+r[e-1300]}function P(e,t){return(i[e-1300]&1<<11-(t-1))==0?29:30}function T(e,t){let n=z(e);for(let i=1;i<t;i++)n+=P(e,i);return n}function M(e){return r[e+1-1300]-r[e-1300]}class O extends S{fromJulianDay(e){let t=e-1948440,n=z(1300),i=z(1600);if(t<n||t>i)return super.fromJulianDay(e);{let e=1299,n=1,i=1;for(;i>0;){i=t-z(++e)+1;let r=M(e);if(i===r){n=12;break}if(i<r){let t=P(e,n);for(n=1;i>t;)i-=t,t=P(e,++n);break}}return new(0,a.ng)(this,e,n,t-T(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+T(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):P(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):M(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",i||(i=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!r){r=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){r[t-1300]=e;for(let n=1;n<=12;n++)e+=P(t,n)}}}}let F=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],I=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],N=[1867,1911,1925,1988,2018],j=["meiji","taisho","showa","heisei","reiwa"];function R(e){let t=F.findIndex(([t,n,i])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<i));return -1===t?F.length-1:0===t?0:t-1}function L(e){let t=N[j.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new(0,a.ng)(e.year+t,e.month,e.day)}class V extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),n=R(t);return new(0,a.ng)(this,j[n],t.year-N[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(L(e))}balanceDate(e){let t=L(e),n=R(t);j[n]!==e.era&&(e.era=j[n],e.year=t.year-N[n]),this.constrainDate(e)}constrainDate(e){let t=j.indexOf(e.era),n=I[t];if(null!=n){let[i,r,a]=n,o=i-N[t];e.year=Math.max(1,Math.min(o,e.year)),e.year===o&&(e.month=Math.min(r,e.month),e.month===r&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,n,i]=F[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(i,e.day))}}getEras(){return j}getYearsInEra(e){let t=j.indexOf(e.era),n=F[t],i=F[t+1];if(null==i)return 9999-n[0]+1;let r=i[0]-n[0];return(e.month<i[1]||e.month===i[1]&&e.day<i[2])&&r++,r}getDaysInMonth(e){return super.getDaysInMonth(L(e))}getMinimumMonthInYear(e){let t=H(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=H(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function H(e){if(1===e.year)return F[j.indexOf(e.era)]}let G=[0,31,62,93,124,155,186,216,246,276,306,336];class U{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),i=t-(365*(n-1)+Math.floor((8*n+21)/33)),r=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-G[r]+1;return new(0,a.ng)(this,n,r+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=G[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>(0,g.z)(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function q(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function W(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class K extends o.FG{fromJulianDay(e){let t=super.fromJulianDay(e),[n,i]=W((0,o.LA)(t.era,t.year));return new(0,a.ng)(this,n,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Y(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=W(q(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(Y(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function Y(e){let[t,n]=(0,o.f5)(q(e));return new(0,a.ng)(t,n,e.month,e.day)}function J(e){switch(e){case"buddhist":return new s;case"ethiopic":return new f;case"ethioaa":return new m;case"coptic":return new h;case"hebrew":return new k;case"indian":return new x;case"islamic-civil":return new S;case"islamic-tbla":return new B;case"islamic-umalqura":return new O;case"japanese":return new V;case"persian":return new U;case"roc":return new K;default:return new(0,o.FG)}}},2385:function(e,t,n){"use strict";n.d(t,{AU:()=>c,D8:()=>C,E0:()=>$,Rb:()=>m,Re:()=>p,WQ:()=>a,XH:()=>x,YP:()=>b,d_:()=>k,gt:()=>A,hZ:()=>d,ib:()=>f,tY:()=>y,xy:()=>v});var i=n(31530),r=n(12748);function a(e,t){let n=e.copy(),i="hour"in n?g(n,t):0;o(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,s(n),l(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=i,function(e){for(;e.day<1;)e.month--,s(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,s(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var a,c;let e=null==(a=(c=n.calendar).isInverseEra)?void 0:a.call(c,n);n.year=r,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let u=n.calendar.getMonthsInYear(n);return n.month>u&&(n.month=u,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function o(e,t){var n,i;(null==(n=(i=e.calendar).isInverseEra)?void 0:n.call(i,e))&&(t=-t),e.year+=t}function s(e){for(;e.month<1;)o(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,o(e,1)}function l(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function c(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),l(e)}function u(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function p(e,t){return a(e,u(t))}function d(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),c(n),n}function f(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),m(n),n}function m(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function h(e,t){let n=e%t;return n<0&&(n+=t),n}function g(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=h(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=h(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=h(e.minute,60),n=Math.floor(e.hour/24),e.hour=h(e.hour,24),n}function y(e,t){let n=e.copy();return g(n,t),n}function b(e,t){return y(e,u(t))}function v(e,t,n,i){let r=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=w(a,n,0,t.length-1,null==i?void 0:i.round),r.era=t[a],c(r);break}case"year":var a,o;(null==(a=(o=r.calendar).isInverseEra)?void 0:a.call(o,r))&&(n=-n),r.year=w(e.year,n,-1/0,9999,null==i?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=w(e.month,n,1,e.calendar.getMonthsInYear(e),null==i?void 0:i.round);break;case"day":r.day=w(e.day,n,1,e.calendar.getDaysInMonth(e),null==i?void 0:i.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),c(r),r}function A(e,t,n,i){let r=e.copy();switch(t){case"hour":{let t=e.hour,a=0,o=23;if((null==i?void 0:i.hourCycle)===12){let e=t>=12;a=12*!!e,o=e?23:11}r.hour=w(t,n,a,o,null==i?void 0:i.round);break}case"minute":r.minute=w(e.minute,n,0,59,null==i?void 0:i.round);break;case"second":r.second=w(e.second,n,0,59,null==i?void 0:i.round);break;case"millisecond":r.millisecond=w(e.millisecond,n,0,999,null==i?void 0:i.round);break;default:throw Error("Unsupported field "+t)}return r}function w(e,t,n,i,r=!1){if(r){(e+=Math.sign(t))<n&&(e=i);let r=Math.abs(t);(e=t>0?Math.ceil(e/r)*r:Math.floor(e/r)*r)>i&&(e=n)}else(e+=t)<n?e=i-(n-e-1):e>i&&(e=n+(e-i-1));return e}function $(e,t){let n;if(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days){let r=a((0,i.tR)(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=(0,i.Tr)(r,e.timeZone)}else n=(0,i.oU)(e)-e.offset;n+=t.milliseconds||0,n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),n+=36e5*(t.hours||0);let r=(0,i.Yd)(n,e.timeZone);return(0,i.yP)(r,e.calendar)}function k(e,t){return $(e,u(t))}function x(e,t,n,a){switch(t){case"hour":{let t=0,o=23;if((null==a?void 0:a.hourCycle)===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let s=(0,i.tR)(e),l=(0,i.yP)(f(s,{hour:t}),new(0,r.FG)),c=[(0,i.Tr)(l,e.timeZone,"earlier"),(0,i.Tr)(l,e.timeZone,"later")].filter(t=>(0,i.Yd)(t,e.timeZone).day===l.day)[0],u=(0,i.yP)(f(s,{hour:o}),new(0,r.FG)),p=[(0,i.Tr)(u,e.timeZone,"earlier"),(0,i.Tr)(u,e.timeZone,"later")].filter(t=>(0,i.Yd)(t,e.timeZone).day===u.day).pop(),d=(0,i.oU)(e)-e.offset,m=Math.floor(d/36e5),h=d%36e5;return d=36e5*w(m,n,Math.floor(c/36e5),Math.floor(p/36e5),null==a?void 0:a.round)+h,(0,i.yP)((0,i.Yd)(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return A(e,t,n,a);case"era":case"year":case"month":case"day":{let r=v((0,i.tR)(e),t,n,a),o=(0,i.Tr)(r,e.timeZone);return(0,i.yP)((0,i.Yd)(o,e.timeZone),e.calendar)}default:throw Error("Unsupported field "+t)}}function C(e,t,n){let r=(0,i.tR)(e),a=f(d(r,t),t);if(0===a.compare(r))return e;let o=(0,i.Tr)(a,e.timeZone,n);return(0,i.yP)((0,i.Yd)(o,e.timeZone),e.calendar)}},34324:function(e,t,n){"use strict";n.d(t,{p9:()=>A,$I:()=>C,xz:()=>$,RZ:()=>D,oT:()=>k,tB:()=>d,kq:()=>x,Jg:()=>l,Py:()=>S,tF:()=>o,Xj:()=>b,Nu:()=>h,SJ:()=>p,SE:()=>m,ro:()=>a,D:()=>w,ZI:()=>B,Ec:()=>f,cK:()=>c,NV:()=>s,wH:()=>v});var i=n(31530);let r={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function a(e,t){return t=(0,i.yP)(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function o(e,t){return t=(0,i.yP)(t,e.calendar),e=v(e),t=v(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function s(e,t){return l(e.calendar,t.calendar)&&a(e,t)}function l(e,t){var n,i,r,a;return null!=(a=null!=(r=null==(n=e.isEqual)?void 0:n.call(e,t))?r:null==(i=t.isEqual)?void 0:i.call(t,e))?a:e.identifier===t.identifier}function c(e,t){return a(e,f(t))}let u={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function p(e,t,n){let i,a=Math.ceil(e.calendar.toJulianDay(e)+1-(n?u[n]:(i=function(e){if(Intl.Locale){let t=E.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&E.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&r[i]||0))%7;return a<0&&(a+=7),a}function d(e){return(0,i.Yd)(Date.now(),e)}function f(e){return(0,i.gw)(d(e))}function m(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function h(e,t){return g(e)-g(t)}function g(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let y=null;function b(){return null==y&&(y=new Intl.DateTimeFormat().resolvedOptions().timeZone),y}function v(e){return e.subtract({days:e.day-1})}function A(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function w(e){return v(e.subtract({months:e.month-1}))}function $(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function k(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function x(e,t,n){let i=p(e,t,n);return e.subtract({days:i})}function C(e,t,n){return x(e,t,n).add({days:6})}let E=new Map;function D(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((p(v(e),t,n)+i)/7)}function S(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function B(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}},68569:function(e,t,n){"use strict";n.d(t,{$T:()=>d,DP:()=>c,_U:()=>l,e6:()=>m,ot:()=>p,qk:()=>f});var i=n(27532),r=n(31530),a=n(12748);let o=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,s=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;function l(e){let t=e.match(o);if(!t)throw Error("Invalid ISO 8601 date string: "+e);let n=new(0,i.ng)(u(t[1],0,9999),u(t[2],1,12),1);return n.day=u(t[3],1,n.calendar.getDaysInMonth(n)),n}function c(e){let t=e.match(s);if(!t)throw Error("Invalid ISO 8601 date time string: "+e);let n=u(t[1],-9999,9999),r=new(0,i._l)(n<1?"BC":"AD",n<1?-n+1:n,u(t[2],1,12),1,t[4]?u(t[4],0,23):0,t[5]?u(t[5],0,59):0,t[6]?u(t[6],0,59):0,t[7]?1e3*u(t[7],0,1/0):0);return r.day=u(t[3],0,r.calendar.getDaysInMonth(r)),r}function u(e,t,n){let i=Number(e);if(i<t||i>n)throw RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function p(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function d(e){let t,n=(0,r.yP)(e,new(0,a.FG));return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function f(e){return`${d(e)}T${p(e)}`}function m(e){var t;let n,i,r;return`${f(e)}${n=0>Math.sign(t=e.offset)?"-":"+",i=Math.floor((t=Math.abs(t))/36e5),r=t%36e5/6e4,`${n}${String(i).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${e.timeZone}]`}},36829:function(e,t,n){"use strict";function i(e,t){return e-t*Math.floor(e/t)}n.d(t,{z:()=>i})},91805:function(e,t,n){"use strict";function i(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}n.d(t,{_:()=>i})},8902:function(e,t,n){"use strict";if(n.d(t,{CD:()=>D}),"undefined"!=typeof navigator){let e=navigator;i=Array.isArray(e.languages)?e.languages[0]:e.language}else if("undefined"!=typeof process){let e=process.env;i=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var i,r=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(i||"en-US"),a=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},o={};for(let e=0;e<100;e++)o[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var s={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},l="[1234567890一二三四五六七八九〇\\d]",c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},u={},p={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},d={zone:p,year:o,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},f={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(p).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},m={...f,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},h={},g=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=r){return h[t.toLowerCase()]||(h[t.toLowerCase()]=new e(t)),h[t.toLowerCase()]}constructor(e=r){this.locale=e,this.lookups={...d},this.vars={...f};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let n=this.lookups.meridiem[t?.toLowerCase()]||0,i=this.toInt(e);return i<12&&12===n&&(i+=12),12===i&&0===n&&(i=0),i}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,i]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(i||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=c:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(u[e])return u[e];if("fullwide"===e||"hanidec"===e)return{group:l,lookup:{...c}};let t=s[e];if(!t)return{group:"\\d",lookup:{...c}};let n=String.fromCharCode(t),i=String.fromCharCode(t+9),r={};for(let e=0;e<10;e++)r[String.fromCharCode(t+e)]=e;return u[e]={group:`[${n}-${i}]`,lookup:r},u[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,m)m.hasOwnProperty(n)&&(this.vars[n]=m[n].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((n,i)=>{["","k","kuu","kuuta"].forEach((r,a)=>{e[n+r+(a<2?"\\.?":"")]=!0,t[n+r]=i+1})});else{let n=[],i=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let r of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:r});for(let o=0;o<12;o++){let s=a.formatToParts(n[o]).find(i).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===r?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=o+1)}}let r=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let o=r.formatToParts(n[a]).find(i).value.toLocaleLowerCase(this.locale);o=o.replace(/\.$/,""),e[`${o}\\.?`]=!0,t[o]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let n=[],i={};for(let r of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:r});for(let o=0;o<7;o++){let s=a.formatToParts(e[o]).find(t).value.toLocaleLowerCase(this.locale);"short"===r?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),i[s]=o}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=i}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],i={},r=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let o=r.formatToParts(e[a]).find(t);if(!o)return;let s=o.value.toLocaleLowerCase(this.locale);n.push(s),i[s]=12*a}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=i}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},y=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],b={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},v=()=>new Date;function A(e){return function(t){let n={};for(let i=0,r=e.length;i<r;i++){let r=e[i];r&&(n[r]=t[i])}return n}}var w=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:i}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=i}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},i=!1;for(let e of this.patterns){let r=t.match(e.regex);if(!r)continue;i=!0;let a=e.handler(r);if(a){for(let[e,t]of Object.entries(a))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,r.index)+t.slice(r.index+r[0].length+1)).trim(),this.doneChecker(n,t))break}}return i?this.formatter(n):this.fallback(e)}},$=["year","month","day","hour","minute","second","millisecond","offset"],k={};function x(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var C=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],E={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...C],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:C,id:C,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function D(e,t=r){let n=function(e){if(!k[e]){var t,n;let i,r,a=g.factory(e);k[e]=new w({doneChecker:x,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(i=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:A(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:A(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:A(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${l}{2,4})\\s*\u5E74\\s*(${l}{1,2})\\s*\u6708\\s*(${l}{1,2})\\s*\u65E5$`),handler:A(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:A(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:A(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=v(),n=e[0].toLowerCase(),i={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==i&&t.setTime(t.getTime()+i);let r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...r,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,n,i]){t=parseFloat(t),"week"===(n=n.length<=2?b[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||i)&&(t*=-1);let r=v();return"millisecond"===n?r.setUTCMilliseconds(r.getUTCMilliseconds()+t):"second"===n?r.setUTCSeconds(r.getUTCSeconds()+t):"minute"===n?r.setUTCMinutes(r.getUTCMinutes()+t):"hour"===n?r.setUTCHours(r.getUTCHours()+t):"day"===n?r.setUTCDate(r.getUTCDate()+t):"month"===n?r.setUTCMonth(r.getUTCMonth()+t):"year"===n&&r.setUTCFullYear(r.getUTCFullYear()+t),{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:A(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:A(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:A(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:A(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:A(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:A(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:A(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:A(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:A(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:A(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:A(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:A(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:A(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:A(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:A(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:A(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:A(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:A(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:A(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:A(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:A(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:A(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:A(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:A(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:A(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:A(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:A(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:A(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:A(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:A(["offset"])}],r=a.baseName.slice(0,5),y.includes(r)?i:i.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=a,function(e){let t={};for(let[i,r]of Object.entries(e))if("monthname"===i){if(r){let e=n.monthNameToInt(r);void 0!==e&&(t.month=e)}}else if("hour"===i&&e.meridiem){let i=n.h12ToInt(r,e.meridiem);void 0!==i&&(t.hour=i)}else if("zone"===i){if(r){let e=n.zoneToOffset(r);void 0!==e&&(t.offset=e)}}else if("offset"===i){let e=n.offsetToMinutes(r);void 0!==e&&(t.offset=e)}else if("millisecond"===i){let e=n.millisecondToInt(r);"number"==typeof e&&(t.millisecond=e)}else if($.includes(i)){let e=n.toInt(r);"number"==typeof e&&(t[i]=e)}return t.year<100&&(t.year=o[e.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return k[e]}(t),i=function(e,t){let n=E[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,i]of n)e=e.replace(t,i);return e}(e,t);return n.attempt(i)}function S(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new a(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new a(t.valueOf()-60*e.offset*1e3):t}function B(e,t=r){let n=D(e,t),i=n.invalid?new a(NaN):S(n);return i.isValid()||(i.invalid=`Unable to parse date "${e}"`),i}function z(e,t=r){return e instanceof Date?new a(e.valueOf()):"number"==typeof e?new a(e):B(e,t)}Date.fromString=a.fromString=B,Date.fromAny=a.fromAny=z,"undefined"!=typeof window&&(window.anyDateParser={fromString:B,fromAny:z,fromObject:S,attempt:D})},60950:function(e,t,n){"use strict";n.d(t,{A:()=>r});class i{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+i.version}static addUnaryOp(e){return i.max_unop_len=Math.max(e.length,i.max_unop_len),i.unary_ops[e]=1,i}static addBinaryOp(e,t,n){return i.max_binop_len=Math.max(e.length,i.max_binop_len),i.binary_ops[e]=t,n?i.right_associative.add(e):i.right_associative.delete(e),i}static addIdentifierChar(e){return i.additional_identifier_chars.add(e),i}static addLiteral(e,t){return i.literals[e]=t,i}static removeUnaryOp(e){return delete i.unary_ops[e],e.length===i.max_unop_len&&(i.max_unop_len=i.getMaxKeyLen(i.unary_ops)),i}static removeAllUnaryOps(){return i.unary_ops={},i.max_unop_len=0,i}static removeIdentifierChar(e){return i.additional_identifier_chars.delete(e),i}static removeBinaryOp(e){return delete i.binary_ops[e],e.length===i.max_binop_len&&(i.max_binop_len=i.getMaxKeyLen(i.binary_ops)),i.right_associative.delete(e),i}static removeAllBinaryOps(){return i.binary_ops={},i.max_binop_len=0,i}static removeLiteral(e){return delete i.literals[e],i}static removeAllLiterals(){return i.literals={},i}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new i(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return i.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!i.binary_ops[String.fromCharCode(e)]||i.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return i.isIdentifierStart(e)||i.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(i.hooks[e]){let n={context:this,node:t};return i.hooks.run(e,n),n.node}return t}searchHook(e){if(i.hooks[e]){let t={context:this};return i.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===i.SPACE_CODE||e===i.TAB_CODE||e===i.LF_CODE||e===i.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:i.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===i.SEMCOL_CODE||n===i.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,i.max_binop_len),t=e.length;for(;t>0;){if(i.binary_ops.hasOwnProperty(e)&&(!i.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,a,o,s,l,c;if(!(o=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return o;for(a={value:t,prec:i.binaryPrecedence(t),right_a:i.right_associative.has(t)},(s=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,s];t=this.gobbleBinaryOp();){if(0===(n=i.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:i.right_associative.has(t)},c=t;let l=e=>a.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&l(r[r.length-2]);)s=r.pop(),t=r.pop().value,o=r.pop(),e={type:i.BINARY_EXP,operator:t,left:o,right:s},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+c),r.push(a,e)}for(l=r.length-1,e=r[l];l>1;)e={type:i.BINARY_EXP,operator:r[l-1].value,left:r[l-2],right:e},l-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,i.isDecimalDigit(e)||e===i.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===i.SQUOTE_CODE||e===i.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===i.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,i.max_unop_len)).length;n>0;){if(i.unary_ops.hasOwnProperty(t)&&(!i.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:i.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}i.isIdentifierStart(e)?(r=this.gobbleIdentifier(),i.literals.hasOwnProperty(r.name)?r={type:i.LITERAL,value:i.literals[r.name],raw:r.name}:r.name===i.this_str&&(r={type:i.THIS_EXP})):e===i.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===i.PERIOD_CODE||t===i.OBRACK_CODE||t===i.OPAREN_CODE||t===i.QUMARK_CODE;){let n;if(t===i.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==i.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===i.OBRACK_CODE?((e={type:i.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==i.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===i.OPAREN_CODE?e={type:i.CALL_EXP,arguments:this.gobbleArguments(i.CPAREN_CODE),callee:e}:(t===i.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:i.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===i.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,i.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===i.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===i.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:i.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:i.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,i.isIdentifierPart(e))this.index++;else break;return{type:i.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let a=this.code;if(a===e){n=!0,this.index++,e===i.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===i.COMMA_CODE){if(this.index++,++r!==t.length){if(e===i.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==i.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i.CPAREN_CODE);if(this.code===i.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:i.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i.ARRAY_EXP,elements:this.gobbleArguments(i.CBRACK_CODE)}}}Object.assign(i,{hooks:new class{add(e,t,n){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(i),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),i.max_unop_len=i.getMaxKeyLen(i.unary_ops),i.max_binop_len=i.getMaxKeyLen(i.binary_ops);let r=e=>new i(e).parse(),a=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i).filter(e=>!a.includes(e)&&void 0===r[e]).forEach(e=>{r[e]=i[e]}),r.Jsep=i,r.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:i,alternate:r},n.operator&&e.binary_ops[n.operator]<=.9){let i=n;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}})},81494:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(81963);let r=function(e,t){for(var n=e.length;n--;)if((0,i.A)(e[n][0],t))return n;return -1};var a=Array.prototype.splice;function o(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)},o.prototype.get=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]},o.prototype.has=function(e){return r(this.__data__,e)>-1},o.prototype.set=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};let s=o},61924:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44536),r=n(28056);let a=(0,i.A)(r.A,"Map")},63605:function(e,t,n){"use strict";n.d(t,{A:()=>d});var i=(0,n(44536).A)(Object,"create"),r=Object.prototype.hasOwnProperty,a=Object.prototype.hasOwnProperty;function o(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}o.prototype.clear=function(){this.__data__=i?i(null):{},this.size=0},o.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},o.prototype.get=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0},o.prototype.has=function(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)},o.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this};var s=n(81494),l=n(61924);let c=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},u=function(e,t){var n=e.__data__;return c(t)?n["string"==typeof t?"string":"hash"]:n.map};function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new o,map:new(l.A||s.A),string:new o}},p.prototype.delete=function(e){var t=u(this,e).delete(e);return this.size-=!!t,t},p.prototype.get=function(e){return u(this,e).get(e)},p.prototype.has=function(e){return u(this,e).has(e)},p.prototype.set=function(e,t){var n=u(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this};let d=p},68726:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44536),r=n(28056);let a=(0,i.A)(r.A,"Set")},98228:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(63605);function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.A;++t<n;)this.add(e[t])}r.prototype.add=r.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},r.prototype.has=function(e){return this.__data__.has(e)};let a=r},61098:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(81494),r=n(61924),a=n(63605);function o(e){var t=this.__data__=new i.A(e);this.size=t.size}o.prototype.clear=function(){this.__data__=new i.A,this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},o.prototype.get=function(e){return this.__data__.get(e)},o.prototype.has=function(e){return this.__data__.has(e)},o.prototype.set=function(e,t){var n=this.__data__;if(n instanceof i.A){var o=n.__data__;if(!r.A||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a.A(o)}return n.set(e,t),this.size=n.size,this};let s=o},19172:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=n(28056).A.Symbol},20705:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=n(28056).A.Uint8Array},42287:function(e,t,n){"use strict";n.d(t,{A:()=>u});let i=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i};var r=n(17820),a=n(36820),o=n(75323),s=n(27322),l=n(43148),c=Object.prototype.hasOwnProperty;let u=function(e,t){var n=(0,a.A)(e),u=!n&&(0,r.A)(e),p=!n&&!u&&(0,o.A)(e),d=!n&&!u&&!p&&(0,l.A)(e),f=n||u||p||d,m=f?i(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(f&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,s.A)(g,h)))&&m.push(g);return m}},20117:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},93903:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},74660:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(37999),r=n(81963),a=Object.prototype.hasOwnProperty;let o=function(e,t,n){var o=e[t];a.call(e,t)&&(0,r.A)(o,n)&&(void 0!==n||t in e)||(0,i.A)(e,t,n)}},37999:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(61670);let r=function(e,t,n){"__proto__"==t&&i.A?(0,i.A)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},27033:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(61306),r=n(58002);let a=function(e,t){t=(0,i.A)(t,e);for(var n=0,a=t.length;null!=e&&n<a;)e=e[(0,r.A)(t[n++])];return n&&n==a?e:void 0}},96918:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(93903),r=n(36820);let a=function(e,t,n){var a=t(e);return(0,r.A)(e)?a:(0,i.A)(a,n(e))}},31243:function(e,t,n){"use strict";n.d(t,{A:()=>p});var i=n(19172),r=Object.prototype,a=r.hasOwnProperty,o=r.toString,s=i.A?i.A.toStringTag:void 0;let l=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=o.call(e);return i&&(t?e[s]=n:delete e[s]),r};var c=Object.prototype.toString,u=i.A?i.A.toStringTag:void 0;let p=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?l(e):c.call(e)}},1128:function(e,t,n){"use strict";n.d(t,{A:()=>B});var i=n(61098),r=n(98228);let a=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1};var o=n(55602);let s=function(e,t,n,i,s,l){var c=1&n,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var m=-1,h=!0,g=2&n?new r.A:void 0;for(l.set(e,t),l.set(t,e);++m<u;){var y=e[m],b=t[m];if(i)var v=c?i(b,y,m,t,e,l):i(y,b,m,e,t,l);if(void 0!==v){if(v)continue;h=!1;break}if(g){if(!a(t,function(e,t){if(!(0,o.A)(g,t)&&(y===e||s(y,e,n,i,l)))return g.push(t)})){h=!1;break}}else if(!(y===b||s(y,b,n,i,l))){h=!1;break}}return l.delete(e),l.delete(t),h};var l=n(19172),c=n(20705),u=n(81963);let p=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n};var d=n(11546),f=l.A?l.A.prototype:void 0,m=f?f.valueOf:void 0;let h=function(e,t,n,i,r,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new c.A(e),new c.A(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,u.A)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=p;case"[object Set]":var f=1&i;if(l||(l=d.A),e.size!=t.size&&!f)break;var h=o.get(e);if(h)return h==t;i|=2,o.set(e,t);var g=s(l(e),l(t),i,r,a,o);return o.delete(e),g;case"[object Symbol]":if(m)return m.call(e)==m.call(t)}return!1};var g=n(11507),y=Object.prototype.hasOwnProperty;let b=function(e,t,n,i,r,a){var o=1&n,s=(0,g.A)(e),l=s.length;if(l!=(0,g.A)(t).length&&!o)return!1;for(var c=l;c--;){var u=s[c];if(!(o?u in t:y.call(t,u)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=o;++c<l;){var h=e[u=s[c]],b=t[u];if(i)var v=o?i(b,h,u,t,e,a):i(h,b,u,e,t,a);if(!(void 0===v?h===b||r(h,b,n,i,a):v)){f=!1;break}m||(m="constructor"==u)}if(f&&!m){var A=e.constructor,w=t.constructor;A!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof w&&w instanceof w)&&(f=!1)}return a.delete(e),a.delete(t),f};var v=n(55492),A=n(36820),w=n(75323),$=n(43148),k="[object Arguments]",x="[object Array]",C="[object Object]",E=Object.prototype.hasOwnProperty;let D=function(e,t,n,r,a,o){var l=(0,A.A)(e),c=(0,A.A)(t),u=l?x:(0,v.A)(e),p=c?x:(0,v.A)(t);u=u==k?C:u,p=p==k?C:p;var d=u==C,f=p==C,m=u==p;if(m&&(0,w.A)(e)){if(!(0,w.A)(t))return!1;l=!0,d=!1}if(m&&!d)return o||(o=new i.A),l||(0,$.A)(e)?s(e,t,n,r,a,o):h(e,t,u,n,r,a,o);if(!(1&n)){var g=d&&E.call(e,"__wrapped__"),y=f&&E.call(t,"__wrapped__");if(g||y){var D=g?e.value():e,S=y?t.value():t;return o||(o=new i.A),a(D,S,n,r,o)}}return!!m&&(o||(o=new i.A),b(e,t,n,r,a,o))};var S=n(62873);let B=function e(t,n,i,r,a){return t===n||(null!=t&&null!=n&&((0,S.A)(t)||(0,S.A)(n))?D(t,n,i,r,e,a):t!=t&&n!=n)}},62926:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(24956),r=(0,n(1748).A)(Object.keys,Object),a=Object.prototype.hasOwnProperty;let o=function(e){if(!(0,i.A)(e))return r(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},93279:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}},33734:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return function(t){return e(t)}}},55602:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return e.has(t)}},61306:function(e,t,n){"use strict";n.d(t,{A:()=>f});var i,r,a=n(36820),o=n(53),s=n(63605);function l(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(l.Cache||s.A),n}l.Cache=s.A;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,p=(r=(i=l(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,function(e,n,i,r){t.push(i?r.replace(u,"$1"):n||e)}),t},function(e){return 500===r.size&&r.clear(),e})).cache,i),d=n(1158);let f=function(e,t){return(0,a.A)(e)?e:(0,o.A)(e,t)?[e]:p((0,d.A)(e))}},46940:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(20705);let r=function(e){var t=new e.constructor(e.byteLength);return new i.A(t).set(new i.A(e)),t}},13137:function(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(28056),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r?i.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;let l=function(e,t){if(t)return e.slice();var n=e.length,i=s?s(n):new e.constructor(n);return e.copy(i),i}},84934:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(46940);let r=function(e,t){var n=t?(0,i.A)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},17052:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},51158:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(74660),r=n(37999);let a=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=a?a(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),o?(0,r.A)(n,c,u):(0,i.A)(n,c,u)}return n}},61670:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(44536);let r=function(){try{var e=(0,i.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},86625:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i="object"==typeof global&&global&&global.Object===Object&&global},11507:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(96918),r=n(93363),a=n(43473);let o=function(e){return(0,i.A)(e,a.A,r.A)}},44536:function(e,t,n){"use strict";n.d(t,{A:()=>h});var i,r=n(49885),a=n(28056).A["__core-js_shared__"],o=(i=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",s=n(12174),l=n(75380),c=/^\[object .+?Constructor\]$/,u=Object.prototype,p=Function.prototype.toString,d=u.hasOwnProperty,f=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let m=function(e){return!!(0,s.A)(e)&&(!o||!(o in e))&&((0,r.A)(e)?f:c).test((0,l.A)(e))},h=function(e,t){var n=null==e?void 0:e[t];return m(n)?n:void 0}},89494:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=(0,n(1748).A)(Object.getPrototypeOf,Object)},93363:function(e,t,n){"use strict";n.d(t,{A:()=>s});let i=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a};var r=n(9620),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;let s=o?function(e){return null==e?[]:i(o(e=Object(e)),function(t){return a.call(e,t)})}:r.A},55492:function(e,t,n){"use strict";n.d(t,{A:()=>k});var i=n(44536),r=n(28056),a=(0,i.A)(r.A,"DataView"),o=n(61924),s=(0,i.A)(r.A,"Promise"),l=n(68726),c=(0,i.A)(r.A,"WeakMap"),u=n(31243),p=n(75380),d="[object Map]",f="[object Promise]",m="[object Set]",h="[object WeakMap]",g="[object DataView]",y=(0,p.A)(a),b=(0,p.A)(o.A),v=(0,p.A)(s),A=(0,p.A)(l.A),w=(0,p.A)(c),$=u.A;(a&&$(new a(new ArrayBuffer(1)))!=g||o.A&&$(new o.A)!=d||s&&$(s.resolve())!=f||l.A&&$(new l.A)!=m||c&&$(new c)!=h)&&($=function(e){var t=(0,u.A)(e),n="[object Object]"==t?e.constructor:void 0,i=n?(0,p.A)(n):"";if(i)switch(i){case y:return g;case b:return d;case v:return f;case A:return m;case w:return h}return t});let k=$},47514:function(e,t,n){"use strict";n.d(t,{A:()=>l});var i=n(12174),r=Object.create,a=function(){function e(){}return function(t){if(!(0,i.A)(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),o=n(89494),s=n(24956);let l=function(e){return"function"!=typeof e.constructor||(0,s.A)(e)?{}:a((0,o.A)(e))}},27322:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=/^(?:0|[1-9]\d*)$/;let r=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&i.test(e))&&e>-1&&e%1==0&&e<t}},53:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(36820),r=n(44049),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;let s=function(e,t){if((0,i.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,r.A)(e))||o.test(e)||!a.test(e)||null!=t&&e in Object(t)}},24956:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=Object.prototype;let r=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}},97872:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(86625),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r&&i.A.process;let s=function(){try{var e=a&&a.require&&a.require("util").types;if(e)return e;return o&&o.binding&&o.binding("util")}catch(e){}}()},1748:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return function(n){return e(t(n))}}},54979:function(e,t,n){"use strict";n.d(t,{A:()=>a});let i=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var r=Math.max;let a=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),l=Array(s);++o<s;)l[o]=a[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=a[o];return c[t]=n(l),i(e,this,c)}}},28056:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(86625),r="object"==typeof self&&self&&self.Object===Object&&self;let a=i.A||r||Function("return this")()},11546:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},44168:function(e,t,n){"use strict";n.d(t,{A:()=>c});var i,r,a=n(61670),o=n(68527),s=a.A?function(e,t){return(0,a.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:o.A,l=Date.now;let c=(i=0,r=0,function(){var e=l(),t=16-(e-r);if(r=e,t>0){if(++i>=800)return arguments[0]}else i=0;return s.apply(void 0,arguments)})},58002:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(44049),r=1/0;let a=function(e){if("string"==typeof e||(0,i.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}},75380:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=Function.prototype.toString;let r=function(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},81963:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e,t){return e===t||e!=e&&t!=t}},68527:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return e}},17820:function(e,t,n){"use strict";n.d(t,{A:()=>c});var i=n(31243),r=n(62873);let a=function(e){return(0,r.A)(e)&&"[object Arguments]"==(0,i.A)(e)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;let c=a(function(){return arguments}())?a:function(e){return(0,r.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},36820:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=Array.isArray},55259:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(49885),r=n(47741);let a=function(e){return null!=e&&(0,r.A)(e.length)&&!(0,i.A)(e)}},75323:function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(28056),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===r?i.A.Buffer:void 0;let s=(o?o.isBuffer:void 0)||function(){return!1}},75133:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(1128);let r=function(e,t){return(0,i.A)(e,t)}},49885:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(31243),r=n(12174);let a=function(e){if(!(0,r.A)(e))return!1;var t=(0,i.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},47741:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},12174:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},62873:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){return null!=e&&"object"==typeof e}},92562:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(31243),r=n(89494),a=n(62873),o=Object.prototype,s=Function.prototype.toString,l=o.hasOwnProperty,c=s.call(Object);let u=function(e){if(!(0,a.A)(e)||"[object Object]"!=(0,i.A)(e))return!1;var t=(0,r.A)(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==c}},44049:function(e,t,n){"use strict";n.d(t,{A:()=>a});var i=n(31243),r=n(62873);let a=function(e){return"symbol"==typeof e||(0,r.A)(e)&&"[object Symbol]"==(0,i.A)(e)}},43148:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(31243),r=n(47741),a=n(62873),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=n(33734),l=n(97872),c=l.A&&l.A.isTypedArray;let u=c?(0,s.A)(c):function(e){return(0,a.A)(e)&&(0,r.A)(e.length)&&!!o[(0,i.A)(e)]}},43473:function(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(42287),r=n(62926),a=n(55259);let o=function(e){return(0,a.A)(e)?(0,i.A)(e):(0,r.A)(e)}},22678:function(e,t,n){"use strict";n.d(t,{A:()=>u});var i=n(42287),r=n(12174),a=n(24956);let o=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var s=Object.prototype.hasOwnProperty;let l=function(e){if(!(0,r.A)(e))return o(e);var t=(0,a.A)(e),n=[];for(var i in e)"constructor"==i&&(t||!s.call(e,i))||n.push(i);return n};var c=n(55259);let u=function(e){return(0,c.A)(e)?(0,i.A)(e,!0):l(e)}},6561:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},10840:function(e,t,n){"use strict";n.d(t,{A:()=>eu});var i,r=n(20117),a=n(61098);let o=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e};var s=n(74660),l=n(51158),c=n(43473),u=n(22678),p=n(13137),d=n(17052),f=n(93363),m=n(93903),h=n(89494),g=n(9620),y=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,m.A)(t,(0,f.A)(e)),e=(0,h.A)(e);return t}:g.A,b=n(11507),v=n(96918);let A=function(e){return(0,v.A)(e,u.A,y)};var w=n(55492),$=Object.prototype.hasOwnProperty;let k=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&$.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var x=n(46940);let C=function(e,t){var n=t?(0,x.A)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var E=/\w*$/;let D=function(e){var t=new e.constructor(e.source,E.exec(e));return t.lastIndex=e.lastIndex,t};var S=n(19172),B=S.A?S.A.prototype:void 0,z=B?B.valueOf:void 0,P=n(84934);let T=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,x.A)(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return C(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,P.A)(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return D(e);case"[object Symbol]":return z?Object(z.call(e)):{}}};var M=n(47514),O=n(36820),F=n(75323),I=n(62873),N=n(33734),j=n(97872),R=j.A&&j.A.isMap,L=R?(0,N.A)(R):function(e){return(0,I.A)(e)&&"[object Map]"==(0,w.A)(e)},V=n(12174),H=j.A&&j.A.isSet,G=H?(0,N.A)(H):function(e){return(0,I.A)(e)&&"[object Set]"==(0,w.A)(e)},U="[object Arguments]",q="[object Function]",W="[object Object]",K={};K[U]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[W]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[q]=K["[object WeakMap]"]=!1;let Y=function e(t,n,i,r,m,h){var g,v=1&n,$=2&n,x=4&n;if(i&&(g=m?i(t,r,m,h):i(t)),void 0!==g)return g;if(!(0,V.A)(t))return t;var C=(0,O.A)(t);if(C){if(g=k(t),!v)return(0,d.A)(t,g)}else{var E,D,S,B,z=(0,w.A)(t),P=z==q||"[object GeneratorFunction]"==z;if((0,F.A)(t))return(0,p.A)(t,v);if(z==W||z==U||P&&!m){if(g=$||P?{}:(0,M.A)(t),!v)return $?(D=(E=g)&&(0,l.A)(t,(0,u.A)(t),E),(0,l.A)(t,y(t),D)):(B=(S=g)&&(0,l.A)(t,(0,c.A)(t),S),(0,l.A)(t,(0,f.A)(t),B))}else{if(!K[z])return m?t:{};g=T(t,z,v)}}h||(h=new a.A);var I=h.get(t);if(I)return I;h.set(t,g),G(t)?t.forEach(function(r){g.add(e(r,n,i,r,t,h))}):L(t)&&t.forEach(function(r,a){g.set(a,e(r,n,i,a,t,h))});var N=x?$?A:b.A:$?u.A:c.A,j=C?void 0:N(t);return o(j||t,function(r,a){j&&(r=t[a=r]),(0,s.A)(g,a,e(r,n,i,a,t,h))}),g};var J=n(61306),Z=n(6561),X=n(27033),Q=n(93279),ee=n(58002);let et=function(e,t){var n,i;return t=(0,J.A)(t,e),n=e,null==(e=(i=t).length<2?n:(0,X.A)(n,(0,Q.A)(i,0,-1)))||delete e[(0,ee.A)((0,Z.A)(t))]};var en=n(92562);let ei=function(e){return(0,en.A)(e)?void 0:e};var er=n(17820),ea=S.A?S.A.isConcatSpreadable:void 0;let eo=function(e){return(0,O.A)(e)||(0,er.A)(e)||!!(ea&&e&&e[ea])},es=function e(t,n,i,r,a){var o=-1,s=t.length;for(i||(i=eo),a||(a=[]);++o<s;){var l=t[o];n>0&&i(l)?n>1?e(l,n-1,i,r,a):(0,m.A)(a,l):r||(a[a.length]=l)}return a};var el=n(54979),ec=n(44168);let eu=(i=function(e,t){var n={};if(null==e)return n;var i=!1;t=(0,r.A)(t,function(t){return t=(0,J.A)(t,e),i||(i=t.length>1),t}),(0,l.A)(e,A(e),n),i&&(n=Y(n,7,ei));for(var a=t.length;a--;)et(n,t[a]);return n},(0,ec.A)((0,el.A)(i,void 0,function(e){return(null==e?0:e.length)?es(e,1):[]}),i+""))},9620:function(e,t,n){"use strict";n.d(t,{A:()=>i});let i=function(){return[]}},1158:function(e,t,n){"use strict";n.d(t,{A:()=>p});var i=n(19172),r=n(20117),a=n(36820),o=n(44049),s=1/0,l=i.A?i.A.prototype:void 0,c=l?l.toString:void 0;let u=function e(t){if("string"==typeof t)return t;if((0,a.A)(t))return(0,r.A)(t,e)+"";if((0,o.A)(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n},p=function(e){return null==e?"":u(e)}},6309:function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){var i,r,a;i=e,r=t,a=n[t],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function 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 o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n;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(o(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(o(e)));return e}}n.d(t,{A:()=>u,i:()=>l});var l=null;try{l=require("react").createContext()}catch(e){}var c={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function u(e){if("object"!==a(e))throw Error("single-spa-react requires a configuration object");var t,n=r(r({},c),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw 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");!l&&n.React.createContext&&(l=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 i={bootstrap:p.bind(null,n),mount:d.bind(null,n),unmount:f.bind(null,n)};return n.parcelCanUpdate&&(i.update=m.bind(null,n)),i}function p(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function d(e,t){return new Promise(function(n,i){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 r,a=g(e,t,function(){n(this)}),o=s(e,t)(),l=function(e){var t=e.reactDom,n=e.renderType,i=e.elementToRender,r=e.domElement,a=t[n];if("function"!=typeof a)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var o=a(r);return o.render(i),o;case"hydrateRoot":return a(r,i);default:return a(i,r),null}}({elementToRender:a,domElement:o,reactDom:h(e),renderType:"function"==typeof(r=e).renderType?r.renderType():r.renderType});e.domElements[t.name]=o,e.renderResults[t.name]=l})}function f(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var i=e.renderResults[t.name];i&&i.unmount?i.unmount():h(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 i=g(e,t,null),r=e.renderResults[t.name];if(r&&r.render)r.render(i);else{var a=s(e,t)();h(e).render(i,a)}})}function h(e){return e.ReactDOMClient||e.ReactDOM}function g(e,t,n){var i=e.React.createElement(e.rootComponent,t),a=l?e.React.createElement(l.Provider,{value:t},i):i;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),a=e.React.createElement(e.errorBoundaryClass,t,a)),a=e.React.createElement(e.SingleSpaRoot,r(r({},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])}}),a)}},22956:function(e,t,n){"use strict";let i;n.d(t,{AG:()=>ex,EH:()=>ea,fz:()=>ez,xL:()=>G});var r=Object.freeze({__proto__:null,get start(){return ej},get ensureJQuerySupport(){return em},get setBootstrapMaxTime(){return Y},get setMountMaxTime(){return J},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return X},get registerApplication(){return ex},get unregisterApplication(){return eE},get getMountedApps(){return eA},get getAppStatus(){return e$},get unloadApplication(){return eD},get checkActivityFunctions(){return eC},get getAppNames(){return ew},get pathToActiveWhen(){return ez},get navigateToUrl(){return ea},get patchHistoryApi(){return ep},get triggerAppChange(){return eO},get addErrorHandler(){return c},get removeErrorHandler(){return u},get mountRootParcel(){return G},get NOT_LOADED(){return f},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return h},get BOOTSTRAPPING(){return g},get NOT_MOUNTED(){return y},get MOUNTING(){return b},get UPDATING(){return A},get LOAD_ERROR(){return k},get MOUNTED(){return v},get UNLOADING(){return $},get UNMOUNTING(){return w},get SKIP_BECAUSE_BROKEN(){return x}}),a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,o=!function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"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=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:a;let s=[];function l(e,t,n){let i=d(e,t,n);s.length?s.forEach(e=>e(i)):setTimeout(()=>{throw i})}function c(e){if("function"!=typeof e)throw Error(p(28,!1));s.push(e)}function u(e){if("function"!=typeof e)throw Error(p(29,!1));let t=!1;return s=s.filter(n=>{let i=n===e;return t=t||i,!i}),t}function p(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 d(e,t,n){let i,r=`${B(t)} '${D(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=r+e.message}catch(e){}i=e}else{console.warn(p(30,!1,t.status,D(t)));try{i=Error(r+JSON.stringify(e))}catch(t){i=e}}return i.appOrParcelName=D(t),t.status=n,i}let f="NOT_LOADED",m="LOADING_SOURCE_CODE",h="NOT_BOOTSTRAPPED",g="BOOTSTRAPPING",y="NOT_MOUNTED",b="MOUNTING",v="MOUNTED",A="UPDATING",w="UNMOUNTING",$="UNLOADING",k="LOAD_ERROR",x="SKIP_BECAUSE_BROKEN";function C(e){return e.status===v}function E(e){try{return e.activeWhen(window.location)}catch(t){return l(t,e,x),!1}}function D(e){return e.name}function S(e){return!!e.unmountThisParcel}function B(e){return S(e)?"parcel":"application"}function z(){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 P(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function T(e){return e&&("function"==typeof e||Array.isArray(e)&&!P(e,e=>"function"!=typeof e))}function M(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let i=B(e),r=D(e);return function(e){return n.reduce((n,a,o)=>n.then(()=>{let n=a(e);return O(n)?n:Promise.reject(p(15,!1,i,r,t,o))}),Promise.resolve())}}function O(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let F=[];function I(e,t){return Promise.resolve().then(()=>e.status!==h?e:(e.status=g,e.bootstrap?Q(e,"bootstrap").then(n).catch(n=>{if(t)throw d(n,e,x);return l(n,e,x),e}):Promise.resolve().then(n)));function n(){return e.status=y,e}}function N(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;return e.status=w,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,i=>n().then(()=>{let n=Error(i.message);if(t)throw d(n,e,x);l(n,e,x)})).then(()=>e);function n(){return Q(e,"unmount").then(()=>{e.status=y},n=>{if(t)throw d(n,e,x);l(n,e,x)})}})}let j=!1,R=!1;function L(e,t){return Promise.resolve().then(()=>e.status!==y?e:(j||(window.dispatchEvent(new o("single-spa:before-first-mount")),j=!0),e.status=b,Q(e,"mount").then(()=>(e.status=v,R||(window.dispatchEvent(new o("single-spa:first-mount")),R=!0),e)).catch(n=>{return e.status=v,N(e,!0).then(i,i);function i(){if(t)throw d(n,e,x);return l(n,e,x),e}})))}let V=0,H={parcels:{}};function G(){return U.apply(H,arguments)}function U(e,t){let n,i,r,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,typeof e.name));let o=V++,s=e.name||`parcel-${o}`;if("object"!=typeof t)throw Error(p(4,!1,s,typeof t));if(!t.domElement)throw Error(p(5,!1,s));let l="function"==typeof e,c=l?e:()=>Promise.resolve(e),u={id:o,parcels:{},status:l?m:h,customProps:t,parentName:D(a),unmountThisParcel:()=>b.then(()=>{if(u.status!==v)throw Error(p(6,!1,s,u.status));return N(u,!0)}).then(e=>(u.parentName&&delete a.parcels[u.id],e)).then(e=>(i(e),e)).catch(e=>{throw u.status=x,r(e),e})};a.parcels[o]=u;let f=c();if(!f||"function"!=typeof f.then)throw Error(p(7,!1));let g=(f=f.then(e=>{if(!e)throw Error(p(8,!1));if(s=e.name||`parcel-${o}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!T(e.bootstrap))throw Error(p(9,!1,s));if(!T(e.mount))throw Error(p(10,!1,s));if(!T(e.unmount))throw Error(p(11,!1,s));if(e.update&&!T(e.update))throw Error(p(12,!1,s));let t=M(e,"bootstrap"),i=M(e,"mount"),r=M(e,"unmount");u.status=h,u.name=s,u.bootstrap=t,u.mount=i,u.unmount=r,u.timeouts=ee(e.timeouts),e.update&&(u.update=M(e,"update"),n.update=function(e){return u.customProps=e,q(Promise.resolve().then(()=>{if(u.status!==v)throw Error(p(32,!1,D(u)));return u.status=A,Q(u,"update").then(()=>(u.status=v,u)).catch(e=>{throw d(e,u,x)})}))})})).then(()=>I(u,!0)),b=g.then(()=>L(u,!0)),w=new Promise((e,t)=>{i=e,r=t});return n={mount:()=>q(Promise.resolve().then(()=>{if(u.status!==y)throw Error(p(13,!1,s,u.status));return a.parcels[o]=u,L(u)})),unmount:()=>q(u.unmountThisParcel()),getStatus:()=>u.status,loadPromise:q(f),bootstrapPromise:q(g),mountPromise:q(b),unmountPromise:q(w)}}function q(e){return e.then(()=>null)}function W(e){let t=D(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));let i=z({},n,{name:t,mountParcel:U.bind(e),singleSpa:r});return S(e)&&(i.unmountSelf=e.unmountThisParcel),i}let K={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 Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(16,!1));K.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function J(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));K.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));K.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function X(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));K.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t){let n=e.timeouts[t],i=n.warningMillis,r=B(e);return new Promise((a,o)=>{let s=!1,l=!1;e[t](W(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,o(e)}),setTimeout(()=>u(1),i),setTimeout(()=>u(!0),n.millis);let c=p(31,!1,t,r,D(e),n.millis);function u(e){s||(!0===e?(l=!0,n.dieOnTimeout?o(Error(c)):console.error(c)):!l&&(console.warn(c),e*i+i<n.millis&&setTimeout(()=>u(e+1),i)))}})}function ee(e){let t={};for(let n in K)t[n]=z({},K[n],e&&e[n]||{});return t}function et(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==f&&e.status!==k?e:(e.status=m,e.loadPromise=Promise.resolve().then(()=>{let i=e.loadApp(W(e));if(!O(i))throw n=!0,Error(p(33,!1,D(e)));return i.then(n=>{let i;e.loadErrorTime=null,"object"!=typeof(t=n)&&(i=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!T(t.bootstrap)&&(i=35),T(t.mount)||(i=36),T(t.unmount)||(i=37);let r=B(t);if(i){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(p(i,!1,r,D(e),n),t),l(void 0,e,x),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=z({},e.devtools.overlays,t.devtools.overlays)),e.status=h,e.bootstrap=M(t,"bootstrap"),e.mount=M(t,"mount"),e.unmount=M(t,"unmount"),e.unload=M(t,"unload"),e.timeouts=ee(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let i;return delete e.loadPromise,n?i=x:(i=k,e.loadErrorTime=(new Date).getTime()),l(t,e,i),e}))})}let en="undefined"!=typeof window,ei={hashchange:[],popstate:[]},er=["hashchange","popstate"];function ea(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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=ed(window.location.href),i=ed(t);0===t.indexOf("#")?window.location.hash=i.hash:n.host!==i.host&&i.host?window.location.href=t:i.pathname===n.pathname&&i.search===n.search?window.location.hash=i.hash:window.history.pushState(null,null,t)}function eo(e){if(e){let t=e[0].type;er.indexOf(t)>=0&&ei[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function es(){eF([],arguments)}function el(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),a=window.location.href;return i&&n===a||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let ec=null,eu=!1;function ep(e){if(eu)throw Error(p(43,!1));i=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,eu=!0,ec=window.history.replaceState,window.addEventListener("hashchange",es),window.addEventListener("popstate",es);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&er.indexOf(e)>=0)||P(ei[e],e=>e===n))return t.apply(this,arguments);ei[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&er.indexOf(e)>=0&&(ei[e]=ei[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=el(window.history.pushState,"pushState"),window.history.replaceState=el(ec,"replaceState")}function ed(e){let t=document.createElement("a");return t.href=e,t}en&&(window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=ea);let ef=!1;function em(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ef){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return eh.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return eh.call(this,n,window.removeEventListener,e,t,arguments)},ef=!0}}function eh(e,t,n,i,r){return"string"!=typeof n?e.apply(this,r):(n.split(/\s+/).forEach(e=>{er.indexOf(e)>=0&&(t(e,i),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,r))}let e_={};function eg(e){return Promise.resolve().then(()=>{let t=e_[D(e)];if(!t)return e;if(e.status===f)return ey(e,t),e;if(e.status===$)return t.promise.then(()=>e);if(e.status!==y&&e.status!==k)return e;let n=e.status===k?Promise.resolve():Q(e,"unload");return e.status=$,n.then(()=>(ey(e,t),e)).catch(n=>(delete e_[D(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,l(n,e,x),t.reject(n),e))})}function ey(e,t){delete e_[D(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=f,t.resolve()}function eb(e,t,n,i){e_[D(e)]={app:e,resolve:n,reject:i},Object.defineProperty(e_[D(e)],"promise",{get:t})}let ev=[];function eA(){return ev.filter(C).map(D)}function ew(){return ev.map(D)}function e$(e){let t=P(ev,t=>D(t)===e);return t?t.status:null}let ek=!1;function ex(e,t,n,i){var r,a;let o,s,l=(o={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));let 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(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(p(20,!1));let i=e=>"string"==typeof e||"function"==typeof e;if(!(i(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(i)))throw Error(p(24,!1));if(!eB(e.customProps))throw Error(p(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,i){if("string"!=typeof e||0===e.length)throw Error(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!eB(i))throw Error(p(22,!1))}(e,t,n,i),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=i),o.loadApp="function"!=typeof(r=o.loadApp)?()=>Promise.resolve(r):r,o.customProps=o.customProps||{},s=(s=Array.isArray(a=o.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:ez(e)),o.activeWhen=e=>s.some(t=>t(e)),o);if(eN||ek||(ek=!0,setTimeout(()=>{eN||console.warn(p(1,!1))},5e3)),-1!==ew().indexOf(l.name))throw Error(p(21,!1,l.name));ev.push(z({loadErrorTime:null,status:f,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),en&&(em(),eF())}function eC(e=window.location){return ev.filter(t=>t.activeWhen(e)).map(D)}function eE(e){if(0===ev.filter(t=>D(t)===e).length)throw Error(p(25,!1,e));return(en?eD(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=ev.map(D).indexOf(e);ev.splice(t,1)})}function eD(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(p(26,!1));let n=P(ev,t=>D(t)===e);if(!n)throw Error(p(27,!1,e));let i=e_[D(n)];if(t&&t.waitForUnmount){if(i)return i.promise;{let e=new Promise((t,i)=>{eb(n,()=>e,t,i)});return e}}{let e;return i?(e=i.promise,eS(n,i.resolve,i.reject)):e=new Promise((t,i)=>{eb(n,()=>e,t,i),eS(n,t,i)}),e}}function eS(e,t,n){Promise.resolve().then(()=>{if(P(eC(),t=>t===D(e)))return eO()}).then(()=>N(e).then(eg).then(()=>{t(),setTimeout(()=>{eF()})})).catch(n)}function eB(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function ez(e,t){let n=function(e,t){let n=0,i=!1,r="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],r=i&&"/"===n;(!i&&":"===n||r)&&a(t)}return a(e.length),RegExp(r,"i");function a(a){let o=e.slice(n,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r+=i?"[^/]+/?":o,a===e.length)if(i)t&&(r+="$");else{let e=t?"":".*";r="/"===r.charAt(r.length-1)?`${r}${e}$`:`${r}(/${e})?(#.*)?$`}i=!i,n=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let i=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(i)}}let eP=!1,eT=[],eM=en&&window.location.href;function eO(){return eF()}function eF(e=[],t,n=!1){let i,r,a,s,l;if(eP)return new Promise((e,n)=>{eT.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:c,appsToUnmount:u,appsToLoad:d,appsToMount:g}=(i=[],r=[],a=[],s=[],l=(new Date).getTime(),ev.forEach(e=>{let t=e.status!==x&&E(e);switch(e.status){case k:t&&l-e.loadErrorTime>=200&&a.push(e);break;case f:case m:t&&a.push(e);break;case h:case y:!t&&e_[D(e)]?i.push(e):t&&s.push(e);break;case v:t||r.push(e)}}),{appsToUnload:i,appsToUnmount:r,appsToLoad:a,appsToMount:s}),b,A=[],w=eM,$=eM=window.location.href;return eN?(eP=!0,b=c.concat(d,u,g),Promise.resolve().then(()=>(T(0===b.length?"before-no-app-change":"before-app-change",P(!0)),T("before-routing-event",P(!0,{cancelNavigation:C})),Promise.all(A).then(n=>{if(n.some(e=>e))return ec.call(window.history,history.state,"",w.substring(location.origin.length)),eM=location.href,eP=!1,eF(e,t,!0);let i=c.map(eg),r=Promise.all(u.map(N).map(e=>e.then(eg)).concat(i));r.then(()=>{T("before-mount-routing-event",P(!0))},e=>{throw e});let a=d.map(e=>et(e).then(e=>eI(e,r))),o=g.filter(e=>0>d.indexOf(e)).map(e=>eI(e,r));return r.catch(e=>{throw B(),e}).then(()=>(B(),Promise.all(a.concat(o)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(S).then(()=>{},e=>{throw e})))})))):(b=d,Promise.resolve().then(()=>Promise.all(d.map(et)).then(B).then(()=>[]).catch(e=>{throw B(),e}).finally(()=>{})));function C(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);A.push(t.catch(e=>(console.warn(Error(p(42,!1))),console.warn(e),!1)))}function S(){let t=eA();e.forEach(e=>e.resolve(t));try{T(0===b.length?"no-app-change":"app-change",P()),T("routing-event",P())}catch(e){setTimeout(()=>{throw e})}if(eP=!1,eT.length>0){let e=eT;eT=[],eF(e)}return t}function B(){n||(e.forEach(e=>{eo(e.eventArguments)}),eo(t))}function P(e=!1,n){let i={},r={[v]:[],[y]:[],[f]:[],[x]:[]};e?(d.concat(g).forEach((e,t)=>{o(e,v)}),c.forEach(e=>{o(e,f)}),u.forEach(e=>{o(e,y)})):b.forEach(e=>{o(e)});let a={detail:{newAppStatuses:i,appsByNewStatus:r,totalAppChanges:b.length,originalEvent:null==t?void 0:t[0],oldUrl:w,newUrl:$}};return n&&z(a.detail,n),a;function o(e,t){let n=D(e);t=t||e$(n),i[n]=t,(r[t]=r[t]||[]).push(n)}}function T(e,t){n||window.dispatchEvent(new o(`single-spa:${e}`,t))}}function eI(e,t){return E(e)?I(e).then(e=>t.then(()=>E(e)?L(e):e)):t.then(()=>e)}let eN=!1;function ej(e){eN=!0,en&&(ep(e),eF())}en&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...ev]},reroute:eF,NOT_LOADED:f,toLoadPromise:et,toBootstrapPromise:I,unregisterApplication:eE,getProfilerData:function(){return F}})},70937:function(e,t,n){"use strict";n.d(t,{lo:()=>y,HW:()=>$,QE:()=>O,xC:()=>S,$f:()=>v,Kx:()=>B,EW:()=>k,E4:()=>x,Gm:()=>g,eA:()=>A,yH:()=>C,ut:()=>b,Y0:()=>F,L7:()=>M,IU:()=>m,Jj:()=>f,g$:()=>E,Gp:()=>z,Ct:()=>h,Fi:()=>P,st:()=>D});var i=n(64201),r=n(467);let a=function(e){return void 0===e};var o=n(26049),s=n(92562),l=n(13070),c=n(17744);let u="${openmrsSpaBase}/login",p={redirectAuthFailure:{enabled:{_type:l.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:l.ZU.String,_default:u,_validators:[l.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:l.ZU.Array,_default:[401],_elements:{_type:l.ZU.Number,_validators:[l.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:l.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:l.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}let f="/ws/rest/v1",m="/ws/fhir2/R4",h=`${f}/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,s.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(f)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(m)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let i=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:r}=await (0,l.zj)("@openmrs/esm-api");if(e.ok)if(204!==e.status)return e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e});else{if(r&&e.headers.has("location")){let t=e.headers.get("location");t&&(0,c.oo)({to:t})}return e.data=null,e}if(!(n===g(h)&&403===e.status||t.enabled&&t.errors.includes(e.status)))return e.clone().text().then(t=>{let r=t;try{r=JSON.parse(t)}catch(e){}throw new v(n,e,r,i)},t=>{throw new v(n,e,null,i)});{(0,c.g4)();let n=t.url||e.headers.get("location")||u;return(0,c.oo)({to:n}),t.resolvePromise?Promise.resolve():new Promise(()=>{})}})}function b(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let n=new AbortController;return t.signal=n.signal,new o.c(i=>{let r=!1;return y(e,t).then(e=>{r=!0,i.next(e),i.complete()},e=>{r=!0,i.error(e)}),()=>{r||n.abort()}})}class v extends Error{constructor(e,t,n,i){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`,i.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
|
|
8
8
|
${i.stack}
|
|
9
9
|
Stacktrace for incoming response:
|
|
10
10
|
${this.stack}`}}let A=(0,r.Zd)("session",{loaded:!1,session:null}),w=0;function $(e={includeAuthStatus:!0}){return(w<Date.now()-6e4||!A.getState().loaded)&&C(),new o.c(t=>{let n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(A.getState()),A.subscribe(n)})}function k(){return(w<Date.now()-6e4||!A.getState().loaded)&&C(),A}function x(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 C(e,t){w=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),T(y(h,{headers:n}))}function E(){A.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function D(e,t){var n,i;if(void 0===t)return!!e;if(!e)return!0;return n=e,i=t,("string"==typeof n?!a(i.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!a(i.privileges.find(t=>e===t.display))):(a(n)||console.error(`Could not understand privileges "${n}"`),!0))||!a(t.roles.find(e=>"System Developer"===e.display))}function S(){let e,t;return new Promise(n=>{let i=i=>{i.loaded&&i.session.user&&(e=i.session.user,n(i.session.user),t&&t())};i(A.getState()),e||(t=A.subscribe(i))})}function B(){return new Promise((e,t)=>{$().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function z(e,t){return T(y(h,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function P(e,t,n){return n||(n=new AbortController),await y(`${f}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),C()}function T(e){return new Promise((t,n)=>{e.then(e=>{let i;"object"==typeof e?.data?(i={loaded:!0,session:e.data},A.setState(i),t(i)):(i={loaded:!1,session:null},A.setState(i),n(i))}).catch(e=>{(0,i.N)(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};A.setState(t),n(t)})})}function M(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}A.subscribe(e=>{e.loaded&&e.session&&x(e.session)});let O={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function F(){(0,l.T0)("@openmrs/esm-api",p),C()}},13070:function(e,t,n){"use strict";function i(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(n){return 0==arguments.length||i(n)?t:e.apply(this,arguments)}}function a(e){return function t(n,a){switch(arguments.length){case 0:return t;case 1:return i(n)?t:r(function(t){return e(n,t)});default:return i(n)&&i(a)?t:i(n)?r(function(t){return e(t,a)}):i(a)?r(function(t){return e(n,t)}):e(n,a)}}}function o(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function s(e,t,n){for(var i=0,r=n.length;i<r;){if(e(t,n[i]))return!0;i+=1}return!1}function l(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,{Gt:()=>ey,GV:()=>e_,Rt:()=>Z,YP:()=>et,hs:()=>Q,T0:()=>ef,Nc:()=>V,ZU:()=>L,td:()=>ev,qG:()=>ej,GI:()=>er,FL:()=>em,g$:()=>es,H:()=>X,zj:()=>eb,mq:()=>eA,gU:()=>eR,tN:()=>el,P0:()=>eo,IS:()=>ee,UY:()=>ea,Nh:()=>eO,kl:()=>eh,vu:()=>ei,r4:()=>eN,yL:()=>eL,y$:()=>eV,G9:()=>en,ks:()=>eg});let c="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var u,p,d,f,m=Object.prototype.toString,h=function(){return"[object Arguments]"===m.call(arguments)?function(e){return"[object Arguments]"===m.call(e)}:function(e){return l("callee",e)}}(),g=!({toString:null}).propertyIsEnumerable("toString"),y=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],b=function(){return arguments.propertyIsEnumerable("length")}(),v=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},A="function"!=typeof Object.keys||b?r(function(e){if(Object(e)!==e)return[];var t,n,i=[],r=b&&h(e);for(t in e)l(t,e)&&(!r||"length"!==t)&&(i[i.length]=t);if(g)for(n=y.length-1;n>=0;)l(t=y[n],e)&&!v(i,t)&&(i[i.length]=t),n-=1;return i}):r(function(e){return Object(e)!==e?[]:Object.keys(e)}),w=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function $(e,t,n,i){var r=o(e);function a(e,t){return k(e,t,n.slice(),i.slice())}return!s(function(e,t){return!s(a,t,e)},o(t),r)}function k(e,t,n,i){if(c(e,t))return!0;var r,a=w(e);if(a!==w(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(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(null==(r=String(e.constructor).match(/^function (\w*)/))?"":r[1]))return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&c(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!c(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 o=n.length-1;o>=0;){if(n[o]===e)return i[o]===t;o-=1}switch(a){case"Map":if(e.size!==t.size)return!1;return $(e.entries(),t.entries(),n.concat([e]),i.concat([t]));case"Set":if(e.size!==t.size)return!1;return $(e.values(),t.values(),n.concat([e]),i.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 s=A(e);if(s.length!==A(t).length)return!1;var u=n.concat([e]),p=i.concat([t]);for(o=s.length-1;o>=0;){var d=s[o];if(!(l(d,t)&&k(t[d],e[d],u,p)))return!1;o-=1}return!0}var x=a(function(e,t){return k(e,t,[],[])});function C(e){return function t(n,o,s){switch(arguments.length){case 0:return t;case 1:return i(n)?t:a(function(t,i){return e(n,t,i)});case 2:return i(n)&&i(o)?t:i(n)?a(function(t,n){return e(t,o,n)}):i(o)?a(function(t,i){return e(n,t,i)}):r(function(t){return e(n,o,t)});default:return i(n)&&i(o)&&i(s)?t:i(n)&&i(o)?a(function(t,n){return e(t,n,s)}):i(n)&&i(s)?a(function(t,n){return e(t,o,n)}):i(o)&&i(s)?a(function(t,i){return e(n,t,i)}):i(n)?r(function(t){return e(t,o,s)}):i(o)?r(function(t){return e(n,t,s)}):i(s)?r(function(t){return e(n,o,t)}):e(n,o,s)}}}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}var D=C(function(e,t,n){var i,r={};for(i in n=n||{},t=t||{})l(i,t)&&(r[i]=l(i,n)?e(i,t[i],n[i]):t[i]);for(i in n)l(i,n)&&!l(i,r)&&(r[i]=n[i]);return r}),S=C(function e(t,n,i){return D(function(n,i,r){return E(i)&&E(r)?e(t,i,r):t(n,i,r)},n,i)}),B=a(function(e,t){return S(function(e,t,n){return n},e,t)}),z=a(function(e,t){for(var n={},i={},r=0,a=e.length;r<a;)i[e[r]]=1,r+=1;for(var o in t)i.hasOwnProperty(o)||(n[o]=t[o]);return n}),P=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),i=this.map[n];i||(this.map[n]=i=[]),i.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],i=0;i<n.length;i+=1){var r=n[i];if(r[0]===e)return r[1]}return}var a=this.hash(e),n=this.map[a];if(n)for(var i=0;i<n.length;i+=1){var r=n[i];if(r[0]===e)return r[1]}},e}(),T=r(function(e){return null!=e&&"function"==typeof e.clone?e.clone():function e(t,n,i){if(i||(i=new P),a=typeof(r=t),null==r||"object"!=a&&"function"!=a)return t;var r,a,o=function(r){var a=i.get(t);if(a)return a;for(var o in i.set(t,r),t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=n?e(t[o],!0,i):t[o]);return r};switch(w(t)){case"Object":return o(Object.create(Object.getPrototypeOf(t)));case"Array":return o(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.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 t.slice();default:return t}}(e,!0)});let M=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var O=r(function(e){return!!M(e)||!!e&&"object"==typeof e&&"[object String]"!==Object.prototype.toString.call(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}),F="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",I=a(function(e,t){var n=e.length,i=function(){return e.apply(t,arguments)};switch(n){case 0:return function(){return i.apply(this,arguments)};case 1:return function(e){return i.apply(this,arguments)};case 2:return function(e,t){return i.apply(this,arguments)};case 3:return function(e,t,n){return i.apply(this,arguments)};case 4:return function(e,t,n,r){return i.apply(this,arguments)};case 5:return function(e,t,n,r,a){return i.apply(this,arguments)};case 6:return function(e,t,n,r,a,o){return i.apply(this,arguments)};case 7:return function(e,t,n,r,a,o,s){return i.apply(this,arguments)};case 8:return function(e,t,n,r,a,o,s,l){return i.apply(this,arguments)};case 9:return function(e,t,n,r,a,o,s,l,c){return i.apply(this,arguments)};case 10:return function(e,t,n,r,a,o,s,l,c,u){return i.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}}),N=(u=function(e,t,n){for(var i=0,r=n.length;i<r;){if((t=e["@@transducer/step"](t,n[i]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}i+=1}return e["@@transducer/result"](t)},p=function(e,t,n,i){return e["@@transducer/result"](n[i](I(e["@@transducer/step"],e),t))},d=function(e,t,n){for(var i=n.next();!i.done;){if((t=e["@@transducer/step"](t,i.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}i=n.next()}return e["@@transducer/result"](t)},function(e,t,n){if(O(n))return u(e,t,n);if(null==n)return t;if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[F])return d(e,t,n[F]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw TypeError("reduce: list must be array or iterable")}),j=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw 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}(),R=C(function(e,t,n){return N("function"==typeof e?new j(e):e,t,n)}),L=((f={}).Array="Array",f.Boolean="Boolean",f.ConceptUuid="ConceptUuid",f.Number="Number",f.Object="Object",f.String="String",f.UUID="UUID",f.PersonAttributeTypeUuid="PersonAttributeTypeUuid",f.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",f);function V(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let H=V(e=>Array.isArray(e),"must be an array"),G=V(e=>"boolean"==typeof e,"must be a boolean"),U=V(e=>"number"==typeof e,"must be a number"),q=V(e=>"string"==typeof e,"must be a string"),W=V(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),K=V(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 Y=n(467),J=n(90108);let Z=(0,Y.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),X=(0,Y.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});X.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});let Q=(0,Y.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function ee(e){return(0,Y.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function et(){return(0,Y.jf)("config-extension-slots",{slots:{}})}function en(e){return ei(et().getState(),e)}function ei(e,t){return e.slots[t]??{loaded:!1,config:{}}}function er(){return(0,Y.jf)("config-extensions",{configs:{}})}function ea(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let n=er(),i=n=>n.configs[e]?.[t];return{getInitialState:()=>i(n.getInitialState()),getState:()=>i(n.getState())??{loaded:!1,config:null},setState(i,r=!1){n.setState(n=>{n.configs[e]||(n.configs[e]={});let a="function"==typeof i?i(n.configs.slotName[t]):i;return r?n.configs[e][t]=Object.assign({},a):n.configs[e][t]=Object.assign({},n.configs[e][t],a),n})},subscribe:e=>n.subscribe((t,n)=>{let r=i(t),a=i(n);(0,J.b)(r,a)||e(r,a)}),destroy(){}}}function eo(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function es(e,t,n){return e.configure?.[n]??null}let el=(0,Y.Zd)("config-implementer-tools",{config:{}});function ec(e,t){for(let n of Object.keys(e.schemas)){let i=ee(n);if(e.moduleLoaded[n]){let r=function(e,t,n){let i=t.schemas[e],r=ek(e,ew(t,n));eC(i,r,e);let a=eB(i,r);return eE(i,a,e),delete a.extensionSlots,a}(n,e,t);i.setState({translationOverridesLoaded:!0,loaded:!0,config:r})}else{let r=function(e,t,n){let i=eB(eI,ek(e,ew(t,n)));return eE(eI,i,e),delete i.extensionSlots,i}(n,e,t);i.setState({translationOverridesLoaded:!0,loaded:!1,config:r})}}}function eu(e,t){let n,i,r=Object.fromEntries(Object.entries((function(e){for(let[t,n]of Object.entries(e))for(let[e,i]of Object.entries(n))!function(e,t,n){let i=`${t}.extensionSlots.${n}`,r=`Extension slot config '${i}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&eM(i,r+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||eM(i,r+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||eM(i,r+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||eM(i,r+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!eP(e.configure)&&eM(i,r+".configure' is invalid. Must be an object with extension IDs for keys")}(i,t,e)}(i=Object.keys(n=ex(ew(e,t))).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{})),Object.keys(i).reduce((e,t)=>e={...e,...i[t]},{}))).map(([e,t])=>[e,{loaded:!0,config:t}])),a=et(),o=a.getState(),s={slots:{...o.slots,...r}};x(o,s)||a.setState(s)}function ep(e,t){let n=function(e,t){let n=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:eP(t)?Object.keys(t).reduce((n,i)=>(n[i]=e(t[i]),n),{}):{}}(T(e.schemas));for(let[i,r]of[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]])n=ex([n,function e(t,n){return eP(t)?Object.keys(t).reduce((i,r)=>(i[r]=e(t[r],n),i),{}):{_value:t,_source:n}}(i,r)]);return n}(e,t);el.setState({config:n})}function ed(e,t,n){let i={};for(let r of t.mountedExtensions){let t=function(e,t,n,i,r,a){let o=function(e){let[t]=e.split("#");return t}(i),s=r.schemas[o],l=s?o:t,c=ew(r,a),u=ek(e,c),p=u?.extensionSlots?.[n]?.configure?.[i]??{},d=ex([ek(l,c),p]),f=s??r.schemas[t];eC(f,d,l);let m=eB(f,d);return eE(f,m,l),delete m.extensionSlots,m}(r.slotModuleName,r.extensionModuleName,r.slotName,r.extensionId,e,n);i[r.slotName]={...i[r.slotName],[r.extensionId]:{config:t,loaded:!0}}}er().setState({configs:i})}function ef(e,t){e$(e,t);let n=B(t,eI);Z.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function em(e){Z.setState(t=>({...t,schemas:{...t.schemas,[e]:eI}}))}function eh(e){Z.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function e_(e){Z.setState(t=>({...t,schemas:{...t.schemas,[e]:eF}}))}function eg(e,t){e$(e,t);let n=B(t,eI);Z.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.`),Z.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function ey(e,t="provided"){Z.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function eb(e){return new Promise(t=>{let n=ee(e);function i(e){e.loaded&&e.config&&(t(z(["Display conditions","Translation overrides"],e.config)),r&&r())}i(n.getState());let r=n.subscribe(i)})}function ev(e,t,n){let i=[new Promise(t=>{let n=ee(e);function i(e){e.translationOverridesLoaded&&e.config&&(t(e.config["Translation overrides"]??{}),r&&r())}i(n.getState());let r=n.subscribe(i)})];return t&&n&&i.push(new Promise(e=>{let i=ea(t,n);function r(t){t.loaded&&t.config&&(e(t.config["Translation overrides"]??{}),a&&a())}r(i.getState());let a=i.subscribe(r)})),Promise.all(i)}function eA(e,t,n){eC(e,t,n);let i=eB(e,t);return eE(e,i,n),i}function ew(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function e$(e,t,n=""){let i="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let r of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=n+(n&&".")+r,o=t[r];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${i}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${i}`),!eP(o)){console.error(`${e} has bad config schema definition for key '${a}'. ${i}`);continue}o.hasOwnProperty("_default")||e$(e,o,a);let s=o._elements;if(ez(s)&&e$(e,s,a+"._elements"),o._validators)for(let t of o._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${i}.
|
|
@@ -18,5 +18,5 @@ If you're the maintainer: all config elements must have a default. Received ${JS
|
|
|
18
18
|
If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function ek(e,t){return ex(t.map(({[e]:t})=>t).filter(e=>!!e))}function ex(e){return R(B)({},e)}function eC(e,t,n=""){for(let i of Object.keys(t)){let r=t[i],a=n+"."+i,o=e[i];if(!e.hasOwnProperty(i)){("extensionSlots"!==i||""===n)&&eM(a,`Unknown config key '${a}' provided. Ignoring.`);continue}(function e(t,n,i){eD(i,t._type,n),eP(n)?t._type===L.Object?function(t,n,i){if(t._elements)for(let r of Object.keys(n)){let a=n[r];e(t._elements,a,`${i}.${r}`)}}(t,n,i):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||eC(t,n,i):t._type===L.Array&&function(t,n,i){if(eD(i,L.Array,n)){if(ez(t._elements))for(let r=0;r<n.length;r++)e(t._elements,n[r],`${i}[${r}]`);for(let e=0;e<n.length;e++)eD(`${i}[${e}]`,t._elements?._type,n[e])}}(t,n,i)})(o,r,a)}}ec(Z.getState(),X.getState()),Z.subscribe(e=>ec(e,X.getState())),X.subscribe(e=>ec(Z.getState(),e)),ep(Z.getState(),X.getState()),Z.subscribe(e=>ep(e,X.getState())),X.subscribe(e=>ep(Z.getState(),e)),eu(Z.getState(),X.getState()),Z.subscribe(e=>eu(e,X.getState())),X.subscribe(e=>eu(Z.getState(),e)),ed(Z.getState(),Q.getState(),X.getState()),Z.subscribe(e=>{ed(e,Q.getState(),X.getState())}),Q.subscribe(e=>{ed(Z.getState(),e,X.getState())}),X.subscribe(e=>{ed(Z.getState(),Q.getState(),e)});function eE(e,t,n=""){if(e){if(t!==e._default&&eS(n,e._validators,t),eP(t))for(let i of Object.keys(t)){let r=t[i],a=n+"."+i,o=e[i];e._type===L.Object&&e._elements?eE(e._elements,r,a):eE(o,r,a)}else if(Array.isArray(t)&&e._elements)for(let i=0;i<t.length;i++)eE(e._elements,t[i],`${n}[${i}]`)}}function eD(e,t,n){return!t||eS(e,[{Array:H,Boolean:G,ConceptUuid:K,Number:U,Object:W,String:q,UUID:K,PersonAttributeTypeUuid:K,PatientIdentifierTypeUuid:K}[t]],n)}function eS(e,t,n){let i=!0;if(t)try{for(let r of t){let t=r(n);if("string"==typeof t){let r="object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`;eM(e,r),i=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
|
|
19
19
|
${t}`)}return i}let eB=(e,t)=>{let n=T(t);if(!e)return n;for(let t of Object.keys(e)){let i=n[t],r=e[t];if(r&&(r.hasOwnProperty("_type")||r.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=r._default);let e=r._elements;if(i&&ez(e)){if(r._type===L.Array&&Array.isArray(i)){let r=i.map(t=>eB(e,t));n[t]=r}else if(r._type===L.Object)for(let t of Object.keys(i))i[t]=eB(e,i[t])}}else if(eP(r)){let e=i??{};eP(e)&&(n[t]=eB(r,e))}}return n};function ez(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function eP(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let eT=new Set;function eM(e,t){let n=`${e}:::${t}`;eT||(eT=new Set),eT.has(n)||(console.error(t),eT.add(n))}function eO(e){e?eT.forEach(t=>{t.startsWith(e)&&eT.delete(t)}):eT.clear()}let eF={"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:L.Object,_default:{},_validators:[V(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`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: ${t.join(", ")}.`})]}},eI={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:L.Array,_default:[]}},...eF},eN=(e,t)=>V(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),ej=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return V(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,i=n.exec(e);for(;i;){if(!t.includes(i[1]))return!1;i=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},eR=ej([]),eL=e=>V(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),eV={inRange:eN,isUrl:eR,isUrlWithTemplateParameters:ej,oneOf:eL}},30924:function(e,t,n){"use strict";n.d(t,{hG:()=>d,dx:()=>x,Bv:()=>l,Pu:()=>b,Vs:()=>g,cD:()=>c,KU:()=>s,BX:()=>S,Ds:()=>z,DK:()=>M,BR:()=>T,xL:()=>P,E$:()=>h,Rb:()=>E,SY:()=>u,NH:()=>B,Cj:()=>C,Qx:()=>y,Zu:()=>o});var i,r,a=n(70937);let o=`${a.Jj}/attachment`;function s(e,t){return(0,a.lo)(`${o}/${e}`,{signal:t.signal})}function l(e,t,n){return(0,a.lo)(`${o}?patient=${e}&includeEncounterless=${t}`,{signal:n.signal})}async function c(e,t){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),(0,a.lo)(`${o}`,{method:"POST",body:n})}function u(e,t){return(0,a.lo)(`${o}/${e}`,{method:"DELETE",signal:t.signal})}var p=n(54328);async function d(e,t,n=!0){if(e){let i=null,[r,o]=await Promise.all([(0,a.lo)(`${a.IU}/Patient/${e}`,t).catch(e=>i=e),n?f(e):Promise.resolve(null)]);if(r.ok)return r.data;if(o)return o;if(i)throw i}return null}async function f(e){let t=(await (0,p.pb)("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}var m=n(99549);function h(e){return{uuid:e.uuid,display:e.display}}function g(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let i=n.toString(),r=`${a.Jj}/location${i?"?"+i:""}`;return(0,a.ut)(r).pipe((0,m.map)(e=>e.data.results.map(h))).pipe((0,m.take)(1))}function y(e){return{uuid:e.uuid,display:e.display,name:e.name}}function b(){return(0,a.ut)(`${a.Jj}/visittype`).pipe((0,m.map)(e=>e.data.results.map(y))).pipe((0,m.take)(1))}var v=n(467),A=n(32505),w=n(60482),$=n(20320),k=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return A.C6(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new $.P},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(w.B7),x=((i={}).NEWVISIT="startVisit",i.EDITVISIT="editVisit",i.LOADING="loadingVisit",i),C=((r={}).NOTSTARTED="notStarted",r.ONGOING="ongoing",r);let E="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",D=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function S(){return(0,v.jf)("visit",D)}function B(e,t){S().setState({patientUuid:e,manuallySetVisitUuid:t})}function z(e,t){return(0,a.lo)(`${a.Jj}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function P(e,t,n){return(0,a.lo)(`${a.Jj}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function T(e,t,n){return(0,a.lo)(`${a.Jj}/visit?patient=${e}&v=${n??E}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}S().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let M=new k(null)},64201:function(e,t,n){"use strict";n.d(t,{J:()=>a,N:()=>r});var i=n(27760);function r(e){let t=o(e);setTimeout(()=>{throw t})}function a(){let e=Error();return t=>{let n=o(t);n.stack+=`
|
|
20
20
|
Async stacktrace:
|
|
21
|
-
${e.stack}`,r(t)}}function o(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)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,i.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},6250:function(e,t,n){"use strict";n.d(t,{dX:()=>u,wE:()=>m,_3:()=>o,uN:()=>f,$F:()=>p,Gz:()=>c,eb:()=>l,Sj:()=>d,mv:()=>s,PQ:()=>i.A});var i=n(60950);let r="ArrowFunctionExpression";var a=n(74339);function o(e,t={}){return d(e,t,h)}async function s(e,t={}){return f(e,t,h)}function l(e,t={}){return d(e,t,g)}function c(e,t={}){return f(e,t,g)}function u(e,t={}){return d(e,t,y)}function p(e,t={}){return f(e,t,y)}function d(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;null==t&&(t={});let r=A(t,a.z),o=b("string"==typeof e?(0,i.A)(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function f(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);null==t&&(t={});let r=A(t,a.f);return Promise.resolve(b("string"==typeof e?(0,i.A)(e):e,r)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function m(e){return(0,i.A)(e)}function h(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function g(e){return"boolean"==typeof e}function y(e){return"number"==typeof e}function b(e,t){switch(e.type){case"UnaryExpression":var n,i,r,a,o,s,l,c,u,p,d,f,m=e,h=t;let g=b(m.argument,h);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var y=e,A=t;let x=b(y.left,A),C=b(y.right,A);switch(y.operator){case"+":return x+C;case"-":return x-C;case"*":return x*C;case"/":return x/C;case"%":return x%C;case"**":return x**C;case"==":return x==C;case"===":return x===C;case"!=":return x!=C;case"!==":return x!==C;case">":return x>C;case">=":return x>=C;case"<":return x<C;case"<=":return x<=C;case"in":return x in C;case"&&":return x&&C;case"||":return x||C;case"??":return x??C;default:throw`Expression evaluator does not support operator '${y.operator}' operator`}case"ConditionalExpression":return n=e,i=t,b(n.test,i)?b(n.consequent,i):b(n.alternate,i);case"CallExpression":var E=e,D=t;let S=E.arguments?.map(w(D)),B=b(E.callee,D);if(B){if("function"!=typeof B)throw`${k(E.callee)} is not a function`}else throw`No function named ${k(E.callee)} is defined in this context`;return B(...S);case"ArrowFunctionExpression":let z;return r=e,a=t,z=r.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<z.length)throw`Required argument(s) ${z.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(z.reduce((t,n,i)=>{let r=e[i];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(r)&&t.push([n,r]),t},[]));return b(r.body,a.addVariables(t))}).bind(a.thisObj??null);case"MemberExpression":return function(e,t){let n,i=b(e.object,t);if(void 0===i)switch(e.object.type){case"Identifier":{let n=v(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":{let n=v(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${n}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let r=i;if("string"==typeof i)r=String.prototype;else if("number"==typeof i)r=Number.prototype;else if("function"==typeof i);else if("object"!=typeof i)throw`VisitMemberExpression does not support member access on type ${typeof i}`;switch(t.thisObj=r,e.property.type){case"Identifier":case"MemberExpression":n=b(e.property,t);break;default:{let r=b(e.property,t);if(void 0===r)throw{type:"Illegal property access",message:"No property was supplied to the property access"};$(r),n=i[r]}}return"function"==typeof n?n.bind(i):n}(e,t);case"ArrayExpression":return o=e,s=t,o.elements?.map(w(s));case"SequenceExpression":let P;return l=e,c=t,(P=l.expressions.map(w(c)))[P.length-1];case"NewExpression":var T=e,M=t;if(T.callee&&"Identifier"===T.callee.type){let e=T.arguments?.map(w(M));switch(T.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${T.callee.name}`}}if(T.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return $((u=e).value),u.value;case"Identifier":var O=e,F=t;$(O.name);let I=F.thisObj;if(I&&("object"==typeof I||"function"==typeof I)&&O.name in I){let e=I[O.name];return $(e),e}if(F.variables&&O.name in F.variables){let e=F.variables[O.name];return $(e),e}return O.name in F.globals?F.globals[O.name]:void 0;case"TemplateLiteral":let N,j;return p=e,d=t,N=p.expressions?.map(w(d))??[],(j=p.quasis?.map(w(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+N.join("")+j.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function v(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return v(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function A(e,t){let n={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}function w(e){return function(t){return null===t?null:b(t,e)}}function $(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function k(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}i.A.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:r,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=r,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),i.A.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let i=t.node;for(;i.type===e.MEMBER_EXP||i.type===e.CALL_EXP&&i.callee.type===e.MEMBER_EXP;)i=i.type===e.MEMBER_EXP?i.object:i.callee.object;i.type="NewExpression"}})}}),i.A.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(t){let n=this.index,i="",r=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:i+=this.expr.charAt(this.index++)};r(),this.code===e.PERIOD_CODE&&(i+=this.expr.charAt(this.index++),r());let a=this.char;("e"===a||"E"===a)&&(i+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(i+=this.expr.charAt(this.index++)),r(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+i+this.char+")"));let o=this.code;if(e.isIdentifierStart(o))this.throwError("Variable names cannot start with a number ("+i+this.char+")");else if(o===e.PERIOD_CODE){i.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:o,number:i},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(i),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(i){if(48===this.code){var r,a,o;let s=this.index,l=this.expr.charAt(this.index+1),c=t.call(this,l);if(!c)return;let u="";for(;r=this.code,a=c,95===r||a.some(([e,t])=>r>=e&&r<=t);)95===this.code?this.index++:u+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,n.call(this,i);return}this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(u,"x"===(o=l)||"X"===o?16:"b"===o||"B"===o?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,i)})}}),i.A.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,i=!1;for(;this.index<this.expr.length;){if(47===this.code&&!i){let i,r=this.expr.slice(n,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{i=new RegExp(r,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?i=!0:i&&this.code===e.CBRACK_CODE&&(i=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),i.A.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:i,alternate:r},n.operator&&e.binary_ops[n.operator]<=.9){let i=n;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),i.A.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},i="",r="",a=!1,o=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:r,cooked:i},tail:a});for(;this.index<o;){let o=this.expr.charAt(++this.index);if("`"===o)return this.index+=1,a=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===o&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),r="",i="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===o)switch(r+=o,o=this.expr.charAt(++this.index),r+=o,o){case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+=" ";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;default:i+=o}else i+=o,r+=o}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),i.A.addBinaryOp("in",7),i.A.addBinaryOp("??",1)},74339:function(e,t,n){"use strict";n.d(t,{f:()=>r,z:()=>i});let i={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},r={...i,Promise}},11621:function(e,t,n){"use strict";n.d(t,{xg:()=>er,zx:()=>ed,ES:()=>ei,FY:()=>ef,zF:()=>K,wG:()=>ez,Xb:()=>eE,Ef:()=>H,io:()=>ex,Fg:()=>ev,dO:()=>V,VK:()=>eo,Vx:()=>e_,sr:()=>eg,DQ:()=>W,Tj:()=>ea,Ju:()=>eb,pm:()=>ek,cL:()=>em,Gp:()=>eh,K0:()=>es,Yo:()=>el,Q_:()=>eD,No:()=>ec,a9:()=>q});var i,r,a=n(70937),o=n(13070),s=n(6250),l=n(10201),c=n(27760),u=n(9826),p=n(75133),d=n(61098),f=n(37999),m=n(81963);let h=function(e,t,n){(void 0===n||(0,m.A)(e[t],n))&&(void 0!==n||t in e)||(0,f.A)(e,t,n)},g=function(e,t,n){for(var i=-1,r=Object(e),a=n(e),o=a.length;o--;){var s=a[++i];if(!1===t(r[s],s,r))break}return e};var y=n(13137),b=n(84934),v=n(17052),A=n(47514),w=n(17820),$=n(36820),k=n(55259),x=n(62873),C=n(75323),E=n(49885),D=n(12174),S=n(92562),B=n(43148);let z=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var P=n(51158),T=n(22678);let M=function(e,t,n,i,r,a,o){var s=z(e,n),l=z(t,n),c=o.get(l);if(c)return void h(e,n,c);var u=a?a(s,l,n+"",e,t,o):void 0,p=void 0===u;if(p){var d=(0,$.A)(l),f=!d&&(0,C.A)(l),m=!d&&!f&&(0,B.A)(l);(u=l,d||f||m)?(0,$.A)(s)?u=s:(0,x.A)(s)&&(0,k.A)(s)?u=(0,v.A)(s):f?(p=!1,u=(0,y.A)(l,!0)):m?(p=!1,u=(0,b.A)(l,!0)):u=[]:(0,S.A)(l)||(0,w.A)(l)?(u=s,(0,w.A)(s))?u=(0,P.A)(s,(0,T.A)(s)):(!(0,D.A)(s)||(0,E.A)(s))&&(u=(0,A.A)(l)):p=!1}p&&(o.set(l,u),r(u,l,i,a,o),o.delete(l)),h(e,n,u)},O=function e(t,n,i,r,a){t!==n&&g(n,function(o,s){if(a||(a=new d.A),(0,D.A)(o))M(t,n,s,i,e,r,a);else{var l=r?r(z(t,s),o,s+"",t,n,a):void 0;void 0===l&&(l=o),h(t,s,l)}},T.A)};var F=n(68527),I=n(54979),N=n(44168),j=n(27322);let R=function(e,t,n){if(!(0,D.A)(n))return!1;var i=typeof t;return("number"==i?!!((0,k.A)(n)&&(0,j.A)(t,n.length)):"string"==i&&t in n)&&(0,m.A)(n[t],e)};var L=(i=function(e,t,n){O(e,t,n)},r=function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=i.length>3&&"function"==typeof a?(r--,a):void 0,o&&R(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var s=t[n];s&&i(e,s,n,a)}return e},(0,N.A)((0,I.A)(r,void 0,F.A),r+""));function V(e=!0,t=!1){return H((0,u.s)(),e,t)}function H(e,t=!0,n=!1){return!!(e?t:n)}var G=n(467);let U=(0,G.Zd)("extensionsInternal",{slots:{},extensions:{}}),q=()=>(0,G.jf)("extensionsInternal",{slots:{},extensions:{}});function W(e){let t=U.getState(),n=e(t);n!==t&&U.setState(n)}let K=()=>(0,G.jf)("extensions",{slots:{}});function Y(e){let t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,p.A)(o.hs.getState().mountedExtensions,t)||o.hs.setState({mountedExtensions:t})}Y(U.getState()),U.subscribe(Y);let J=q(),Z=K(),X=(0,o.YP)(),Q=(0,o.GI)();function ee(e,t,n,i,r){let a={},s=(0,u.s)(),l=Object.entries(i.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[i,c]of Object.entries(e.slots)){let{config:u}=(0,o.vu)(t,c.name),p=ep(i,e,u,n,l,s,r.session);a[i]={moduleName:c.moduleName,assignedExtensions:p}}(0,p.A)(Z.getState().slots,a)||Z.setState({slots:a})}function et(){ee(J.getState(),X.getState(),Q.getState(),l.jX.getState(),a.eA.getState())}function en(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function ei(e){let[t]=e.split("#");return t}function er(e,t){let n=ei(t);return e.extensions[n]}function ea(e){return er(J.getState(),e)}J.subscribe(e=>{ee(e,X.getState(),Q.getState(),l.jX.getState(),a.eA.getState())}),X.subscribe(e=>{ee(J.getState(),e,Q.getState(),l.jX.getState(),a.eA.getState())}),Q.subscribe(e=>{ee(J.getState(),X.getState(),e,l.jX.getState(),a.eA.getState())}),l.jX.subscribe(e=>{ee(J.getState(),X.getState(),Q.getState(),e,a.eA.getState())}),a.eA.subscribe(e=>{ee(J.getState(),X.getState(),Q.getState(),l.jX.getState(),e)}),et(),(0,c.gj)(et);let eo=e=>J.setState(t=>(t.extensions[e.name]={...e,instances:[]},t));function es(e,t){W(n=>{let i=n.slots[e];return i?{...n,slots:{...n.slots,[e]:{...i,attachedIds:[...i.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...en(e),attachedIds:[t]}}}})}function el(e,t){W(n=>{let i=n.slots[e];return i&&i.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...i,attachedIds:i.attachedIds.filter(e=>e!==t)}}}:n})}function ec(e){W(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function eu(e,t,n,i){let r=t.indexOf(e);if(-1!==r)return r;{if(void 0!==n)return 1e3+n;let t=i.indexOf(e);return -1!==t?2e3+t:-1}}function ep(e,t,n,i,r,l,c){let u=function(e,t){let n=e.add||[],i=e.remove||[],r=e.order||[],{extensions:a}=J.getState();return[...t,...n].filter(e=>!i.includes(e)).sort((e,n)=>{let i=eu(e,r,a[ei(e)]?.order,t),o=eu(n,r,a[ei(n)]?.order,t);return -1===o?-1:-1===i?1:i-o})}(n,t.slots[e].attachedIds),p=[];for(let d of u){let{config:u}=(0,o.P0)(i,e,d),f=L(u,(0,o.g$)(n,e,d)),m=ei(d),h=t.extensions[m];if(h){let e=f?.["Display conditions"]?.privileges??h.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!c?.user||!(0,a.st)(e,c.user)))continue;let t=f?.["Display conditions"]?.expression??null;if(null!==t)try{if(!(0,s.eb)(t,{session:c}))continue}catch(e){console.error(`Error while evaluating expression ${t}`,e);continue}if(h.featureFlag&&!r.includes(h.featureFlag)||window.offlineEnabled&&!H(l,h.online,h.offline))continue;p.push({id:d,name:m,moduleName:h.moduleName,config:f,featureFlag:h.featureFlag,meta:h.meta,online:f?.["Display conditions"]?.online??h.online??!0,offline:f?.["Display conditions"]?.offline??h.offline??!1})}}return p}function ed(e){let t=J.getState(),{config:n}=(0,o.G9)(e),i=Q.getState(),r=l.jX.getState(),s=a.eA.getState(),c=(0,u.s)();return ep(e,t,n,i,Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),c,s.session)}let ef=(e,t)=>J.setState(n=>{let i=n.slots[t]?.moduleName;if(i&&i!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${i}.`),n;if(i&&i==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let r=en(t,e);return{...n,slots:{...n.slots,[t]:r}}}),em=()=>Z.setState(()=>({slots:{},extensions:{}})),eh=(0,G.Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function e_({name:e,basePath:t,mode:n,componentContext:i}){eh.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:i})}function eg(e){eh.getState().slotName===e&&eh.setState(eh.getInitialState(),!0)}let ey=(0,G.Zd)("modalRegistry",{modals:{}});function eb(e){ey.setState(t=>(t.modals[e.name]=e,t))}function ev(e){let t=ey.getState().modals[e];if(!t){let n=ea(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),eb(t))}return t}var eA=n(61836);let ew=(0,G.Zd)("workspaceRegistrations",{workspaces:{}}),e$=(0,G.Zd)("workspaceGroups",{workspaceGroups:{}});function ek(e){ew.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function ex(e){e$.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let eC=new Set;function eE(e){let t=ew.getState().workspaces;if(t[e])return t[e];{let t=ea(e);if(t){var n;let i;return eC.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),eC.add(e)),{name:t.name,title:(n=t,"string"==typeof(i=n?.meta?.title)?i:i&&"object"==typeof i?(0,eA.t)(n.moduleName,i.key,i.default):n.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function eD(e){let t=e$.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}var eS=n(22956);let eB=0;async function ez(e,t,n,i,r=e=>e,a={}){let o=ei(i),s=ea(i),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${o}' to attach to '${t}'`);let{meta:c,moduleName:u,online:p,offline:d,load:f}=s;if(V(p,d)){W(r=>({...r,extensions:{...r.extensions,[o]:{...r.extensions[o],instances:[...r.extensions[o].instances,{domElement:e,id:i,slotName:t,slotModuleName:n}]}}}));let s=await f(),p=eB++;l=(0,eS.xL)(r({...s,name:`${t}/${o}-${p}`}),{...a,_meta:c,_extensionContext:{extensionId:i,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:u},domElement:e})}}else console.warn(`Tried to render ${i} into ${t} but no DOM element was available.`);return l}},27760:function(e,t,n){"use strict";n.d(t,{$3:()=>g,FI:()=>m,LQ:()=>h,Vt:()=>y,Yt:()=>r,bJ:()=>b,bK:()=>v,dX:()=>A,ff:()=>c,gj:()=>a,ls:()=>w,pc:()=>l,sT:()=>o});let i="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(i,{detail:{online:e}}))}function a(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(i,t),()=>window.removeEventListener(i,t)}function o(e){return e({online:!window.offlineEnabled||navigator.onLine}),a(e)}let s="openmrs:precache-static-dependencies";function l(e={}){window.dispatchEvent(new CustomEvent(s,{detail:e}))}function c(e){let t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}let u="openmrs:notification-shown",p="openmrs:actionable-notification-shown",d="openmrs:toast-shown",f="openmrs:snack-bar-shown";function m(e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function g(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function b(e){let t=t=>e(t.detail);return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}function v(e){let t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function w(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}},17744:function(e,t,n){"use strict";function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function r(e){return e&&e.sensitive?"":"i"}function a(e,t,n){if(e instanceof RegExp){if(!t)return e;var o=e.source.match(/\((?!\?)/g);if(o)for(var s=0;s<o.length;s++)t.push({name:s,prefix:"",suffix:"",modifier:"",pattern:""});return e}return Array.isArray(e)?RegExp("(?:"+e.map(function(e){return a(e,t,n).source}).join("|")+")",r(n)):function(e,t,n){void 0===n&&(n={});for(var a=n.strict,o=void 0!==a&&a,s=n.start,l=n.end,c=n.encode,u=void 0===c?function(e){return e}:c,p="["+i(n.endsWith||"")+"]|$",d="["+i(n.delimiter||"/#?")+"]",f=void 0===s||s?"^":"",m=0;m<e.length;m++){var h=e[m];if("string"==typeof h)f+=i(u(h));else{var g=i(u(h.prefix)),y=i(u(h.suffix));if(h.pattern)if(t&&t.push(h),g||y)if("+"===h.modifier||"*"===h.modifier){var b="*"===h.modifier?"?":"";f+="(?:"+g+"((?:"+h.pattern+")(?:"+y+g+"(?:"+h.pattern+"))*)"+y+")"+b}else f+="(?:"+g+"("+h.pattern+")"+y+")"+h.modifier;else f+="("+h.pattern+")"+h.modifier;else f+="(?:"+g+y+")"+h.modifier}}if(void 0===l||l)o||(f+=d+"?"),f+=n.endsWith?"(?="+p+")":"$";else{var v=e[e.length-1],A="string"==typeof v?d.indexOf(v[v.length-1])>-1:void 0===v;o||(f+="(?:"+d+"(?="+p+"))?"),A||(f+="(?="+d+"|"+p+")")}return new RegExp(f,r(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var i=e[n];if("*"===i||"+"===i||"?"===i){t.push({type:"MODIFIER",index:n,value:e[n++]});continue}if("\\"===i){t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if("{"===i){t.push({type:"OPEN",index:n,value:e[n++]});continue}if("}"===i){t.push({type:"CLOSE",index:n,value:e[n++]});continue}if(":"===i){for(var r="",a=n+1;a<e.length;){var o=e.charCodeAt(a);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){r+=e[a++];continue}break}if(!r)throw TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:r}),n=a;continue}if("("===i){var s=1,l="",a=n+1;if("?"===e[a])throw TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;){if("\\"===e[a]){l+=e[a++]+e[a++];continue}if(")"===e[a]){if(0==--s){a++;break}}else if("("===e[a]&&(s++,"?"!==e[a+1]))throw TypeError("Capturing groups are not allowed at "+a);l+=e[a++]}if(s)throw TypeError("Unbalanced pattern at "+n);if(!l)throw TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:l}),n=a;continue}t.push({type:"CHAR",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,a=void 0===r?"./":r,o="[^"+i(t.delimiter||"/#?")+"]+?",s=[],l=0,c=0,u="",p=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=p(e);if(void 0!==t)return t;var i=n[c];throw TypeError("Unexpected "+i.type+" at "+i.index+", expected "+e)},f=function(){for(var e,t="";e=p("CHAR")||p("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=p("CHAR"),h=p("NAME"),g=p("PATTERN");if(h||g){var y=m||"";-1===a.indexOf(y)&&(u+=y,y=""),u&&(s.push(u),u=""),s.push({name:h||l++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""});continue}var b=m||p("ESCAPED_CHAR");if(b){u+=b;continue}if(u&&(s.push(u),u=""),p("OPEN")){var y=f(),v=p("NAME")||"",A=p("PATTERN")||"",w=f();d("CLOSE"),s.push({name:v||(A?l++:""),pattern:v&&!A?o:A,prefix:y,suffix:w,modifier:p("MODIFIER")||""});continue}d("END")}return s}(e,n),t,n)}n.d(t,{tA:()=>w,JK:()=>A,g4:()=>$,vf:()=>s,MY:()=>l,Wh:()=>v,qh:()=>d,lz:()=>c,D_:()=>p,JG:()=>m,oo:()=>g,zl:()=>h});let o=(0,n(467).Zd)("breadcrumbs",[]);function s(e){return l([e])}function l(e){let t=[...c(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?a(e.matcher):a(e.path),settings:e}))];o.setState(t,!0)}function c(){return o.getState()}function u(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=u(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){let n=u(e,t);if(n){let t=[n],i=u(e,n.settings.parent);for(;void 0!==i;)t.push(i),i=u(e,i.settings.parent);return t.reverse()}}return[]}function d(e){return p(c(),e)}var f=n(22956);function m(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,"");return h(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function h(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function g({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),i=m(e,t).replace(window.location.origin,"");i.startsWith(n)?(0,f.EH)(i):window.location.assign(i)}let y="openmrs:history";function b(e){let t=JSON.parse(sessionStorage.getItem(y)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(y,JSON.stringify(t))}function v(){0===JSON.parse(sessionStorage.getItem(y)??"[]").length&&document.referrer&&b(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=A();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(y,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?w({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&b(window.location.href)})}function A(){return JSON.parse(sessionStorage.getItem(y)??"[]")}function w({toUrl:e}){let t=A(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);g({to:t[n]}),sessionStorage.setItem(y,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function $(){sessionStorage.removeItem(y)}},54328:function(e,t,n){"use strict";let i,r,a;n.d(t,{nr:()=>P,xN:()=>il,u1:()=>iB,KG:()=>iM,FO:()=>ic,FE:()=>i$,LM:()=>n6,sA:()=>iy,Rs:()=>b,ff:()=>iC,wn:()=>iD,sK:()=>iO,lY:()=>iu,ms:()=>$,Zr:()=>it,WK:()=>iT,WA:()=>ik,UH:()=>v,cy:()=>ip,Gp:()=>is,jU:()=>ig,Og:()=>z,iD:()=>iw,C$:()=>io,qb:()=>iA,Iq:()=>ie,NU:()=>iE,sZ:()=>y,yD:()=>ix,Io:()=>ii,wJ:()=>B,JC:()=>w,e:()=>n2,xc:()=>ir,pb:()=>ia,bO:()=>ib,AO:()=>n7,Td:()=>iS,Gj:()=>A});try{self["workbox:window:6.5.4"]&&_()}catch(e){}function o(e,t){return new Promise(function(n){var i=new MessageChannel;i.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[i.port2])})}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var c=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function u(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var p=function(e,t){this.type=e,Object.assign(this,t)};function d(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function f(){}var m={type:"SKIP_WAITING"};function h(e,t){if(!t)return e&&e.then?e.then(f):Promise.resolve()}var g=function(e){function t(t,n){var i,r;return void 0===n&&(n={}),(i=e.call(this)||this).nn={},i.tn=0,i.rn=new c,i.en=new c,i.on=new c,i.un=0,i.an=new Set,i.cn=function(){var e=i.fn,t=e.installing;i.tn>0||!u(t.scriptURL,i.sn.toString())||performance.now()>i.un+6e4?(i.vn=t,e.removeEventListener("updatefound",i.cn)):(i.hn=t,i.an.add(t),i.rn.resolve(t)),++i.tn,t.addEventListener("statechange",i.ln)},i.ln=function(e){var t=i.fn,n=e.target,r=n.state,a=n===i.vn,o={sw:n,isExternal:a,originalEvent:e};!a&&i.mn&&(o.isUpdate=!0),i.dispatchEvent(new p(r,o)),"installed"===r?i.wn=self.setTimeout(function(){"installed"===r&&t.waiting===n&&i.dispatchEvent(new p("waiting",o))},200):"activating"===r&&(clearTimeout(i.wn),a||i.en.resolve(n))},i.dn=function(e){var t=i.hn,n=t!==navigator.serviceWorker.controller;i.dispatchEvent(new p("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:i.mn})),n||i.on.resolve(t)},r=function(e){var t=e.data,n=e.ports,r=e.source;return d(i.getSW(),function(){i.an.has(r)&&i.dispatchEvent(new p("message",{data:t,originalEvent:e,ports:n,sw:r}))})},i.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(e){return Promise.reject(e)}},i.sn=t,i.nn=n,navigator.serviceWorker.addEventListener("message",i.gn),i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n,i,r=t.prototype;return r.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var i,r,a,o=this;return i=function(){if(!n&&"complete"!==document.readyState)return h(new Promise(function(e){return window.addEventListener("load",e)}))},r=function(){return o.mn=!!navigator.serviceWorker.controller,o.yn=o.pn(),d(o.bn(),function(e){o.fn=e,o.yn&&(o.hn=o.yn,o.en.resolve(o.yn),o.on.resolve(o.yn),o.yn.addEventListener("statechange",o.ln,{once:!0}));var t=o.fn.waiting;return t&&u(t.scriptURL,o.sn.toString())&&(o.hn=t,Promise.resolve().then(function(){o.dispatchEvent(new p("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),o.hn&&(o.rn.resolve(o.hn),o.an.add(o.hn)),o.fn.addEventListener("updatefound",o.cn),navigator.serviceWorker.addEventListener("controllerchange",o.dn),o.fn})},(a=i())&&a.then?a.then(r):r(a)}catch(e){return Promise.reject(e)}},r.update=function(){try{return this.fn?h(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},r.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},r.messageSW=function(e){try{return d(this.getSW(),function(t){return o(t,e)})}catch(e){return Promise.reject(e)}},r.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&o(this.fn.waiting,m)},r.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},r.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return d(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},n=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],s(t.prototype,n),i&&s(t,i),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,void 0):void 0}}(e))){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function y(e,t){if(void 0!==a)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),a;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let n=new g(e,t);return a=n.register().then(()=>n.controlling.then(()=>n))}function b(){return a??Promise.resolve(void 0)}let v="x-omrs-offline-response-body",A="x-omrs-offline-response-status",w="x-omrs-offline-caching-strategy";async function $(e){let t=await b();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function k(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function x(){return!window.indexedDB}async function C(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function E(){return await C()||await x()||await k()}let D="openmrs3:offline-mode",S="unavailable";function B(){return{current:S,notAvailable:"unavailable"===S,active:"on"===S}}function z(e){"unavailable"!==S&&"unavailable"!==e&&(localStorage.setItem(D,"on"===e?"active":"disabled"),S=e)}async function P(){await E()||(S="active"===localStorage.getItem(D)?"on":"off"),navigator.onLine}let T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=Object.keys,O=Array.isArray;function F(e,t){return"object"!=typeof t||M(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||T.Promise||(T.Promise=Promise);let I=Object.getPrototypeOf,N={}.hasOwnProperty;function j(e,t){return N.call(e,t)}function R(e,t){"function"==typeof t&&(t=t(I(e))),("undefined"==typeof Reflect?M:Reflect.ownKeys)(t).forEach(n=>{V(e,n,t[n])})}let L=Object.defineProperty;function V(e,t,n,i){L(e,t,F(n&&j(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function H(e){return{from:function(t){return e.prototype=Object.create(t.prototype),V(e.prototype,"constructor",e),{extend:R.bind(null,e.prototype)}}}}let G=Object.getOwnPropertyDescriptor;function U(e,t){let n;return G(e,t)||(n=I(e))&&U(n,t)}let q=[].slice;function W(e,t,n){return q.call(e,t,n)}function K(e,t){return t(e)}function Y(e){if(!e)throw Error("Assertion Failed")}function J(e){T.setImmediate?setImmediate(e):setTimeout(e,0)}function Z(e,t){return e.reduce((e,n,i)=>{var r=t(n,i);return r&&(e[r[0]]=r[1]),e},{})}function X(e,t){if("string"==typeof t&&j(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],i=0,r=t.length;i<r;++i){var a=X(e,t[i]);n.push(a)}return n}var o=t.indexOf(".");if(-1!==o){var s=e[t.substr(0,o)];return null==s?void 0:X(s,t.substr(o+1))}}function Q(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Y("string"!=typeof n&&"length"in n);for(var i=0,r=t.length;i<r;++i)Q(e,t[i],n[i])}else{var a=t.indexOf(".");if(-1!==a){var o=t.substr(0,a),s=t.substr(a+1);if(""===s)void 0===n?O(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n;else{var l=e[o];l&&j(e,o)||(l=e[o]={}),Q(l,s,n)}}else void 0===n?O(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function ee(e){var t={};for(var n in e)j(e,n)&&(t[n]=e[n]);return t}let et=[].concat;function en(e){return et.apply([],e)}let ei="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(en([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>T[e]),er=ei.map(e=>T[e]);Z(ei,e=>[e,!0]);let ea=null;function eo(e){ea="undefined"!=typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let n=ea&&ea.get(t);if(n)return n;if(O(t)){n=[],ea&&ea.set(t,n);for(var i=0,r=t.length;i<r;++i)n.push(e(t[i]))}else if(er.indexOf(t.constructor)>=0)n=t;else{let i=I(t);for(var a in n=i===Object.prototype?{}:Object.create(i),ea&&ea.set(t,n),t)j(t,a)&&(n[a]=e(t[a]))}return n}(e);return ea=null,t}let{toString:es}={};function el(e){return es.call(e).slice(8,-1)}let ec="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",eu="symbol"==typeof ec?function(e){var t;return null!=e&&(t=e[ec])&&t.apply(e)}:function(){return null},ep={};function ed(e){var t,n,i,r;if(1==arguments.length){if(O(e))return e.slice();if(this===ep&&"string"==typeof e)return[e];if(r=eu(e)){for(n=[];!(i=r.next()).done;)n.push(i.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}let ef="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var em="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),eh=()=>!0;let e_=!Error("").stack;function eg(){if(e_)try{throw eg.arguments,Error()}catch(e){return e}return Error()}function ey(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(eh).map(e=>"\n"+e).join("")):""}var eb=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ev=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(eb),eA={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ew(e,t){this._e=eg(),this.name=e,this.message=t}function e$(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function ek(e,t,n,i){this._e=eg(),this.failures=t,this.failedKeys=i,this.successCount=n,this.message=e$(e,t)}function ex(e,t){this._e=eg(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=e$(e,t)}H(ew).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ey(this._e,2))}},toString:function(){return this.name+": "+this.message}}),H(ek).from(ew),H(ex).from(ew);var eC=ev.reduce((e,t)=>(e[t]=t+"Error",e),{}),eE=ev.reduce((e,t)=>{var n=t+"Error";function i(e,i){this._e=eg(),this.name=n,e?"string"==typeof e?(this.message=`${e}${i?"\n "+i:""}`,this.inner=i||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=eA[t]||n,this.inner=null)}return H(i).from(ew),e[t]=i,e},{});eE.Syntax=SyntaxError,eE.Type=TypeError,eE.Range=RangeError;var eD=eb.reduce((e,t)=>(e[t+"Error"]=eE[t],e),{}),eS=ev.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=eE[t]),e),{});function eB(){}function ez(e){return e}function eP(e,t){return null==e||e===ez?t:function(n){return t(e(n))}}function eT(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function eM(e,t){return e===eB?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var i=this.onsuccess,r=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?eT(i,this.onsuccess):i),r&&(this.onerror=this.onerror?eT(r,this.onerror):r),void 0!==a?a:n}}function eO(e,t){return e===eB?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?eT(n,this.onsuccess):n),i&&(this.onerror=this.onerror?eT(i,this.onerror):i)}}function eF(e,t){return e===eB?t:function(n){var i=e.apply(this,arguments);F(n,i);var r=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?eT(r,this.onsuccess):r),a&&(this.onerror=this.onerror?eT(a,this.onerror):a),void 0===i?void 0===o?void 0:o:F(i,o)}}function eI(e,t){return e===eB?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function eN(e,t){return e===eB?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var i=this,r=arguments.length,a=Array(r);r--;)a[r]=arguments[r];return n.then(function(){return t.apply(i,a)})}return t.apply(this,arguments)}}eS.ModifyError=ek,eS.DexieError=ew,eS.BulkError=ex;var ej={};let[eR,eL,eV]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,I(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,I(t),e]})(),eH=eL&&eL.then,eG=eR&&eR.constructor,eU=!!eV;var eq=!1,eW=eV?()=>{eV.then(tr)}:T.setImmediate?setImmediate.bind(null,tr):T.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{tr(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tr,0)},eK=function(e,t){e3.push([e,t]),eJ&&(eW(),eJ=!1)},eY=!0,eJ=!0,eZ=[],eX=[],eQ=null,e0=ez,e1={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:tD,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{tD(e[0],e[1])}catch(e){}})}},e2=e1,e3=[],e4=0,e5=[];function e6(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=eB,this._lib=!1;var t=this._PSD=e2;if(em&&(this._stackHolder=eg(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ej)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&e9(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(n=>{if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var i=t._lib&&ta();n&&"function"==typeof n.then?e(t,(e,t)=>{n instanceof e6?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,te(t)),i&&to()}},e9.bind(null,t))}catch(e){e9(t,e)}}(this,e)}let e7={get:function(){var e=e2,t=tm;function n(n,i){var r=!e.global&&(e!==e2||t!==tm);let a=r&&!ty();var o=new e6((t,o)=>{tt(this,new e8(tx(n,e,r,a),tx(i,e,r,a),t,o,e))});return em&&ti(o,this),o}return n.prototype=ej,n},set:function(e){V(this,"then",e&&e.prototype===ej?e7:{get:function(){return e},set:e7.set})}};function e8(e,t,n,i,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i,this.psd=r}function e9(e,t){if(eX.push(t),null===e._state){var n=e._lib&&ta();t=e0(t),e._state=!1,e._value=t,em&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=U(t,"stack");t._promise=e,V(t,"stack",{get:()=>eq?n&&(n.get?n.get.apply(t):n.value):e.stack})}),eZ.some(t=>t._value===e._value)||eZ.push(e),te(e),n&&to()}}function te(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)tt(e,t[n]);var r=e._PSD;--r.ref||r.finalize(),0===e4&&(++e4,eK(()=>{0==--e4&&ts()},[]))}function tt(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++e4,eK(tn,[n,e,t])}else e._listeners.push(t)}function tn(e,t,n){try{eQ=t;var i,r=t._value;t._state?i=e(r):(eX.length&&(eX=[]),i=e(r),-1===eX.indexOf(r)&&function(e){for(var t=eZ.length;t;)if(eZ[--t]._value===e._value)return void eZ.splice(t,1)}(t)),n.resolve(i)}catch(e){n.reject(e)}finally{eQ=null,0==--e4&&ts(),--n.psd.ref||n.psd.finalize()}}function ti(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function tr(){ta()&&to()}function ta(){var e=eY;return eY=!1,eJ=!1,e}function to(){var e,t,n;do for(;e3.length>0;)for(e=e3,e3=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(e3.length>0);eY=!0,eJ=!0}function ts(){var e=eZ;eZ=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=e5.slice(0),n=t.length;n;)t[--n]()}function tl(e){return new e6(ej,!1,e)}function tc(e,t){var n=e2;return function(){var i=ta(),r=e2;try{return tw(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{tw(r,!1),i&&to()}}}R(e6.prototype,{then:e7,_then:function(e,t){tt(this,new e8(null,null,e,t,e2))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):tl(e)):this.then(null,e=>e&&e.name===t?n(e):tl(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),tl(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eq=!0;var e=(function e(t,n,i){if(n.length===i)return n;var r="";if(!1===t._state){var a,o,s=t._value;null!=s?(a=s.name||"Error",o=s.message||s,r=ey(s,0)):(a=s,o=""),n.push(a+(o?": "+o:"")+r)}return em&&((r=ey(t._stackHolder,2))&&-1===n.indexOf(r)&&n.push(r),t._prev&&e(t._prev,n,i)),n})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eq=!1}}},timeout:function(e,t){return e<1/0?new e6((n,i)=>{var r=setTimeout(()=>i(new eE.Timeout(t)),e);this.then(n,i).finally(clearTimeout.bind(null,r))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&V(e6.prototype,Symbol.toStringTag,"Dexie.Promise"),e1.env=t$(),R(e6,{all:function(){var e=ed.apply(null,arguments).map(tb);return new e6(function(t,n){0===e.length&&t([]);var i=e.length;e.forEach((r,a)=>e6.resolve(r).then(n=>{e[a]=n,--i||t(e)},n))})},resolve:e=>{if(e instanceof e6)return e;if(e&&"function"==typeof e.then)return new e6((t,n)=>{e.then(t,n)});var t=new e6(ej,!0,e);return ti(t,eQ),t},reject:tl,race:function(){var e=ed.apply(null,arguments).map(tb);return new e6((t,n)=>{e.map(e=>e6.resolve(e).then(t,n))})},PSD:{get:()=>e2,set:e=>e2=e},totalEchoes:{get:()=>tm},newPSD:t_,usePSD:tk,scheduler:{get:()=>eK,set:e=>{eK=e}},rejectionMapper:{get:()=>e0,set:e=>{e0=e}},follow:(e,t)=>new e6((n,i)=>t_((t,n)=>{var i=e2;i.unhandleds=[],i.onunhandled=n,i.finalize=eT(function(){var e;e=()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])},e5.push(function t(){e(),e5.splice(e5.indexOf(t),1)}),++e4,eK(()=>{0==--e4&&ts()},[])},i.finalize),e()},t,n,i))}),eG&&(eG.allSettled&&V(e6,"allSettled",function(){let e=ed.apply(null,arguments).map(tb);return new e6(t=>{0===e.length&&t([]);let n=e.length,i=Array(n);e.forEach((e,r)=>e6.resolve(e).then(e=>i[r]={status:"fulfilled",value:e},e=>i[r]={status:"rejected",reason:e}).then(()=>--n||t(i)))})}),eG.any&&"undefined"!=typeof AggregateError&&V(e6,"any",function(){let e=ed.apply(null,arguments).map(tb);return new e6((t,n)=>{0===e.length&&n(AggregateError([]));let i=e.length,r=Array(i);e.forEach((e,a)=>e6.resolve(e).then(e=>t(e),e=>{r[a]=e,--i||n(AggregateError(r))}))})}));let tu={awaits:0,echoes:0,id:0};var tp=0,td=[],tf=0,tm=0,th=0;function t_(e,t,n,i){var r=e2,a=Object.create(r);a.parent=r,a.ref=0,a.global=!1,a.id=++th;var o=e1.env;a.env=eU?{Promise:e6,PromiseProp:{value:e6,configurable:!0,writable:!0},all:e6.all,race:e6.race,allSettled:e6.allSettled,any:e6.any,resolve:e6.resolve,reject:e6.reject,nthen:tC(o.nthen,a),gthen:tC(o.gthen,a)}:{},t&&F(a,t),++r.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=tk(a,e,n,i);return 0===a.ref&&a.finalize(),s}function tg(){return tu.id||(tu.id=++tp),++tu.awaits,tu.echoes+=100,tu.id}function ty(){return!!tu.awaits&&(0==--tu.awaits&&(tu.id=0),tu.echoes=100*tu.awaits,!0)}function tb(e){return tu.echoes&&e&&e.constructor===eG?(tg(),e.then(e=>(ty(),e),e=>(ty(),tS(e)))):e}function tv(e){++tm,tu.echoes&&0!=--tu.echoes||(tu.echoes=tu.id=0),td.push(e2),tw(e,!0)}function tA(){var e=td[td.length-1];td.pop(),tw(e,!1)}function tw(e,t){var n,i=e2;if((t?!tu.echoes||tf++&&e===e2:!tf||--tf&&e===e2)||(n=t?tv.bind(null,e):tA,eH.call(eR,n)),e!==e2&&(e2=e,i===e1&&(e1.env=t$()),eU)){var r=e1.env.Promise,a=e.env;eL.then=a.nthen,r.prototype.then=a.gthen,(i.global||e.global)&&(Object.defineProperty(T,"Promise",a.PromiseProp),r.all=a.all,r.race=a.race,r.resolve=a.resolve,r.reject=a.reject,a.allSettled&&(r.allSettled=a.allSettled),a.any&&(r.any=a.any))}}function t$(){var e=T.Promise;return eU?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(T,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:eL.then,gthen:e.prototype.then}:{}}function tk(e,t,n,i,r){var a=e2;try{return tw(e,!0),t(n,i,r)}finally{tw(a,!1)}}function tx(e,t,n,i){return"function"!=typeof e?e:function(){var r,a=e2;n&&tg(),tw(t,!0);try{return e.apply(this,arguments)}finally{tw(a,!1),i&&(r=ty,eH.call(eR,r))}}}function tC(e,t){return function(n,i){return e.call(this,tx(n,t),tx(i,t))}}-1===(""+eH).indexOf("[native code]")&&(tg=ty=eB);let tE="unhandledrejection";function tD(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var i,r={promise:t,reason:e};if(T.document&&document.createEvent?((i=document.createEvent("Event")).initEvent(tE,!0,!0),F(i,r)):T.CustomEvent&&F(i=new CustomEvent(tE,{detail:r}),r),i&&T.dispatchEvent&&(dispatchEvent(i),!T.PromiseRejectionEvent&&T.onunhandledrejection))try{T.onunhandledrejection(i)}catch(e){}em&&i&&!i.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var tS=e6.reject;let tB="3.2.7",tz=String.fromCharCode(65535),tP=-1/0,tT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tM="String expected.",tO=[],tF="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tI=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),tN="__dbnames",tj="readonly",tR="readwrite";function tL(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tV={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tH(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=eo(t))[e],t)}class tG{_trans(e,t,n){let i=this._tx||e2.trans,r=this.name;function a(e,n,i){if(!i.schema[r])throw new eE.NotFound("Table "+r+" not part of transaction");return t(i.idbtrans,i)}let o=ta();try{return i&&i.db===this.db?i===e2.trans?i._promise(e,a,n):t_(()=>i._promise(e,a,n),{trans:i,transless:e2.transless||e2}):function e(t,n,i,r){if(t.idbdb&&(t._state.openComplete||e2.letThrough||t._vip)){var a=t._createTransaction(n,i,t._dbSchema);try{a.create(),t._state.PR1398_maxLoop=3}catch(a){return a.name===eC.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,i,r))):tS(a)}return a._promise(n,(e,t)=>t_(()=>(e2.trans=a,r(e,t,a)))).then(e=>a._completion.then(()=>e))}if(t._state.openComplete)return tS(new eE.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tS(new eE.DatabaseClosed);t.open().catch(eB)}return t._state.dbReadyPromise.then(()=>e(t,n,i,r))}(this.db,e,[this.name],a)}finally{o&&to()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(O(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=M(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let n=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(n&&this.db._maxKey!==tz){let i=n.keyPath.slice(0,t.length);return this.where(i).equals(i.map(t=>e[t]))}!n&&em&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:i}=this.schema,r=this.db._deps.indexedDB;function a(e,t){try{return 0===r.cmp(e,t)}catch(e){return!1}}let[o,s]=t.reduce(([t,n],r)=>{let o=i[r],s=e[r];return[t||o,t||!o?tL(n,o&&o.multi?e=>{let t=X(e,r);return O(t)&&t.some(e=>a(s,e))}:e=>a(s,X(e,r))):n]},[null,null]);return o?this.where(o.name).equals(e[o.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,O(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let n=Object.create(e.prototype);for(var i in t)if(j(t,i))try{n[i]=t[i]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){F(this,e)})}add(e,t){let{auto:n,keyPath:i}=this.schema.primKey,r=e;return i&&n&&(r=tH(i)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[r]})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(i)try{Q(e,i,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||O(e))return this.where(":id").equals(e).modify(t);{let n=X(e,this.schema.primKey.keyPath);if(void 0===n)return tS(new eE.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?M(t).forEach(n=>{Q(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){let{auto:n,keyPath:i}=this.schema.primKey,r=e;return i&&n&&(r=tH(i)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[r],keys:null!=t?[t]:null})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(i)try{Q(e,i,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tV})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){let i=Array.isArray(t)?t:void 0,r=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:a}=this.schema.primKey;if(a&&i)throw new eE.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new eE.InvalidArgument("Arguments objects and keys must have the same length");let o=e.length,s=a&&n?e.map(tH(a)):e;return this.core.mutate({trans:t,type:"add",keys:i,values:s,wantResults:r}).then(({numFailures:e,results:t,lastResult:n,failures:i})=>{if(0===e)return r?t:n;throw new ex(`${this.name}.bulkAdd(): ${e} of ${o} operations failed`,i)})})}bulkPut(e,t,n){let i=Array.isArray(t)?t:void 0,r=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:a}=this.schema.primKey;if(a&&i)throw new eE.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new eE.InvalidArgument("Arguments objects and keys must have the same length");let o=e.length,s=a&&n?e.map(tH(a)):e;return this.core.mutate({trans:t,type:"put",keys:i,values:s,wantResults:r}).then(({numFailures:e,results:t,lastResult:n,failures:i})=>{if(0===e)return r?t:n;throw new ex(`${this.name}.bulkPut(): ${e} of ${o} operations failed`,i)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:i})=>{if(0===e)return n;throw new ex(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,i)})}}function tU(e){var t={},n=function(n,i){if(i){for(var r=arguments.length,a=Array(r-1);--r;)a[r-1]=arguments[r];return t[n].subscribe.apply(null,a),e}if("string"==typeof n)return t[n]};n.addEventType=a;for(var i=1,r=arguments.length;i<r;++i)a(arguments[i]);return n;function a(e,i,r){if("object"!=typeof e){i||(i=eI),r||(r=eB);var o={subscribers:[],fire:r,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=i(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter(function(t){return t!==e}),o.fire=o.subscribers.reduce(i,r)}};return t[e]=n[e]=o,o}M(e).forEach(function(t){var n=e[t];if(O(n))a(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new eE.InvalidArgument("Invalid event config");var i=a(t,ez,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];i.subscribers.forEach(function(e){J(function(){e.apply(null,t)})})})}})}}function tq(e,t){return H(t).from({prototype:e}),t}function tW(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tK(e,t){e.filter=tL(e.filter,t)}function tY(e,t,n){var i=e.replayFilter;e.replayFilter=i?()=>tL(i(),t()):t,e.justLimit=n&&!i}function tJ(e,t){if(e.isPrimKey)return t.primaryKey;let n=t.getIndexByKeyPath(e.index);if(!n)throw new eE.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tZ(e,t,n){let i=tJ(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:i,range:e.range}})}function tX(e,t,n,i){let r=e.replayFilter?tL(e.filter,e.replayFilter()):e.filter;if(e.or){let a={},o=(e,n,i)=>{if(!r||r(n,i,e=>n.stop(e),e=>n.fail(e))){var o=n.primaryKey,s=""+o;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(o)),j(a,s)||(a[s]=!0,t(e,n,i))}};return Promise.all([e.or._iterate(o,n),tQ(tZ(e,i,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return tQ(tZ(e,i,n),tL(e.algorithm,r),t,!e.keysOnly&&e.valueMapper)}function tQ(e,t,n,i){var r=tc(i?(e,t,r)=>n(i(e),t,r):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=eB},t=>{e.fail(t),n=eB})||r(e.value,e,e=>n=e),n()})})}function t0(e,t){try{let n=t1(e),i=t1(t);if(n!==i)return"Array"===n?1:"Array"===i?-1:"binary"===n?1:"binary"===i?-1:"string"===n?1:"string"===i?-1:"Date"===n?1:"Date"!==i?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let n=e.length,i=t.length,r=n<i?n:i;for(let n=0;n<r;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===i?0:n<i?-1:1}(t2(e),t2(t));case"Array":return function(e,t){let n=e.length,i=t.length,r=n<i?n:i;for(let n=0;n<r;++n){let i=t0(e[n],t[n]);if(0!==i)return i}return n===i?0:n<i?-1:1}(e,t)}}catch(e){}return NaN}function t1(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let n=el(e);return"ArrayBuffer"===n?"binary":n}function t2(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class t3{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,tS.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,tS.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=tL(t.algorithm,e)}_iterate(e,t){return tX(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&F(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>tX(t,e,n,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,n=t.table.core;if(tW(t,!0))return n.count({trans:e,query:{index:tJ(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var i=0;return tX(t,()=>(++i,!1),e,n).then(()=>i)}).then(e)}sortBy(e,t){let n=e.split(".").reverse(),i=n[0],r=n.length-1;function a(e,t){return t?a(e[n[t]],t-1):e[i]}var o="next"===this._ctx.dir?1:-1;function s(e,t){var n=a(e,r),i=a(t,r);return n<i?-o:n>i?o:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&tW(t,!0)&&t.limit>0){let{valueMapper:n}=t,i=tJ(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:i,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{let n=[];return tX(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,tW(t)?tY(t,()=>{var t=e;return(e,n)=>0===t||(1===t?--t:n(()=>{e.advance(t),t=0}),!1)}):tY(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),tY(this._ctx,()=>{var t=e;return function(e,n,i){return--t<=0&&n(i),t>=0}},!0),this}until(e,t){return tK(this._ctx,function(n,i,r){return!e(n.value)||(i(r),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return tK(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=tL(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&tW(t,!0)&&t.limit>0)return this._read(e=>{var n=tJ(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return tK(this._ctx,function(e){var t=e.primaryKey.toString(),i=j(n,t);return n[t]=!0,!i}),this}modify(e){var t=this._ctx;return this._write(n=>{var i;if("function"==typeof e)i=e;else{var r=M(e),a=r.length;i=function(t){for(var n=!1,i=0;i<a;++i){var o=r[i],s=e[o];X(t,o)!==s&&(Q(t,o,s),n=!0)}return n}}let o=t.table.core,{outbound:s,extractKey:l}=o.schema.primaryKey,c=this.db._options.modifyChunkSize||200,u=[],p=0,d=[],f=(e,t)=>{let{failures:n,numFailures:i}=t;for(let t of(p+=e-i,M(n)))u.push(n[t])};return this.clone().primaryKeys().then(r=>{let a=u=>{let p=Math.min(c,r.length-u);return o.getMany({trans:n,keys:r.slice(u,u+p),cache:"immutable"}).then(d=>{let m=[],h=[],g=s?[]:null,y=[];for(let e=0;e<p;++e){let t=d[e],n={value:eo(t),primKey:r[u+e]};!1!==i.call(n,n.value,n)&&(null==n.value?y.push(r[u+e]):s||0===t0(l(t),l(n.value))?(h.push(n.value),s&&g.push(r[u+e])):(y.push(r[u+e]),m.push(n.value)))}let b=tW(t)&&t.limit===1/0&&("function"!=typeof e||e===t4)&&{index:t.index,range:t.range};return Promise.resolve(m.length>0&&o.mutate({trans:n,type:"add",values:m}).then(e=>{for(let t in e.failures)y.splice(parseInt(t),1);f(m.length,e)})).then(()=>(h.length>0||b&&"object"==typeof e)&&o.mutate({trans:n,type:"put",keys:g,values:h,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(h.length,e))).then(()=>(y.length>0||b&&e===t4)&&o.mutate({trans:n,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>r.length>u+p&&a(u+c))})};return a(0).then(()=>{if(u.length>0)throw new ek("Error modifying one or more objects",u,p,d);return r.length})})})}delete(){var e=this._ctx,t=e.range;return tW(e)&&(e.isPrimKey&&!tF||3===t.type)?this._write(n=>{let{primaryKey:i}=e.table.core.schema;return e.table.core.count({trans:n,query:{index:i,range:t}}).then(i=>e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:n,numFailures:r})=>{if(r)throw new ek("Could not delete some values",Object.keys(e).map(t=>e[t]),i-r);return i-r}))}):this.modify(t4)}}let t4=(e,t)=>t.value=null;function t5(e,t){return e<t?-1:+(e!==t)}function t6(e,t){return e>t?-1:+(e!==t)}function t7(e,t,n){var i=e instanceof nn?new e.Collection(e):e;return i._ctx.error=n?new n(t):TypeError(t),i}function t8(e){return new e.Collection(e,()=>nt("")).limit(0)}function t9(e,t,n,i){var r,a,o,s,l,c,u,p=n.length;if(!n.every(e=>"string"==typeof e))return t7(e,tM);function d(e){r="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),a="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),o="next"===e?t5:t6;var t=n.map(function(e){return{lower:a(e),upper:r(e)}}).sort(function(e,t){return o(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),c=e,u="next"===e?"":i}d("next");var f=new e.Collection(e,()=>ne(s[0],l[p-1]+i));f._ondirectionchange=function(e){d(e)};var m=0;return f._addAlgorithm(function(e,n,i){var r=e.key;if("string"!=typeof r)return!1;var d=a(r);if(t(d,l,m))return!0;for(var f=null,h=m;h<p;++h){var g=function(e,t,n,i,r,a){for(var o=Math.min(e.length,i.length),s=-1,l=0;l<o;++l){var c=t[l];if(c!==i[l])return 0>r(e[l],n[l])?e.substr(0,l)+n[l]+n.substr(l+1):0>r(e[l],i[l])?e.substr(0,l)+i[l]+n.substr(l+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;0>r(e[l],c)&&(s=l)}return o<i.length&&"next"===a?e+n.substr(e.length):o<e.length&&"prev"===a?e.substr(0,n.length):s<0?null:e.substr(0,s)+i[s]+n.substr(s+1)}(r,d,s[h],l[h],o,c);null===g&&null===f?m=h+1:(null===f||o(f,g)>0)&&(f=g)}return n(null!==f?function(){e.continue(f+u)}:i),!1}),f}function ne(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function nt(e){return{type:1,lower:e,upper:e}}class nn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,i){n=!1!==n,i=!0===i;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||i)&&(!n||!i)?t8(this):new this.Collection(this,()=>ne(e,t,!n,!i))}catch(e){return t7(this,tT)}}equals(e){return null==e?t7(this,tT):new this.Collection(this,()=>nt(e))}above(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(e,void 0,!0))}aboveOrEqual(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(e,void 0,!1))}below(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(void 0,e,!1,!0))}belowOrEqual(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(void 0,e))}startsWith(e){return"string"!=typeof e?t7(this,tM):this.between(e,e+tz,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):t9(this,(e,t)=>0===e.indexOf(t[0]),[e],tz)}equalsIgnoreCase(e){return t9(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ed.apply(ep,arguments);return 0===e.length?t8(this):t9(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ed.apply(ep,arguments);return 0===e.length?t8(this):t9(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tz)}anyOf(){let e=ed.apply(ep,arguments),t=this._cmp;try{e.sort(t)}catch(e){return t7(this,tT)}if(0===e.length)return t8(this);let n=new this.Collection(this,()=>ne(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let i=0;return n._addAlgorithm((n,r,a)=>{let o=n.key;for(;t(o,e[i])>0;)if(++i===e.length)return r(a),!1;return 0===t(o,e[i])||(r(()=>{n.continue(e[i])}),!1)}),n}notEqual(e){return this.inAnyRange([[tP,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ed.apply(ep,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return t7(this,tT)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[tP,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let n=this._cmp,i=this._ascending,r=this._descending,a=this._min,o=this._max;if(0===e.length)return t8(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=i(e[0],e[1])))return t7(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",eE.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,c,u=i;function p(e,t){return u(e[0],t[0])}try{(c=e.reduce(function(e,t){let i=0,r=e.length;for(;i<r;++i){let r=e[i];if(0>n(t[0],r[1])&&n(t[1],r[0])>0){r[0]=a(r[0],t[0]),r[1]=o(r[1],t[1]);break}}return i===r&&e.push(t),e},[])).sort(p)}catch(e){return t7(this,tT)}let d=0,f=l?e=>i(e,c[d][1])>0:e=>i(e,c[d][1])>=0,m=s?e=>r(e,c[d][0])>0:e=>r(e,c[d][0])>=0,h=f,g=new this.Collection(this,()=>ne(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(h=f,u=i):(h=m,u=r),c.sort(p)},g._addAlgorithm((e,t,n)=>{for(var r=e.key;h(r);)if(++d===c.length)return t(n),!1;return!!(!f(r)&&!m(r))||(0===this._cmp(r,c[d][1])||0===this._cmp(r,c[d][0])||t(()=>{u===i?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=ed.apply(ep,arguments);return e.every(e=>"string"==typeof e)?0===e.length?t8(this):this.inAnyRange(e.map(e=>[e,e+tz])):t7(this,"startsWithAnyOf() only works with strings")}}function ni(e){return tc(function(t){return nr(t),e(t.target.error),!1})}function nr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let na="storagemutated",no="x-storagemutated-1",ns=tU(null,na);class nl{_lock(){return Y(!e2.global),++this._reculock,1!==this._reculock||e2.global||(e2.lockOwnerFor=this),this}_unlock(){if(Y(!e2.global),0==--this._reculock)for(e2.global||(e2.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{tk(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&e2.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,n=this.db._state.dbOpenError;if(Y(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new eE.DatabaseClosed(n);case"MissingAPIError":throw new eE.MissingAPI(n.message,n);default:throw new eE.OpenFailed(n)}if(!this.active)throw new eE.TransactionInactive;return Y(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=tc(t=>{nr(t),this._reject(e.error)}),e.onabort=tc(t=>{nr(t),this.active&&this._reject(new eE.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=tc(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&ns.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return tS(new eE.ReadOnly("Transaction is readonly"));if(!this.active)return tS(new eE.TransactionInactive);if(this._locked())return new e6((i,r)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(i,r)},e2])});if(n)return t_(()=>{var e=new e6((e,n)=>{this._lock();let i=t(e,n,this);i&&i.then&&i.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var i=new e6((e,n)=>{var i=t(e,n,this);i&&i.then&&i.then(e,n)});return i._lib=!0,i}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let n=e6.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var i=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(i.get(-1/0).onsuccess=e)}()}var r=t._waitingFor;return new e6((e,i)=>{n.then(n=>t._waitingQueue.push(tc(e.bind(null,n))),e=>t._waitingQueue.push(tc(i.bind(null,e)))).finally(()=>{t._waitingFor===r&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new eE.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(j(t,e))return t[e];let n=this.schema[e];if(!n)throw new eE.NotFound("Table "+e+" not part of transaction");let i=new this.db.Table(e,n,this);return i.core=this.db.core.table(e),t[e]=i,i}}function nc(e,t,n,i,r,a,o){return{name:e,keyPath:t,unique:n,multi:i,auto:r,compound:a,src:(n&&!o?"&":"")+(i?"*":"")+(r?"++":"")+nu(t)}}function nu(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function np(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Z(n,e=>[e.name,e])}}let nd=e=>{try{return e.only([[]]),nd=()=>[[]],[[]]}catch(e){return nd=()=>tz,tz}};function nf(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>X(t,e):t=>X(t,e)}function nm(e){return[].slice.call(e)}let nh=0;function n_(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ng({_novip:e},t){let n=t.db,i=function(e,t,{IDBKeyRange:n,indexedDB:i},r){var a;return{dbcore:(a=function(e,t,n){let i;function r(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:n,upper:i,lowerOpen:r,upperOpen:a}=e;return void 0===n?void 0===i?null:t.upperBound(i,!!a):void 0===i?t.lowerBound(n,!!r):t.bound(n,i,!!r,!!a)}let{schema:a,hasGetAll:o}=(i=nm(e.objectStoreNames),{schema:{name:e.name,tables:i.map(e=>n.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:n}=e,i=O(t),r=null==t,a={},o={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:r,compound:i,keyPath:t,autoIncrement:n,unique:!0,extractKey:nf(t)},indexes:nm(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:n,multiEntry:i,keyPath:r}=e,o={name:t,compound:O(r),keyPath:r,unique:n,multiEntry:i,extractKey:nf(r)};return a[n_(r)]=o,o}),getIndexByKeyPath:e=>a[n_(e)]};return a[":id"]=o.primaryKey,null!=t&&(a[n_(t)]=o.primaryKey),o})},hasGetAll:i.length>0&&"getAll"in n.objectStore(i[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=a.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:n,keys:i,values:a,range:o}){return new Promise((s,l)=>{let c;s=tc(s);let u=e.objectStore(t),p=null==u.keyPath,d="put"===n||"add"===n;if(!d&&"delete"!==n&&"deleteRange"!==n)throw Error("Invalid operation type: "+n);let{length:f}=i||a||{length:1};if(i&&a&&i.length!==a.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let m=[],h=[],g=0,y=e=>{++g,nr(e)};if("deleteRange"===n){if(4===o.type)return s({numFailures:g,failures:h,results:[],lastResult:void 0});3===o.type?m.push(c=u.clear()):m.push(c=u.delete(r(o)))}else{let[e,t]=d?p?[a,i]:[a,null]:[i,null];if(d)for(let i=0;i<f;++i)m.push(c=t&&void 0!==t[i]?u[n](e[i],t[i]):u[n](e[i])),c.onerror=y;else for(let t=0;t<f;++t)m.push(c=u[n](e[t])),c.onerror=y}let b=e=>{let t=e.target.result;m.forEach((e,t)=>null!=e.error&&(h[t]=e.error)),s({numFailures:g,failures:h,results:"delete"===n?i:m.map(e=>e.result),lastResult:t})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:n})=>new Promise((i,r)=>{i=tc(i);let a=e.objectStore(t),o=n.length,s=Array(o),l,c=0,u=0,p=e=>{let t=e.target;s[t._pos]=t.result,++u===c&&i(s)},d=ni(r);for(let e=0;e<o;++e)null!=n[e]&&((l=a.get(n[e]))._pos=e,l.onsuccess=p,l.onerror=d,++c);0===c&&i(s)}),get:({trans:e,key:n})=>new Promise((i,r)=>{i=tc(i);let a=e.objectStore(t).get(n);a.onsuccess=e=>i(e.target.result),a.onerror=ni(r)}),query:e=>new Promise((n,i)=>{n=tc(n);let{trans:a,values:s,limit:l,query:c}=e,u=l===1/0?void 0:l,{index:p,range:d}=c,f=a.objectStore(t),m=p.isPrimaryKey?f:f.index(p.name),h=r(d);if(0===l)return n({result:[]});if(o){let e=s?m.getAll(h,u):m.getAllKeys(h,u);e.onsuccess=e=>n({result:e.target.result}),e.onerror=ni(i)}else{let e=0,t=!s&&"openKeyCursor"in m?m.openKeyCursor(h):m.openCursor(h),r=[];t.onsuccess=i=>{let a=t.result;return a?(r.push(s?a.value:a.primaryKey),++e===l?n({result:r}):void a.continue()):n({result:r})},t.onerror=ni(i)}}),openCursor:function({trans:e,values:n,query:i,reverse:a,unique:o}){return new Promise((s,l)=>{s=tc(s);let{index:c,range:u}=i,p=e.objectStore(t),d=c.isPrimaryKey?p:p.index(c.name),f=a?o?"prevunique":"prev":o?"nextunique":"next",m=!n&&"openKeyCursor"in d?d.openKeyCursor(r(u),f):d.openCursor(r(u),f);m.onerror=ni(l),m.onsuccess=tc(t=>{let n=m.result;if(!n)return void s(null);n.___id=++nh,n.done=!1;let i=n.continue.bind(n),r=n.continuePrimaryKey;r&&(r=r.bind(n));let a=n.advance.bind(n),o=()=>{throw Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw Error("Cursor not started")},n.fail=tc(l),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{let t=new Promise((e,t)=>{e=tc(e),m.onerror=ni(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=o,e(t)}}),s=()=>{if(m.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw Error("Cursor behind last entry")},n.stop()};return m.onsuccess=tc(e=>{m.onsuccess=s,s()}),n.continue=i,n.continuePrimaryKey=r,n.advance=a,s(),t},s(n)},l)})},count({query:e,trans:n}){let{index:i,range:a}=e;return new Promise((e,o)=>{let s=n.objectStore(t),l=i.isPrimaryKey?s:s.index(i.name),c=r(a),u=c?l.count(c):l.count();u.onsuccess=tc(t=>e(t.target.result)),u.onerror=ni(o)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:nd(t),schema:a}}(t,n,r),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),a))}}(e._middlewares,n,e._deps,t);e.core=i.dbcore,e.tables.forEach(t=>{let n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function ny({_novip:e},t,n,i){n.forEach(n=>{let r=i[n];t.forEach(t=>{let i=U(t,n);(!i||"value"in i&&void 0===i.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?V(t,n,{get(){return this.table(n)},set(e){L(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,r))})})}function nb({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function nv(e,t){return e._cfg.version-t._cfg.version}function nA(e,t){let n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){let r=e[n],a=t[n];if(r){let e={name:n,def:a,recreate:!1,del:[],add:[],change:[]};if(""+(r.primKey.keyPath||"")==""+(a.primKey.keyPath||"")&&(r.primKey.auto===a.primKey.auto||tF)){let t,n=r.idxByName,o=a.idxByName;for(t in n)o[t]||e.del.push(t);for(t in o){let i=n[t],r=o[t];i?i.src!==r.src&&e.change.push(r):e.add.push(r)}(e.del.length>0||e.add.length>0||e.change.length>0)&&i.change.push(e)}else e.recreate=!0,i.change.push(e)}else i.add.push([n,a])}return i}function nw(e,t,n,i){let r=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(e=>n$(r,e)),r}function n$(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function nk(e,t,n){let i={};return W(t.objectStoreNames,0).forEach(e=>{let t=n.objectStore(e),r=t.keyPath,a=nc(nu(r),r||"",!1,!1,!!t.autoIncrement,r&&"string"!=typeof r,!0),o=[];for(let e=0;e<t.indexNames.length;++e){let n=t.index(t.indexNames[e]);r=n.keyPath;var s=nc(n.name,r,!!n.unique,!!n.multiEntry,!1,r&&"string"!=typeof r,!1);o.push(s)}i[e]=np(e,a,o)}),i}function nx({_novip:e},t,n){let i=n.db.objectStoreNames;for(let r=0;r<i.length;++r){let a=i[r],o=n.objectStore(a);e._hasGetAll="getAll"in o;for(let e=0;e<o.indexNames.length;++e){let n=o.indexNames[e],i=o.index(n).keyPath,r="string"==typeof i?i:"["+W(i).join("+")+"]";if(t[a]){let e=t[a].idxByName[r];e&&(e.name=n,delete t[a].idxByName[r],t[a].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&T.WorkerGlobalScope&&T instanceof T.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class nC{_parseStoresSpec(e,t){M(e).forEach(n=>{if(null!==e[n]){var i=e[n].split(",").map((e,t)=>{let n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),i=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return nc(n,i||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),O(i),0===t)}),r=i.shift();if(r.multi)throw new eE.Schema("Primary key cannot be multi-valued");i.forEach(e=>{if(e.auto)throw new eE.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new eE.Schema("Index must have a name and cannot be an empty string")}),t[n]=np(n,r,i)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?F(this._cfg.storesSource,e):e;let n=t._versions,i={},r={};return n.forEach(e=>{F(i,e._cfg.storesSource),r=e._cfg.dbschema={},e._parseStoresSpec(i,r)}),t._dbSchema=r,nb(t,[t._allTables,t,t.Transaction.prototype]),ny(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],M(r),r),t._storeNames=M(r),this}upgrade(e){return this._cfg.contentUpgrade=eN(this._cfg.contentUpgrade||eB,e),this}}function nE(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new nq(tN,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function nD(e){return e&&"function"==typeof e.databases}function nS(e){return t_(function(){return e2.letThrough=!0,e()})}function nB(e){var t=t=>e.next(t),n=r(t),i=r(t=>e.throw(t));function r(e){return t=>{var r=e(t),a=r.value;return r.done?a:a&&"function"==typeof a.then?a.then(n,i):O(a)?Promise.all(a).then(n,i):n(a)}}return r(t)()}function nz(e,t,n){var i=arguments.length;if(i<2)throw new eE.InvalidArgument("Too few arguments");for(var r=Array(i-1);--i;)r[i-1]=arguments[i];return n=r.pop(),[e,en(r),n]}function nP(e,t,n){let i=O(e)?e.slice():[e];for(let e=0;e<n;++e)i.push(t);return i}let nT={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let n=e.table(t),{schema:i}=n,r={},a=[];function o(e,t,n){let i=n_(e),s=r[i]=r[i]||[],l=null==e?0:"string"==typeof e?1:e.length,c=t>0,u={...n,isVirtual:c,keyTail:t,keyLength:l,extractKey:nf(e),unique:!c&&n.unique};return s.push(u),u.isPrimaryKey||a.push(u),l>1&&o(2===l?e[0]:e.slice(0,l-1),t+1,n),s.sort((e,t)=>e.keyTail-t.keyTail),u}let s=o(i.primaryKey.keyPath,0,i.primaryKey);for(let e of(r[":id"]=[s],i.indexes))o(e.keyPath,0,e);function l(t){var n,i;let r=t.query.index;return r.isVirtual?{...t,query:{index:r,range:(n=t.query.range,i=r.keyTail,{type:1===n.type?2:n.type,lower:nP(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:nP(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}:t}return{...n,schema:{...i,primaryKey:s,indexes:a,getIndexByKeyPath:function(e){let t=r[n_(e)];return t&&t[0]}},count:e=>n.count(l(e)),query:e=>n.query(l(e)),openCursor(t){let{keyTail:i,isVirtual:r,keyLength:a}=t.query.index;return r?n.openCursor(l(t)).then(n=>n&&Object.create(n,{continue:{value:function(r){null!=r?n.continue(nP(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value(t,r){n.continuePrimaryKey(nP(t,e.MAX_KEY,i),r)}},primaryKey:{get:()=>n.primaryKey},key:{get(){let e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:()=>n.value}})):n.openCursor(t)}}}}}};function nM(e,t,n,i){return n=n||{},i=i||"",M(e).forEach(r=>{if(j(t,r)){var a=e[r],o=t[r];if("object"==typeof a&&"object"==typeof o&&a&&o){let e=el(a);e!==el(o)?n[i+r]=t[r]:"Object"===e?nM(a,o,n,i+r+"."):a!==o&&(n[i+r]=t[r])}else a!==o&&(n[i+r]=t[r])}else n[i+r]=void 0}),M(t).forEach(r=>{j(e,r)||(n[i+r]=t[r])}),n}let nO={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let n=e.table(t),{primaryKey:i}=n.schema;return{...n,mutate(e){let r=e2.trans,{deleting:a,creating:o,updating:s}=r.table(t).hook;switch(e.type){case"add":if(o.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"put":if(o.fire===eB&&s.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"delete":if(a.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"deleteRange":if(a.fire===eB)break;return r._promise("readwrite",()=>(function e(t,r,a){return n.query({trans:t,values:!1,query:{index:i,range:r},limit:a}).then(({result:n})=>l({type:"delete",keys:n,trans:t}).then(i=>i.numFailures>0?Promise.reject(i.failures[0]):n.length<a?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...r,lower:n[n.length-1],lowerOpen:!0},a)))})(e.trans,e.range,1e4),!0)}return n.mutate(e);function l(e){var t,r;let l=e2.trans,c=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(i.extractKey));if(!c)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:c}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(r=e).type?Promise.resolve([]):n.getMany({trans:r.trans,keys:c,cache:"immutable"})).then(t=>{let r=c.map((n,r)=>{let c=t[r],u={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(u,n,c,l);else if("add"===e.type||void 0===c){let t=o.fire.call(u,n,e.values[r],l);null==n&&null!=t&&(n=t,e.keys[r]=n,i.outbound||Q(e.values[r],i.keyPath,n))}else{let t=nM(c,e.values[r]),i=s.fire.call(u,t,n,c,l);if(i){let t=e.values[r];Object.keys(i).forEach(e=>{j(t,e)?t[e]=i[e]:Q(t,e,i[e])})}}return u});return n.mutate(e).then(({failures:n,results:i,numFailures:a,lastResult:o})=>{for(let a=0;a<c.length;++a){let o=i?i[a]:c[a],s=r[a];null==o?s.onerror&&s.onerror(n[a]):s.onsuccess&&s.onsuccess("put"===e.type&&t[a]?e.values[a]:o)}return{failures:n,results:i,numFailures:a,lastResult:o}}).catch(e=>(r.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function nF(e,t,n){try{if(!t||t.keys.length<e.length)return null;let i=[];for(let r=0,a=0;r<t.keys.length&&a<e.length;++r)0===t0(t.keys[r],e[a])&&(i.push(n?eo(t.values[r]):t.values[r]),++a);return i.length===e.length?i:null}catch(e){return null}}let nI={stack:"dbcore",level:-1,create:e=>({table:t=>{let n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);let t=nF(e.keys,e.trans._cache,"clone"===e.cache);return t?e6.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?eo(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function nN(e){return!("from"in e)}let nj=function(e,t){if(!this){let t=new nj;return e&&"d"in e&&F(t,e),t}F(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function nR(e,t,n){let i=t0(t,n);if(isNaN(i))return;if(i>0)throw RangeError();if(nN(e))return F(e,{from:t,to:n,d:1});let r=e.l,a=e.r;if(0>t0(n,e.from))return r?nR(r,t,n):e.l={from:t,to:n,d:1,l:null,r:null},nH(e);if(t0(t,e.to)>0)return a?nR(a,t,n):e.r={from:t,to:n,d:1,l:null,r:null},nH(e);0>t0(t,e.from)&&(e.from=t,e.l=null,e.d=a?a.d+1:1),t0(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);let o=!e.r;r&&!e.l&&nL(e,r),a&&o&&nL(e,a)}function nL(e,t){nN(t)||function e(t,{from:n,to:i,l:r,r:a}){nR(t,n,i),r&&e(t,r),a&&e(t,a)}(e,t)}function nV(e){let t=nN(e)?null:{s:0,n:e};return{next(e){let n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>t0(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=t0(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function nH(e){var t,n;let i=((null==(t=e.r)?void 0:t.d)||0)-((null==(n=e.l)?void 0:n.d)||0),r=i>1?"r":i<-1?"l":"";if(r){let t="r"===r?"l":"r",n={...e},i=e[r];e.from=i.from,e.to=i.to,e[r]=i[r],n[r]=i[t],e[t]=n,n.d=nG(n)}e.d=nG(e)}function nG({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}R(nj.prototype,{add(e){return nL(this,e),this},addKey(e){return nR(this,e,e),this},addKeys(e){return e.forEach(e=>nR(this,e,e)),this},[ec](){return nV(this)}});let nU={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,n=new nj(e.MIN_KEY,e.MAX_KEY);return{...e,table:i=>{let r=e.table(i),{schema:a}=r,{primaryKey:o}=a,{extractKey:s,outbound:l}=o,c={...r,mutate:e=>{let o=e.trans,s=o.mutatedParts||(o.mutatedParts={}),l=e=>{let n=`idb://${t}/${i}/${e}`;return s[n]||(s[n]=new nj)},c=l(""),u=l(":dels"),{type:p}=e,[d,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],m=e.trans._cache;return r.mutate(e).then(e=>{if(O(d)){"delete"!==p&&(d=e.results),c.addKeys(d);let t=nF(d,m);t||"add"===p||u.addKeys(d),(t||f)&&a.indexes.forEach(function(e){let n=l(e.name||"");function i(t){return null!=t?e.extractKey(t):null}let r=t=>e.multiEntry&&O(t)?t.forEach(e=>n.addKey(e)):n.addKey(t);(t||f).forEach((e,n)=>{let a=t&&i(t[n]),o=f&&i(f[n]);0!==t0(a,o)&&(null!=a&&r(a),null!=o&&r(o))})})}else if(d){let e={from:d.lower,to:d.upper};u.add(e),c.add(e)}else c.add(n),u.add(n),a.indexes.forEach(e=>l(e.name).add(n));return e})}},u=({query:{index:t,range:n}})=>{var i,r;return[t,new nj(null!=(i=n.lower)?i:e.MIN_KEY,null!=(r=n.upper)?r:e.MAX_KEY)]},p={get:e=>[o,new nj(e.key)],getMany:e=>[o,(new nj).addKeys(e.keys)],count:u,query:u,openCursor:u};return M(p).forEach(e=>{c[e]=function(a){let{subscr:o}=e2;if(o){let c=e=>{let n=`idb://${t}/${i}/${e}`;return o[n]||(o[n]=new nj)},u=c(""),d=c(":dels"),[f,m]=p[e](a);if(c(f.name||"").add(m),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&a.values&&r.query({...a,values:!1});return r[e].apply(this,arguments).then(n=>{if("query"===e){if(l&&a.values)return t.then(({result:e})=>(u.addKeys(e),n));let e=a.values?n.result.map(s):n.result;a.values?u.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=a.values;return n&&Object.create(n,{key:{get:()=>(d.addKey(n.primaryKey),n.key)},primaryKey:{get(){let e=n.primaryKey;return d.addKey(e),e}},value:{get:()=>(e&&u.addKey(n.primaryKey),n.value)}})}return n})}d.add(n)}}return r[e].apply(this,arguments)}}),c}}}};class nq{constructor(e,t){var n,i,r;this._middlewares={},this.verno=0;const a=nq.dependencies;this._options=t={addons:nq.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:eB,dbReadyPromise:null,cancelOpen:eB,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new e6(e=>{s.dbReadyResolve=e}),s.openCanceller=new e6((e,t)=>{s.cancelOpen=t}),this._state=s,this.name=e,this.on=tU(this,"populate","blocked","versionchange","close",{ready:[eN,eB]}),this.on.ready.subscribe=K(this.on.ready.subscribe,e=>(t,n)=>{nq.vip(()=>{let i=this._state;if(i.openComplete)i.dbOpenError||e6.resolve().then(t),n&&e(t);else if(i.onReadyBeingFired)i.onReadyBeingFired.push(t),n&&e(t);else{e(t);let i=this;n||e(function e(){i.on.ready.unsubscribe(t),i.on.ready.unsubscribe(e)})}})}),this.Collection=(n=this,tq(t3.prototype,function(e,t){this.db=n;let i=tV,r=null;if(t)try{i=t()}catch(e){r=e}let a=e._ctx,o=a.table,s=o.hook.reading.fire;this._ctx={table:o,index:a.index,isPrimKey:!a.index||o.schema.primKey.keyPath&&a.index===o.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:a.or,valueMapper:s!==ez?s:null}})),this.Table=function(e){return tq(tG.prototype,function(t,n,i){this.db=e,this._tx=i,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:tU(null,{creating:[eM,eB],reading:[eP,ez],updating:[eF,eB],deleting:[eO,eB]})})}(this),this.Transaction=(i=this,tq(nl.prototype,function(e,t,n,r,a){this.db=i,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=tU(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new e6((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),tS(e)})})),this.Version=(r=this,tq(nC.prototype,function(e){this.db=r,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=function(e){return tq(nn.prototype,function(t,n,i){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:i};let r=e._deps.indexedDB;if(!r)throw new eE.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=(e,t)=>r.cmp(t,e),this._max=(e,t)=>r.cmp(e,t)>0?e:t,this._min=(e,t)=>0>r.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=nd(t.IDBKeyRange),this._createTransaction=(e,t,n,i)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,i),this._fireOnBlocked=e=>{this.on("blocked").fire(e),tO.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(nT),this.use(nO),this.use(nU),this.use(nI),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new eE.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new eE.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(nv),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||e2.letThrough||this._vip)?e():new e6((e,t)=>{if(this._state.openComplete)return t(new eE.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new eE.DatabaseClosed);this.open().catch(eB)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:i}){i&&this.unuse({stack:e,name:i});let r=this._middlewares[e]||(this._middlewares[e]=[]);return r.push({stack:e,create:t,level:null==n?10:n,name:i}),r.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){var t;let n=e._state,{indexedDB:i}=e._deps;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(()=>n.dbOpenError?tS(n.dbOpenError):e);em&&(n.openCanceller._stackHolder=eg()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;let r=n.openCanceller;function a(){if(n.openCanceller!==r)throw new eE.DatabaseClosed("db.open() was cancelled")}let o=n.dbReadyResolve,s=null,l=!1,c=()=>new e6((t,r)=>{if(a(),!i)throw new eE.MissingAPI;let o=e.name,c=n.autoSchema?i.open(o):i.open(o,Math.round(10*e.verno));if(!c)throw new eE.MissingAPI;c.onerror=ni(r),c.onblocked=tc(e._fireOnBlocked),c.onupgradeneeded=tc(t=>{if(s=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=nr,s.abort(),c.result.close();let e=i.deleteDatabase(o);e.onsuccess=e.onerror=tc(()=>{r(new eE.NoSuchDatabase(`Database ${o} doesnt exist`))})}else{let n,i,o,d;s.onerror=ni(r);var a,u,p=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=p<1,e._novip.idbdb=c.result,a=p/10,u=s,n=e._dbSchema,(i=e._createTransaction("readwrite",e._storeNames,n)).create(u),i._completion.catch(r),o=i._reject.bind(i),d=e2.transless||e2,t_(()=>{e2.trans=i,e2.transless=d,0===a?(M(n).forEach(e=>{nw(u,e,n[e].primKey,n[e].indexes)}),ng(e,u),e6.follow(()=>e.on.populate.fire(i)).catch(o)):(function({_novip:e},t,n,i){let r=[],a=e._versions,o=e._dbSchema=nk(e,e.idbdb,i),s=!1;return a.filter(e=>e._cfg.version>=t).forEach(a=>{r.push(()=>{let r=o,l=a._cfg.dbschema;nx(e,r,i),nx(e,l,i),o=e._dbSchema=l;let c=nA(r,l);c.add.forEach(e=>{nw(i,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new eE.Upgrade("Not yet support for changing primary key");{let t=i.objectStore(e.name);e.add.forEach(e=>n$(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),n$(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let u=a._cfg.contentUpgrade;if(u&&a._cfg.version>t){let t;ng(e,i),n._memoizedTables={},s=!0;let a=ee(l);c.del.forEach(e=>{a[e]=r[e]}),nb(e,[e.Transaction.prototype]),ny(e,[e.Transaction.prototype],M(a),a),n.schema=a;let o=ef(u);o&&tg();let p=e6.follow(()=>{if((t=u(n))&&o){var e=ty.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?e6.resolve(t):p.then(()=>t)}}),r.push(t=>{var i;s&&tF||(i=a._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==i[e]&&t.db.deleteObjectStore(e))),nb(e,[e.Transaction.prototype]),ny(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),(function e(){return r.length?e6.resolve(r.shift()(n.idbtrans)).then(e):e6.resolve()})().then(()=>{var e;M(e=o).forEach(t=>{i.db.objectStoreNames.contains(t)||nw(i,t,e[t].primKey,e[t].indexes)})})})(e,a,i,u).catch(o)})}},r),c.onsuccess=tc(()=>{s=null;let i=e._novip.idbdb=c.result,r=W(i.objectStoreNames);if(r.length>0)try{let t,a=i.transaction(1===r.length?r[0]:r,"readonly");n.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;let i=e._dbSchema=nk(0,t,n);e._storeNames=W(t.objectStoreNames,0),ny(e,[e._allTables],M(i),i)}(e,i,a):(nx(e,e._dbSchema,a),((t=nA(nk(0,e.idbdb,a),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ng(e,a)}catch(e){}tO.push(e),i.onversionchange=tc(t=>{n.vcFired=!0,e.on("versionchange").fire(t)}),i.onclose=tc(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},n){nD(e)||n===tN||nE(e,t).put({name:n}).catch(eB)}(e._deps,o),t()},r)}).catch(e=>e&&"UnknownError"===e.name&&n.PR1398_maxLoop>0?(n.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):e6.reject(e));return e6.race([r,("undefined"==typeof navigator?e6.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(c)]).then(()=>(a(),n.onReadyBeingFired=[],e6.resolve(nS(()=>e.on.ready.fire(e.vip))).then(function t(){if(n.onReadyBeingFired.length>0){let i=n.onReadyBeingFired.reduce(eN,eB);return n.onReadyBeingFired=[],e6.resolve(nS(()=>i(e.vip))).then(t)}}))).finally(()=>{n.onReadyBeingFired=null,n.isBeingOpened=!1}).then(()=>e).catch(t=>{n.dbOpenError=t;try{s&&s.abort()}catch(e){}return r===n.openCanceller&&e._close(),tS(t)}).finally(()=>{n.openComplete=!0,o()})}(this)}_close(){let e=this._state,t=tO.indexOf(this);if(t>=0&&tO.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new e6(t=>{e.dbReadyResolve=t}),e.openCanceller=new e6((t,n)=>{e.cancelOpen=n})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new eE.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new e6((n,i)=>{let r=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tc(()=>{!function({indexedDB:e,IDBKeyRange:t},n){nD(e)||n===tN||nE(e,t).delete(n).catch(eB)}(this._deps,this.name),n()}),e.onerror=ni(i),e.onblocked=this._fireOnBlocked};if(e)throw new eE.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(r):r()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return M(this._allTables).map(e=>this._allTables[e])}transaction(){let e=nz.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let i,r,a=e2.trans;a&&a.db===this&&-1===e.indexOf("!")||(a=null);let o=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(r=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===tj)i=tj;else{if("rw"!=e&&e!=tR)throw new eE.InvalidArgument("Invalid transaction mode: "+e);i=tR}if(a){if(a.mode===tj&&i===tR){if(!o)throw new eE.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&r.forEach(e=>{if(a&&-1===a.storeNames.indexOf(e)){if(!o)throw new eE.SubTransaction("Table "+e+" not included in parent transaction.");a=null}}),o&&a&&!a.active&&(a=null)}}catch(e){return a?a._promise(null,(t,n)=>{n(e)}):tS(e)}let s=(function e(t,n,i,r,a){return e6.resolve().then(()=>{let o,s=e2.transless||e2,l=t._createTransaction(n,i,t._dbSchema,r);if(r)l.idbtrans=r.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===eC.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,i,null,a))):tS(r)}let c=ef(a);c&&tg();let u=e6.follow(()=>{if(o=a.call(l,l))if(c){var e=ty.bind(null,null);o.then(e,e)}else"function"==typeof o.next&&"function"==typeof o.throw&&(o=nB(o))},{trans:l,transless:s});return(o&&"function"==typeof o.then?e6.resolve(o).then(e=>l.active?e:tS(new eE.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):u.then(()=>o)).then(e=>(r&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),tS(e)))})}).bind(null,this,i,r,a,n);return a?a._promise(i,s,"lock"):e2.trans?tk(e2.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!j(this._allTables,e))throw new eE.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let nW="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class nK{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[nW](){return this}}function nY(e,t){return M(t).forEach(n=>{nL(e[n]||(e[n]=new nj),t[n])}),e}try{i={indexedDB:T.indexedDB||T.mozIndexedDB||T.webkitIndexedDB||T.msIndexedDB,IDBKeyRange:T.IDBKeyRange||T.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function nJ(e){let t=nZ;try{nZ=!0,ns.storagemutated.fire(e)}finally{nZ=t}}R(nq,{...eS,delete:e=>new nq(e,{addons:[]}).delete(),exists:e=>new nq(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return nD(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==tN)):nE(e,t).toCollection().primaryKeys()})(nq.dependencies).then(e)}catch(e){return tS(new eE.MissingAPI)}},defineClass:()=>function(e){F(this,e)},ignoreTransaction:e=>e2.trans?tk(e2.transless,e):e(),vip:nS,async:function(e){return function(){try{var t=nB(e.apply(this,arguments));return t&&"function"==typeof t.then?t:e6.resolve(t)}catch(e){return tS(e)}}},spawn:function(e,t,n){try{var i=nB(e.apply(n,t||[]));return i&&"function"==typeof i.then?i:e6.resolve(i)}catch(e){return tS(e)}},currentTransaction:{get:()=>e2.trans||null},waitFor:function(e,t){let n=e6.resolve("function"==typeof e?nq.ignoreTransaction(e):e).timeout(t||6e4);return e2.trans?e2.trans.waitFor(n):n},Promise:e6,debug:{get:()=>em,set:e=>{em=e,eh="dexie"===e?()=>!0:tI}},derive:H,extend:F,props:R,override:K,Events:tU,on:ns,liveQuery:function(e){let t,n=!1,i=new nK(i=>{let r=ef(e),a=!1,o={},s={},l={get closed(){return a},unsubscribe:()=>{a=!0,ns.storagemutated.unsubscribe(d)}};i.start&&i.start(l);let c=!1,u=!1;function p(){return M(s).some(e=>o[e]&&function(e,t){let n=nV(t),i=n.next();if(i.done)return!1;let r=i.value,a=nV(e),o=a.next(r.from),s=o.value;for(;!i.done&&!o.done;){if(0>=t0(s.from,r.to)&&t0(s.to,r.from)>=0)return!0;0>t0(r.from,s.from)?r=(i=n.next(s.from)).value:s=(o=a.next(r.from)).value}return!1}(o[e],s[e]))}let d=e=>{nY(o,e),p()&&f()},f=()=>{let m,h;if(c||a)return;o={};let g={},y=(r&&tg(),m=()=>t_(e,{subscr:g,trans:null}),h=e2.trans?tk(e2.transless,m):m(),r&&h.then(ty,ty),h);u||(ns(na,d),u=!0),c=!0,Promise.resolve(y).then(e=>{n=!0,t=e,c=!1,a||(p()?f():(o={},s=g,i.next&&i.next(e)))},e=>{c=!1,n=!1,i.error&&i.error(e),l.unsubscribe()})};return f(),l});return i.hasValue=()=>n,i.getValue=()=>t,i},extendObservabilitySet:nY,getByKeyPath:X,setByKeyPath:Q,delByKeyPath:function(e,t){"string"==typeof t?Q(e,t,void 0):"length"in t&&[].map.call(t,function(t){Q(e,t,void 0)})},shallowClone:ee,deepClone:eo,getObjectDiff:nM,cmp:t0,asap:J,minKey:tP,addons:[],connections:tO,errnames:eC,dependencies:i,semVer:tB,version:tB.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),nq.maxKey=nd(nq.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(ns(na,e=>{if(!nZ){let t;tF?(t=document.createEvent("CustomEvent")).initCustomEvent(no,!0,!0,e):t=new CustomEvent(no,{detail:e}),nZ=!0,dispatchEvent(t),nZ=!1}}),addEventListener(no,({detail:e})=>{nZ||nJ(e)}));let nZ=!1;if("undefined"!=typeof BroadcastChannel){let e=new BroadcastChannel(no);"function"==typeof e.unref&&e.unref(),ns(na,t=>{nZ||e.postMessage(t)}),e.onmessage=e=>{e.data&&nJ(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){ns(na,e=>{try{nZ||("undefined"!=typeof localStorage&&localStorage.setItem(no,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:no,changedParts:e})))}catch(e){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",e=>{if(e.key===no){let t=JSON.parse(e.newValue);t&&nJ(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===no&&nJ(e.changedParts)})}e6.rejectionMapper=function(e,t){if(!e||e instanceof ew||e instanceof TypeError||e instanceof SyntaxError||!e.name||!eD[e.name])return e;var n=new eD[e.name](t||e.message,e);return"stack"in e&&V(n,"stack",{get:function(){return this.inner.stack}}),n},eh=tI;var nX=n(70937),nQ=n(467);function n0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class n1 extends nq{constructor(){super("EsmOffline"),n0(this,"syncQueue",void 0),n0(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function n2(){return new n1}let n3=new n1,n4={},n5=(0,nQ.Zd)("offline-synchronization",{});function n6(){return n5}async function n7(){if(n5.getState().synchronization)return;let e=await n3.syncQueue.count(),t={},n=Object.entries(n4),i=n.length,r={},a=new AbortController,o=()=>{let e=n5.getState().synchronization;n5.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{n5.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}});for(let e=0;e<i&&n.length>0;e++)for(let e=n.length;e--;){let[i,s]=n[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(r[i]={},await Promise.all(l),t[i]=n8(s,r,a,o),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{n5.setState({synchronization:void 0})}}async function n8({type:e,dependsOn:t,process:n},i,r,a){let o=[],s=[],l=await n9();await n3.syncQueue.where({type:e,userId:l}).each((e,t)=>{o.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let c=0;c<o.length;c++){let[u,p,{id:d,dependencies:f=[]}]=o[c];try{let a=await n(p,{abort:r,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:n})=>t.includes(n)?i[n][e]:void 0)});void 0!==d&&(i[e][d]=a),await n3.syncQueue.delete(u)}catch(e){await n3.syncQueue.update(u,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{a()}}}async function n9(){let e=await (0,nX.xC)();return e?.uuid||"*"}async function ie(e,t,n,i){let r=i&&i.id;return void 0!==r&&await n3.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===r).delete().catch(nq.errnames.DatabaseClosed),await n3.syncQueue.add({type:t,content:n,userId:e,descriptor:i||{},createdOn:new Date}).catch(nq.errnames.DatabaseClosed,()=>-1)}async function it(e,t,n){let i=await n9();return await ie(i,e,t,n)}async function ii(e,t){return(await ir(e,t)).map(e=>e.content)}async function ir(e,t){return await n3.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(nq.errnames.DatabaseClosed,()=>[])}async function ia(e){let t=await n9();return await ii(t,e)}async function io(e){let t=await n9();return await ir(t,e)}async function is(e){return await n3.syncQueue.get(e).catch(nq.errnames.DatabaseClosed,()=>void 0)}function il(e){return!!n4[e]?.options.onBeginEditSyncItem}async function ic(e){let t=await is(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let n=n4[t.type]?.options.onBeginEditSyncItem;if(!n)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function iu(e){await n3.syncQueue.delete(e).catch(nq.errnames.DatabaseClosed)}function ip(e,t,n,i={}){n4[e]={type:e,dependsOn:t,process:n,options:i}}let id="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),im=new Uint8Array(16),ih=[];for(let e=0;e<256;++e)ih.push((e+256).toString(16).slice(1));let i_=function(e,t,n){if(id&&!t&&!e)return id();let i=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(im)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return ih[e[t+0]]+ih[e[t+1]]+ih[e[t+2]]+ih[e[t+3]]+"-"+ih[e[t+4]]+ih[e[t+5]]+"-"+ih[e[t+6]]+ih[e[t+7]]+"-"+ih[e[t+8]]+ih[e[t+9]]+"-"+ih[e[t+10]]+ih[e[t+11]]+ih[e[t+12]]+ih[e[t+13]]+ih[e[t+14]]+ih[e[t+15]]}(i)},ig="OFFLINE+";function iy(){return ig+i_()}function ib(e){return e.startsWith(ig)}let iv={};function iA(){return Object.values(iv)}function iw(e){iv[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),iv[e.id]=e}async function i$(e){let t=await iz();return await ik(t,e)}async function ik(e,t){let n=new n1;return await n.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(nq.errnames.DatabaseClosed,()=>[])}async function ix(e,t){let n=await iz();return await iC(n,e,t)}async function iC(e,t,n){let i=new n1,r=await i.dynamicOfflineData.get({type:t,identifier:n}).catch(nq.errnames.DatabaseClosed,()=>void 0);r?r.users.includes(e)||await i.dynamicOfflineData.update(r.id,{users:[...r.users,e]}).catch(nq.errnames.DatabaseClosed):await i.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(nq.errnames.DatabaseClosed)}async function iE(e,t){let n=await iz();return await iD(n,e,t)}async function iD(e,t,n){let i=new n1,r=await i.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(nq.errnames.DatabaseClosed,()=>void 0);r&&(r.users.length>1?await i.dynamicOfflineData.update(r.id,{users:r.users.filter(t=>t!==e)}).catch(nq.errnames.DatabaseClosed):await i.dynamicOfflineData.delete(r.id).catch(nq.errnames.DatabaseClosed))}async function iS(e,t){let n=await i$(e);await Promise.all(n.map(async e=>iB(e.type,e.identifier,t)))}async function iB(e,t,n){await ix(e,t);let i=new n1,r=await iz(),a=await i.dynamicOfflineData.get({type:e,identifier:t}).catch(nq.errnames.DatabaseClosed,()=>void 0),o=iA().filter(t=>t.type===e);if(!a)return;let s=await Promise.all(o.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(n){let t=n.message?.toString()??n.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),p={syncedOn:new Date,syncedBy:r,succeededHandlers:l,erroredHandlers:c,errors:u};a.id&&await i.dynamicOfflineData.update(a.id,{syncState:p}).catch(nq.errnames.DatabaseClosed)}async function iz(){let e=(await (0,nX.xC)()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let iP=(0,nQ.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function iT(){return iF(),iP}function iM(e,t){iF(),iw({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??new AbortController().signal})})}async function iO(e){iF(),await iB("patient",e)}function iF(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}},44408:function(e,t,n){"use strict";let i;n.d(t,{fq:()=>eG,JK:()=>j,if:()=>eS,tQ:()=>eI,YY:()=>c,E4:()=>es,zD:()=>ee,g9:()=>L,uL:()=>g,kH:()=>ez,br:()=>b,Gz:()=>eu,M3:()=>eM,qw:()=>B,Wq:()=>ec,rr:()=>h,oU:()=>ej,wV:()=>eq,d7:()=>er,Jm:()=>eT,xH:()=>eH,W3:()=>A,zq:()=>a,Ie:()=>H,CH:()=>ef,ns:()=>R,vL:()=>ex,xl:()=>eD,Us:()=>G,UK:()=>Q,fS:()=>D,yJ:()=>Y,u:()=>ed,to:()=>eg,iy:()=>ev,_9:()=>K,Bf:()=>ew,Tt:()=>q,CX:()=>y,Ed:()=>em,p6:()=>E,Wr:()=>eP,TA:()=>eB,F7:()=>N,qv:()=>eE,sc:()=>V,WQ:()=>eO,Pj:()=>f,i_:()=>s,$B:()=>el,oq:()=>ek,wJ:()=>eN,mQ:()=>m,wr:()=>eU,mw:()=>ey,jn:()=>C,Fx:()=>ei});var r=n(35400);let a=(0,r.createContext)({moduleName:"",featureName:""});var o=n(17744);function s({to:e,templateParams:t,onBeforeNavigate:n,children:i,...a}){return(0,r.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),r.createElement("a",{onClick:i=>{0===i.button&&!i.ctrlKey&&!i.shiftKey&&!i.altKey&&!i.metaKey&&(i.preventDefault(),n?.(i),(0,o.oo)({to:e,templateParams:t})),0===i.button&&(i.ctrlKey||i.metaKey)&&n?.(i),0===i.button&&i.shiftKey&&n?.(i),1===i.button&&n?.(i)},href:(0,o.JG)(e,t),...a},i)}var l=n(11621);let c=({state:e,children:t,...n})=>{let{extension:i}=(0,r.useContext)(a),o=(0,r.useRef)(null),s=(0,r.useRef)(Promise.resolve()),c=(0,r.useCallback)(t=>{i?.extensionSlotName&&i.extensionSlotModuleName&&i.extensionSlotModuleName&&!o.current&&(0,l.wG)(t,i.extensionSlotName,i.extensionSlotModuleName,i.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,r.useEffect)(()=>()=>{if(o&&o.current)switch(o.current.getStatus()){case"MOUNTING":o.current.mountPromise.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()});break;case"MOUNTED":o.current.unmount();break;case"UPDATING":s.current&&s.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,r.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,s.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(s.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),i?r.createElement("div",{ref:c,"data-extension-id":i?.extensionId,style:{position:"relative"},...n}):null};var u=n(467);function p(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[i,r]of Object.entries(t)){let t=function(...t){e.setState(e=>r(e,...t))};n[i]=t}return n}let d=()=>e=>e;function f(e,t=d(),n){let[i,a]=(0,r.useState)(()=>t(e.getState()));(0,r.useEffect)(()=>(0,u.i7)(e,t,a),[e,t]);let o=(0,r.useMemo)(()=>n?p(e,n):{},[e,n]);return{...i,...o}}function m(e,t){return f(e,d(),t)}function h(e){return function(t){let[n,i]=(0,r.useState)(e.getState());(0,r.useEffect)(()=>e.subscribe(e=>i(e)),[]);let a=(0,r.useMemo)(()=>t?p(e,t):{},[t]);return{...n,...a}}}let g=e=>f((0,l.zF)(),t=>t.slots?.[e]);function y(e){let t=g(e);return t?.assignedExtensions??[]}function b(e){let{moduleName:t}=(0,r.useContext)(a);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)(()=>{(0,l.FY)(t,e)},[]),{extensions:y(e),extensionSlotName:e,extensionSlotModuleName:t}}function v(e){return e}function A({name:e,extensionSlotName:t,select:n=v,children:i,state:o,style:s,...l}){if(i&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let u=e??t,p=(0,r.useRef)(null),{extensions:d,extensionSlotModuleName:f}=b(u),m=(0,r.useMemo)(()=>n(d),[n,d]),h=(0,r.useMemo)(()=>{if("function"==typeof i&&!r.isValidElement(i))return m.map(e=>i(e,o))},[i,m]);return r.createElement("div",{ref:p,"data-extension-slot-name":u,"data-extension-slot-module-name":f,style:{...s,position:"relative"},...l},u&&m?.map((e,t)=>r.createElement(a.Provider,{key:e.id,value:{moduleName:f,featureName:"",extension:{extensionId:e.id,extensionSlotName:u,extensionSlotModuleName:f}}},h?.[t]??("function"!=typeof i?i:null)??r.createElement(c,{state:o}))))}let w=(0,n(58644).y)()(()=>({}));(0,u.CE)("openmrs-app-context",w);let $={};function k(e,t){w.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}var x=n(90108);function C(e,t){let n=(0,r.useRef)(t??{}),i=(0,r.useRef)(t=>k(e,t));return(0,r.useEffect)(()=>(!function(e,t=$){w.setState(n=>{if(e in n)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===$?{}:t})})}(e,t??{}),()=>{w.setState(t=>(e in t&&delete t[e],t))}),[e]),(0,r.useEffect)(()=>{let i=t??{};(0,x.b)(n.current,i)||(k(e,()=>i),n.current=i)},[t]),i.current}function E({namespace:e,value:t}){return C(e,t),null}let D=({children:e,value:t,fallback:n})=>t?r.createElement(r.Fragment,null,e):n?r.createElement(r.Fragment,null,n):null;var S=n(70937);let B=({privilege:e,fallback:t,children:n})=>{let[i,a]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=(0,S.HW)({includeAuthStatus:!1}).subscribe(a);return()=>e.unsubscribe()},[]),i&&(0,S.st)(e,i))?r.createElement(r.Fragment,null,n):t?r.createElement(r.Fragment,null,t):null};var z=n(25873),P=n(6309),T=n(58088),M=n(13624);let O={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},F=new Map,I={errorRetryCount:3,fetcher:S.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>F};function N(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},O,e),n={...I,...t.swrConfig};return function(e){var i,o,s,l,c;return s=o=class extends(i=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.");{let i=r.createElement(r.Suspense,{fallback:null},r.createElement(M.BE,{value:n},r.createElement(a.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(T.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,i):i}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},l="displayName",c=`OpenmrsReactComponent(${t.featureName})`,l in s?Object.defineProperty(s,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[l]=c,o}}function j(e,t){return(0,P.A)({React:r,ReactDOMClient:z,rootComponent:N(t)(e)})}function R(e,t){return()=>e().then(({default:e})=>j(e,t))}function L(e,t){return()=>Promise.resolve(j(e,t))}let V=R;function H(){let e=(0,r.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,r.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function G(e,t=e=>e??{}){let[n,i]=(0,r.useState)();return(0,r.useEffect)(()=>{if(null==e||""===e.replace(" ",""))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,r.useEffect)(()=>{var r;let a;return(r=e=>{if(void 0!==e){let r=t?t(e):e??{};(0,x.b)(n,r)||i(r)}})(Object.freeze(Object.assign({},a=function(e,t=e=>e){let n=w.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}(e)))),w.subscribe(t=>{let n=e in t?t[e]:null;n!==a&&(a=n,r(Object.freeze(Object.assign({},n))))})},[]),n}var U=n(75133);function q(e){let[t,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>(0,l.zF)().subscribe(i=>{let r=i.slots[e]?.assignedExtensions.map(e=>e.id)??[];(0,U.A)(r,t)||n(r)}),[]),t}var W=n(30924);function K(e,t){let{data:n,error:i,mutate:a,isLoading:o,isValidating:s}=(0,M.Ay)(`${W.Zu}?patient=${e}&includeEncounterless=${t}`,S.lo);return(0,r.useMemo)(()=>({isLoading:o,data:n?.data.results??[],error:i,mutate:a,isValidating:s}),[n,i,o,s,a])}function Y(e){(0,r.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}var J=n(13070);let Z={},X=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
22
|
-
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function Q(e){let{moduleName:t,extension:n}=(0,r.useContext)(a),i=e?.externalModuleName??t;if(!i&&!n)throw Error(X);let o=function(e){let t=(0,r.useMemo)(()=>(0,J.IS)(e),[e]),n=function(e){let[t,n]=(0,r.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,r.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw Z[e]||(Z[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),Z[e];return n}(i),s=function(e){let t=(0,r.useMemo)(J.GI,[]),n=function(e,t){let[n,i]=(0,r.useState)(t?()=>{let n=e.getState(),i=(0,J.P0)(n,t.extensionSlotName,t.extensionId);if(i.loaded&&i.config)return i.config}:null);return(0,r.useEffect)(()=>{if(t)return e.subscribe(e=>{let r=(0,J.P0)(e,t.extensionSlotName,t.extensionId);r.loaded&&r.config&&!(0,U.A)(r.config,n)&&i(r.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!Z[n]&&t&&(Z[n]=new Promise(n=>{let i=t.subscribe(t=>{let r=(0,J.P0)(t,e.extensionSlotName,e.extensionId);r.loaded&&r.config&&(n(r.config),i())})})),Z[n]}return n||{}}(n);return(0,r.useMemo)(()=>e?.externalModuleName&&i===e.externalModuleName?{...o}:{...o,...s},[i,e?.externalModuleName,o,s])}let ee=y;var et=n(27760),en=n(9826);function ei(){let[e,t]=(0,r.useState)((0,en.s)());return(0,r.useEffect)(()=>(0,et.gj)(({online:e})=>t(e)),[]),e}function er(e,t=300){let[n,i]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let n=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var ea=n(44924);let eo=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function es(){let e=`${S.Jj}/emrapi/configuration?v=${eo}`,t=(0,ea.A)(e,S.lo);return(0,r.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let el=h((0,l.a9)());function ec(e){let t=y(e);return(0,r.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let eu=h((0,l.zF)());var ep=n(10201);function ed(e){let{flags:t}=f(ep.jX);return t[e]?.enabled??!1}function ef(){let[,e]=(0,r.useState)(0);return(0,r.useCallback)(()=>{e(e=>e+1)},[])}function em(e,t,n={}){return e_(e,t,eh,n)}let eh={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let i=new URL((0,S.Gm)(e.toString()),window.location.toString());return i.searchParams.set("limit",""+t),i.searchParams.set("startIndex",""+n),i.searchParams.set("totalCount","true"),i.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function e_(e,t,n,i={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:s,getData:l}=n,{immutable:c,swrConfig:u}=i,p=i.fetcher??S.lo,[d,f]=(0,r.useState)(1),m=(0,r.useRef)(NaN),h=(0,r.useRef)(NaN),g=(d-1)*t,y=(0,r.useMemo)(()=>a(e,t,g),[e,t,g]),{data:b,...v}=(c?ea.A:M.Ay)(y,p,u);b?.data&&(m.current=o(b?.data),h.current=s(b?.data));let A=Math.ceil(m.current/t),w=(0,r.useCallback)(e=>{0<e&&e<=A?f(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,d,A]),$=(0,r.useCallback)(()=>{w(d+1)},[e,d,A]),k=(0,r.useCallback)(()=>{w(d-1)},[e,d,A]);return{data:l(b?.data),totalPages:A,totalCount:m.current,currentPage:d,currentPageSize:h,paginated:A>1,showNextButton:d<A,showPreviousButton:d>1,goTo:w,goToNext:$,goToPrevious:k,...v}}function eg(e,t,n={}){return e_(e,t,ey(),n)}function ey(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let i=new URL((0,S.Gm)(e.toString()),window.location.toString());return i.searchParams.set("_count",""+t),i.searchParams.set("_getpagesoffset",""+n),i.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var eb=n(82910);function ev(e,t={}){return eA(e,eh,t)}function eA(e,t,n={}){let{swrInfiniteConfig:i,immutable:a}=n,{getNextUrl:o,getTotalCount:s,getData:l}=t,c=n.fetcher??S.lo,u=(0,r.useCallback)((n,i)=>0==n?e?.toString()??null:t.getNextUrl(i.data),[e]),{data:p,size:d,setSize:f,...m}=(0,eb.Ay)(u,c,{...i,...a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=o(p?.[p.length-1].data),g=s(p?.[0]?.data);return{data:p?.flatMap(e=>l(e.data)),totalCount:g,hasMore:null!=h,loadMore:()=>{f((p?.length??0)+1)},nextUri:h,...m}}function ew(e,t={}){return e$(e,eh,t)}function e$(e,t,n={}){let i=eA(e,t,n),{hasMore:a,error:o,data:s,loadMore:l,isLoading:c,nextUri:u}=i;return((0,r.useEffect)(()=>{a&&!o&&l()},[a,u]),n.partialData)?i:{...i,data:a||o?void 0:s,isLoading:c||a}}function ek(e,t={}){return e$(e,ey(),t)}function ex(e,t={}){return eA(e,ey(),t)}function eC(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function eE(){let[e,t]=(0,r.useState)(eC);return(0,r.useEffect)(()=>{let e=()=>{t(eC())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let eD=e=>"small-desktop"===e||"large-desktop"===e;function eS(e){let t=(0,r.useContext)(a);(0,r.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),(0,l.Vx)(e),()=>{(0,l.sr)(e.name)}),[t,e])}function eB(){return f(l.Gp)}function ez(e=null,t=null){let[n,i]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let n=(0,W.Vs)(e,t).subscribe(e=>{i(e)},e=>{console.error(e)});return()=>n.unsubscribe()},[e,t]),n}function eP(e,t=!0){let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let i=i=>{!t||!n.current||n.current.contains(i.target)||e(i)};return window.addEventListener("mousedown",i),window.addEventListener("touchstart",i),()=>{window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",i)}},[e,t]),n}function eT(e){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function eM(e,t={}){let{abortController:n,fetchInit:i,url:a,swrConfig:o}=t,s=H(),l=(0,r.useMemo)(()=>i?.signal??n?.signal??s.signal,[n?.signal,i?.signal,s.signal]),c=(0,r.useCallback)(e=>{let t=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,a);return(0,S.lo)(t,{...i,signal:l})},[l,i,a]);return(0,M.Ay)(e,c,o)}function eO(e=[],t=10){let[n,i]=(0,r.useState)(1),a=(0,r.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]),o=(0,r.useMemo)(()=>{let i=(n-1)*t,r=(n+0)*t;return e.slice(i,r)},[e,n,t]),s=(0,r.useCallback)(e=>{i(Math.max(1,Math.min(a,e)))},[i,a]),l=(0,r.useCallback)(()=>{n<a&&i(n+1)},[n,a,i]),c=(0,r.useCallback)(()=>{n>1&&i(n-1)},[n,i]);return(0,r.useMemo)(()=>({results:o,totalPages:a,currentPage:n,paginated:e.length>t,showNextButton:n<a,showPreviousButton:n>1,goTo:s,goToNext:l,goToPrevious:c}),[o,a,e.length,t,n,s,l,c])}function eF(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function eI(e){let[t,n]=(0,r.useState)(e??eF()),{data:i,error:a,isValidating:o}=(0,M.Ay)(t?["patient",t]:null,()=>(0,W.hG)(t,{}));return(0,r.useEffect)(()=>{let e=()=>{let e=eF();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,r.useMemo)(()=>({isLoading:o&&!a&&!i,patient:i,patientUuid:t,error:a}),[o,a,i,t])}function eN(){let e=`${S.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:i}=(0,M.Ay)(e,S.lo);return(0,r.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:i,error:n}),[t,n,i])}function ej(e){let{extensions:t,extensionSlotModuleName:n}=b(e);return e?t.map(t=>({state:i})=>r.createElement(a.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n}}},r.createElement(c,{state:i}))):[]}var eR=n(23464),eL=n(85602);let eV={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid},mutateVisit(e){for(let t of Object.values(e.mutateVisitCallbacks??{}))t();return{}}};function eH(e){let t=(0,r.useId)();return(0,r.useEffect)(()=>{let n=(0,W.BX)();return e&&n.setState({mutateVisitCallbacks:{...n.getState().mutateVisitCallbacks,[t]:e}}),()=>{if(e){let e={...n.getState().mutateVisitCallbacks};delete e[t],n.setState({mutateVisitCallbacks:e})}}},[t,e]),m((0,W.BX)(),eV)}function eG(e,t=W.Rb){let{patientUuid:n,manuallySetVisitUuid:i,setVisitContext:a}=eH(),o=e&&n==e?i:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${o}?v=${t}`,{data:c,error:u,mutate:p,isValidating:d}=(0,M.Ay)(e?`${S.Jj}/visit${s}`:null,S.lo),{data:f,error:m,mutate:h,isValidating:g}=(0,M.Ay)(e&&o?`${S.Jj}/visit${l}`:null,S.lo),y=(0,r.useMemo)(()=>c?.data.results.find(e=>null===e.stopDatetime)??null,[c]),b=(0,r.useMemo)(()=>o&&f?f.data:null,[f,o]),v=(0,r.useRef)(null);(0,r.useEffect)(()=>{!d&&y&&n===e&&null===i&&a(y),g||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&a(null),v.current=b)},[b,i,y,d,g,n]);let A=(0,r.useCallback)(()=>{p(),h()},[p,h]);return eH(A),{error:u||m,mutate:A,isValidating:d||g,activeVisit:y,currentVisit:b,currentVisitIsRetrospective:!!o,isLoading:!!((!c||o&&!f)&&(!u||!m))}}function eU(){let[e,t]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let e=(0,W.Pu)().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}function eq(){let e=(0,r.useRef)(),[t,n]=(0,r.useState)(null),a=null;if(!t){if(i){let e=(0,S.EW)().getState();e.loaded&&(a=e.session)}else i=new Promise(t=>{let n=({loaded:n,session:i})=>{n&&(t(i),a=i,e.current&&(e.current(),e.current=void 0))};n((0,S.EW)().getState()),a||(e.current=(0,S.EW)().subscribe(n))});if(a)n(a);else throw i}(0,r.useEffect)(()=>(e.current||(e.current=(0,S.EW)().subscribe(({loaded:e,session:t})=>{e&&(a=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||a;if(!o)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return o}eR.extend(eL)},467:function(e,t,n){"use strict";n.d(t,{i7:()=>c,jf:()=>l,CE:()=>s,Zd:()=>o});var i=n(90108),r=n(58644);let a={};function o(e,t){let n=a[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;{let n=(0,r.y)()(()=>t);return a[e]={value:n,active:!0},n}}function s(e,t){let n=a[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):(a[e]={value:t,active:!0},t)}function l(e,t){let n=a[e];if(!n){let n=(0,r.y)()(()=>t??{});return a[e]={value:n,active:!1},n}return n.value}function c(...e){let[t,n,r]=e,a=void 0===r?n:r,o=void 0===r?e=>e:n;return a(o(t.getState())),t.subscribe((e,t)=>{let n=o(e);(0,i.b)(t,n)||a(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=a)},1e3)},61836:function(e,t,n){"use strict";n.d(t,{V:()=>G,t:()=>H});let i={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"};var r=n(85761),a=n(93442);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),i.forEach(function(t){(0,a.A)(e,t,n[t])})}return e}var s=n(79736),l=n(36678);function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=n(98423);function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,d.A)(e,t)}var m={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},h=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.init(t,n)}return(0,l.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||m,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,o({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){(0,s.A)(this,e),this.observers={}}return(0,l.A)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function y(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function v(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(r())return{};var o=i(a.shift());!e[o]&&n&&(e[o]=new n),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{}}return r()?{}:{obj:e,k:i(a.shift())}}function A(e,t,n){var i=v(e,t,Object);i.obj[i.k]=n}function w(e,t){var n=v(e,t),i=n.obj,r=n.k;if(i)return i[r]}function $(e,t,n){var i=w(e,n);return void 0!==i?i:w(t,n)}function k(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function C(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return x[e]}):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,D=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,s.A)(this,t),n=u(this,p(t).call(this)),E&&g.call(c(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),(0,l.A)(t,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=[e,t];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(a=e.split(".")),w(this.data,a)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),A(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)("string"==typeof n[r]||"[object Array]"===Object.prototype.toString.apply(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=t,t=s[1]),this.addNamespaces(t);var l=w(this.data,s)||{};i?function e(t,n,i){for(var r in n)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof n[r]||n[r]instanceof String?i&&(t[r]=n[r]):e(t[r],n[r],i):t[r]=n[r]);return t}(l,n,r):l=o({},l,n),A(this.data,s,l),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?o({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),S={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,n,i,r))}),t}},B={},z=function(e){function t(e){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.A)(this,t),r=u(this,p(t).call(this)),E&&g.call(c(r)),n=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=c(r),n.forEach(function(t){e[t]&&(i[t]=e[t])}),r.options=a,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=h.create("translator"),r}return f(t,e),(0,l.A)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:r};var o=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,n,i){var a=this;if("object"!==(0,r.A)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,l=this.extractFromKey(e[e.length-1],n),c=l.key,u=l.namespaces,p=u[u.length-1],d=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase())return f?p+(n.nsSeparator||this.options.nsSeparator)+c:c;var m=this.resolve(e,n),h=m&&m.res,g=m&&m.usedKey||c,y=m&&m.exactUsedKey||c,b=Object.prototype.toString.apply(h),v=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(A&&h&&w&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof v||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var $="[object Array]"===b,k=$?[]:{},x=$?y:g;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var E="".concat(x).concat(s).concat(C);k[C]=this.translate(E,o({},n,{joinArrays:!1,ns:u})),k[C]===E&&(k[C]=h[C])}h=k}}else if(A&&"string"==typeof v&&"[object Array]"===b)(h=h.join(v))&&(h=this.extendTranslation(h,e,n,i));else{var D=!1,S=!1,B=void 0!==n.count&&"string"!=typeof n.count,z=t.hasDefaultValue(n),P=B?this.pluralResolver.getSuffix(d,n.count):"",T=n["defaultValue".concat(P)]||n.defaultValue;!this.isValidLookup(h)&&z&&(D=!0,h=T),this.isValidLookup(h)||(S=!0,h=c);var M=z&&T!==h&&this.options.updateMissing;if(S||D||M){if(this.logger.log(M?"updateKey":"missingKey",d,p,c,M?T:h),s){var O=this.resolve(c,o({},n,{keySeparator:!1}));O&&O.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var N=0;N<I.length;N++)F.push(I[N]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(n.lng||this.language):F.push(n.lng||this.language);var j=function(e,t,i){a.options.missingKeyHandler?a.options.missingKeyHandler(e,p,t,M?i:h,M,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,p,t,M?i:h,M,n),a.emit("missingKey",e,p,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&B?F.forEach(function(e){a.pluralResolver.getSuffixes(e).forEach(function(t){j([e],c+t,n["defaultValue".concat(t)]||T)})}):j(F,c,T))}h=this.extendTranslation(h,e,n,m,i),S&&h===c&&this.options.appendNamespaceToMissingKey&&(h="".concat(p,":").concat(c)),S&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(o({},n,{interpolation:o({},this.options.interpolation,n.interpolation)}));var s,l=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=o({},this.options.interpolation.defaultVariables,u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),l){var p=e.match(this.interpolator.nestingRegexp);s<(p&&p.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return r&&r[0]===i[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):a.translate.apply(a,i.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=S.handle(f,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!o.isValidLookup(t)){var l=o.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;o.options.fallbackNS&&(u=u.concat(o.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,f=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);u.forEach(function(e){o.isValidLookup(t)||(a=e,!B["".concat(f[0],"-").concat(e)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(a)&&(B["".concat(f[0],"-").concat(e)]=!0,o.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(function(n){if(!o.isValidLookup(t)){r=n;var a,l,u=c,f=[u];for(o.i18nFormat&&o.i18nFormat.addLookupKeys?o.i18nFormat.addLookupKeys(f,c,n,e,s):(p&&(a=o.pluralResolver.getSuffix(n,s.count)),p&&d&&f.push(u+a),d&&f.push(u+="".concat(o.options.contextSeparator).concat(s.context)),p&&f.push(u+=a));l=f.pop();)o.isValidLookup(t)||(i=l,t=o.getResource(n,e,l,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(g);function P(e){return e.charAt(0).toUpperCase()+e.slice(1)}var T=function(){function e(t){(0,s.A)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=h.create("languageUtils")}return(0,l.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var i=n.formatLanguageCode(e);(!n.options.supportedLngs||n.isSupportedCode(i))&&(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(i))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],a=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),i.forEach(function(e){0>r.indexOf(e)&&a(n.formatLanguageCode(e))}),r}}]),e}(),M=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],O={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},F=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.languageUtils=t,this.options=i,this.logger=h.create("pluralResolver"),this.rules=(n={},M.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:O[e.fc]}})}),n)}return(0,l.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map(function(e){return t+e})}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map(function(n){return t.getSuffix(e,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),a=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):o():"v2"===this.options.compatibilityJSON?o():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),I=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=h.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,l.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:C,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?k(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?k(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?k(t.nestingPrefix):t.nestingPrefixEscaped||k("$t("),this.nestingSuffix=t.nestingSuffix?k(t.nestingSuffix):t.nestingSuffixEscaped||k(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,a,o,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(s.formatSeparator)){var r=$(t,l,e);return s.alwaysFormat?s.format(r,void 0,n):r}var a=e.split(s.formatSeparator),o=a.shift().trim(),c=a.join(s.formatSeparator).trim();return s.format($(t,l,o),c,n,i)};this.resetRegExp();var p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(o=0;r=t.regex.exec(e);){if(void 0===(a=u(r[1].trim())))if("function"==typeof p){var n=p(e,r,i);a="string"==typeof n?n:""}else if(d){a=r[0];continue}else s.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=b(a));if(e=e.replace(r[0],t.safeValue(a)),t.regex.lastIndex=0,++o>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,i,r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o({},a);function l(e,t){var n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,s)).replace(/'/g,'"');try{s=JSON.parse(r),t&&(s=o({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(r)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],u=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var p=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=p.shift(),c=p,u=!0}if((i=t(l.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=b(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),u&&(i=c.reduce(function(e,t){return r.format(e,t,a.lng,a)},i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}(),N=function(e){function t(e,n,i){var r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,s.A)(this,t),r=u(this,p(t).call(this)),E&&g.call(c(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=a,r.logger=h.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,a.backend,a),r}return f(t,e),(0,l.A)(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,a=[],o=[],s=[],l=[];return e.forEach(function(e){var i=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[s]=2:r.state[s]<0||(1===r.state[s]?0>o.indexOf(s)&&o.push(s):(r.state[s]=1,i=!1,0>o.indexOf(s)&&o.push(s),0>a.indexOf(s)&&a.push(s),0>l.indexOf(t)&&l.push(t)))}),i||s.push(e)}),(a.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:i}),{toLoad:a,pending:o,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),n&&this.store.addResourceBundle(r,a,n),this.state[e]=t?-1:2;var o={};this.queue.forEach(function(n){i=n.loaded,(c=(l=v(i,[r],Object)).obj)[u=l.k]=c[u]||[],s||c[u].push(a);for(var i,s,l,c,u,p=n.pending,d=p.indexOf(e);-1!==d;)p.splice(d,1),d=p.indexOf(e);t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(e){o[e]||(o[e]=[]),n.loaded[e].length&&n.loaded[e].forEach(function(t){0>o[e].indexOf(t)&&o[e].push(t)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,l){s&&l&&r<5?setTimeout(function(){i.read.call(i,e,t,n,r+1,2*a,o)},a):o(s,l)}):o(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,function(i,o){i&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(r," failed"),i),!i&&o&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(r),o),t.loaded(e,i,o)})}},{key:"saveMissing",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==n||""===n||(this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,o({},a,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i))}}]),t}(g);function j(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&0>e.whitelist.indexOf("cimode")&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function R(){}var L=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if((0,s.A)(this,t),e=u(this,p(t).call(this)),E&&g.call(c(e)),e.options=j(n),e.services={},e.logger=h,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),u(e,c(e));setTimeout(function(){e.init(n,i)},0)}return e}return f(t,e),(0,l.A)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=o({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.A)(e[2])||"object"===(0,r.A)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,j(t)),this.format=this.options.interpolation.format,n||(n=R),!this.options.isClone){this.modules.logger?h.init(i(this.modules.logger),this.options):h.init(null,this.options);var a=new T(this.options);this.store=new D(this.options.resources,this.options);var s=this.services;s.logger=h,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new F(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new I(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new N(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new z(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var c=y(),u=function(){var t=function(t,i){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,i=n,r="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return i();var a=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)}),this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(a,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(e,t,n){var i=y();return e||(e=this.languages),t||(t=this.options.ns),n||(n=R),this.services.backendConnector.reload(e,t,function(e){i.resolve(),n(e)}),i}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&S.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=y();this.emit("languageChanging",e);var r=function(e,r){r?(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})},a=function(e){var t="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);t&&(n.language||(n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t)),n.translator.language||n.translator.changeLanguage(t),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(t)),n.loadResources(t,function(e){r(e,t)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var a;if("object"!==(0,r.A)(i)){for(var s=arguments.length,l=Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,i].concat(l))}else a=o({},i);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var o=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===i||2===i};if(n.precheck){var s=n.precheck(this,o);if(void 0!==s)return s}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||o(i,e)&&(!r||o(a,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=y();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>n.options.ns.indexOf(e)&&n.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=y();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter(function(e){return 0>i.indexOf(e)});return r.length?(this.options.preload=i.concat(r),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,r=o({},this.options,n,{isClone:!0}),a=new t(r);return["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new z(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a.emit.apply(a,[e].concat(n))}),a.init(r,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g));let V=L.default||L;function H(e,t,n,i){return V.t(t,{ns:e,defaultValue:n,...i})}function G(e,t,n){return i[e]?H("core",e,t??i[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}V.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},40785:function(e,t,n){"use strict";n.d(t,{K:()=>c});var i=n(18140),r=n(8902),a=n(23464),o=n(44397),s=n(10840),l=n(42729);function c(e,t=a()){let n;if(null==e)return null;let o=(0,l.J)(),u=a(t);if("string"==typeof e){let t=(0,r.CD)(e,o);if(t.invalid)return console.warn(`Could not interpret '${e}' as a date`),null;t.day&&!t.month&&(t=Object.assign({},(0,s.A)(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},(0,s.A)(t,"day"),{date:t.day})),n=a(u).set(t)}else n=a(e);let p=u.diff(n,"hours"),d=u.diff(n,"days"),f=u.diff(n,"weeks"),m=u.diff(n,"months"),h=u.diff(n,"years"),g={},y={style:"short",localeMatcher:"lookup"};if(p<2){let e=u.diff(n,"minutes");g.minutes=e,0===e&&(y.minutesDisplay="always")}else if(d<2)g.hours=p;else if(f<4)g.days=d;else if(h<1){let e=u.subtract(f,"weeks").diff(n,"days");g.weeks=f,g.days=e}else if(h<2){let e=u.subtract(m,"months").diff(n,"days");g.months=m,g.days=e}else if(h<18){let e=u.subtract(h,"year").diff(n,"months");g.years=h,g.months=e}else g.years=h;return new i.DurationFormat(o,y).format(g)}a.extend(o)},22613:function(e,t,n){"use strict";n.d(t,{Rt:()=>z,vU:()=>y,hl:()=>g,XE:()=>k,fU:()=>B,a3:()=>T,LW:()=>E,_U:()=>A,d4:()=>P,l0:()=>v,a7:()=>x,kQ:()=>b,Yq:()=>D});var i=n(31530),r=n(32878),a=n(18140),o=n(8902),s=n(23464),l=n(85602),c=n(44397),u=n(57657);let p=function(e){return null==e};var d=n(10840),f=n(42729);function m(e,t){var n=function(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t,0);return n.get?n.get.call(e):n.value}s.extend(l),s.extend(u),s.extend(c);let h="YYYY-MM-DDTHH:mm:ss.SSSZZ";function g(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&s(e,h).isValid()}function y(e){return s(e).isToday()}function b(e){return g(e)?s(e,h).toDate():null}function v(e,t=!1){let n=s(e);return t&&(n=n.utc()),n.format(h)}function A(e){return s(e).toDate()}var w=new WeakMap;let $=new class{register(e,t){m(this,w).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(m(this,w).has(t))return m(this,w).get(t)}if(e.language&&m(this,w).has(e.language))return m(this,w).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return m(this,w).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,w,{writable:!0,value:new Map})}};function k(e,t){$.register(e,t)}function x(e){let t=e??(0,f.J)();return $.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let C={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function E(e,t={}){let n=(0,f.J)(),i=(0,o.CD)(e,n);if(i.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!p(i.day)&&p(i.month)&&(i=Object.assign({},(0,d.A)(i,"day"),{month:i.day})),i.month&&(i.month-=1),i.day&&(i=Object.assign({},(0,d.A)(i,"day"),{date:i.day}));let r=s().set(i).toDate();return p(i.year)&&(t.year=!1),p(i.month)&&(t.month=!1),p(i.date)&&(t.day=!1),D(r,t)}function D(e,t){let n,i=t?.locale??(0,f.J)(),r=new Intl.Locale(i),{calendar:a,mode:o,time:l,day:c,month:u,year:p,noToday:d,numberingSystem:m}={...C,...{noToday:"am"===r.language},...t},h={calendar:a??x(r),year:p?"numeric":void 0,month:u?"short":void 0,day:c?"2-digit":void 0,numberingSystem:m},g=s(e).isToday();if(g&&!d)n=(n=new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(i)+n.slice(1);else{"en"===r.language&&(i="en-GB");let t=new Intl.DateTimeFormat(i,h).formatToParts(e);("en"===r.language||"am"===r.language)&&"standard"==o&&p&&c&&(t=t.map(S("-"))),"wide"==o&&(t=t.map(S(" — "))),"ethiopic"===h.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===l||g&&"for today"===l)&&(n+=`, ${B(e)}`),n}let S=e=>(t,n,i)=>"literal"!==t.type||" "!==t.value||n<i.length-1&&"era"===i[n+1].type?t:{type:"literal",value:e};function B(e){return e.toLocaleTimeString((0,f.J)(),{hour:"2-digit",minute:"2-digit"})}function z(e,t){return D(e,{...t,time:!0})}function P(e,t){let n=x("string"==typeof t?new Intl.Locale(t):t);return n?(0,i.yP)(e,(0,r.d)(n)):e}function T(e,t){return new a.DurationFormat((0,f.J)(),t).format(e)}},42729:function(e,t,n){"use strict";function i(){let e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e}n.d(t,{J:()=>i})},9826:function(e,t,n){"use strict";function i(e){return!window.offlineEnabled||(e??navigator.onLine)}n.d(t,{s:()=>i})},67943:function(e,t,n){"use strict";function i(e){return a(s(e,"usual","official"))}function r(e){return i(e)}function a(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function o(e){return a(e)}function s(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,i;return t=e,i=n,t.use?t.use===i:"usual"===i});if(t)return t}}n.d(t,{QC:()=>r,Qr:()=>a,VO:()=>s,Vp:()=>i,qK:()=>o})},90108:function(e,t,n){"use strict";function i(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||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)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);return n.length===i.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>i})},22695:function(e,t,n){"use strict";n.d(t,{f:()=>U,I:()=>C,j:()=>H,c:()=>V,B:()=>f,n:()=>j,g:()=>W,r:()=>E,u:()=>S,U:()=>l,d:()=>G,o:()=>N,z:()=>A,s:()=>F,a:()=>p,O:()=>c,e:()=>u,S:()=>q,i:()=>y,t:()=>D,b:()=>o,m:()=>d});var i=n(35400),r=n(67395),a=Object.prototype.hasOwnProperty;let o=new WeakMap,s=()=>{},l=s(),c=Object,u=e=>e===l,p=e=>"function"==typeof e,d=(e,t)=>({...e,...t}),f=e=>p(e.then),m={},h={},g="undefined",y=typeof window!=g,b=typeof document!=g,v=y&&"Deno"in window,A=(e,t)=>{let n=o.get(e);return[()=>!u(t)&&e.get(t)||m,i=>{if(!u(t)){let r=e.get(t);t in h||(h[t]=r),n[5](t,d(r,i),r||m)}},n[6],()=>!u(t)&&t in h?h[t]:!u(t)&&e.get(t)||m]},w=!0,[$,k]=y&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[s,s],x={initFocus:e=>(b&&document.addEventListener("visibilitychange",e),$("focus",e),()=>{b&&document.removeEventListener("visibilitychange",e),k("focus",e)}),initReconnect:e=>{let t=()=>{w=!0,e()},n=()=>{w=!1};return $("online",t),$("offline",n),()=>{k("online",t),k("offline",n)}}},C=!i.useId,E=!y||v,D=e=>y&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(e):setTimeout(e,1),S=E?i.useEffect:i.useLayoutEffect,B="undefined"!=typeof navigator&&navigator.connection,z=!E&&B&&(["slow-2g","2g"].includes(B.effectiveType)||B.saveData),P=new WeakMap,T=(e,t)=>e===`[object ${t}]`,M=0,O=e=>{let t,n,i=typeof e,r=c.prototype.toString.call(e),a=T(r,"Date"),o=T(r,"RegExp"),s=T(r,"Object");if(c(e)!==e||a||o)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=P.get(e))return t;if(t=++M+"~",P.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=O(e[n])+",";P.set(e,t)}if(s){t="#";let i=c.keys(e).sort();for(;!u(n=i.pop());)u(e[n])||(t+=n+":"+O(e[n])+",");P.set(e,t)}}return t},F=e=>{if(p(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?O(e):"",t]},I=0,N=()=>++I;async function j(...e){let[t,n,i,a]=e,s=d({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),c=s.populateCache,m=s.rollbackOnError,h=s.optimisticData,g=s.throwOnError;if(p(n)){let e=[];for(let i of t.keys())!/^\$(inf|sub)\$/.test(i)&&n(t.get(i)._k)&&e.push(i);return Promise.all(e.map(y))}return y(n);async function y(n){let a,[d]=F(n);if(!d)return;let[y,b]=A(t,d),[v,w,$,k]=o.get(t),x=()=>{let e=v[d];return(p(s.revalidate)?s.revalidate(y().data,n):!1!==s.revalidate)&&(delete $[d],delete k[d],e&&e[0])?e[0](r.q2).then(()=>y().data):y().data};if(e.length<3)return x();let C=i,E=!1,D=N();w[d]=[D,0];let S=!u(h),B=y(),z=B.data,P=B._c,T=u(P)?z:P;if(S&&b({data:h=p(h)?h(T,z):h,_c:T}),p(C))try{C=C(T)}catch(e){a=e,E=!0}if(C&&f(C)){let e;if(C=await C.catch(e=>{a=e,E=!0}),D!==w[d][0]){if(E)throw a;return C}E&&S&&(e=a,"function"==typeof m?m(e):!1!==m)&&(c=!0,b({data:T,_c:l}))}if(c&&!E&&(p(c)?b({data:c(C,T),error:l,_c:l}):b({data:C,error:l,_c:l})),w[d][1]=N(),Promise.resolve(x()).then(()=>{b({_c:l})}),E){if(g)throw a;return}return C}}let R=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},L=(e,t)=>{if(!o.has(e)){let n=d(x,t),i=Object.create(null),a=j.bind(l,e),c=s,u=Object.create(null),p=(e,t)=>{let n=u[e]||[];return u[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,i)=>{e.set(t,n);let r=u[t];if(r)for(let e of r)e(n,i)},m=()=>{if(!o.has(e)&&(o.set(e,[i,Object.create(null),Object.create(null),Object.create(null),a,f,p]),!E)){let t=n.initFocus(setTimeout.bind(l,R.bind(l,i,r.CC))),a=n.initReconnect(setTimeout.bind(l,R.bind(l,i,r.jB)));c=()=>{t&&t(),a&&a(),o.delete(e)}}};return m(),[e,a,m,c]}return[e,o.get(e)[4]]},[V,H]=L(new Map),G=d({onLoadingSlow:s,onSuccess:s,onError:s,onErrorRetry:(e,t,n,i,r)=>{let a=n.errorRetryCount,o=r.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;(u(a)||!(o>a))&&setTimeout(i,s,r)},onDiscarded:s,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:z?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:z?5e3:3e3,compare:function e(t,n){var i,r;if(t===n)return!0;if(t&&n&&(i=t.constructor)===n.constructor){if(i===Date)return t.getTime()===n.getTime();if(i===RegExp)return t.toString()===n.toString();if(i===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return -1===r}if(!i||"object"==typeof t){for(i in r=0,t)if(a.call(t,i)&&++r&&!a.call(n,i)||!(i in n)||!e(t[i],n[i]))return!1;return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:V,mutate:H,fallback:{}},{isOnline:()=>w,isVisible:()=>{let e=b&&document.visibilityState;return u(e)||"hidden"!==e}}),U=(e,t)=>{let n=d(e,t);if(t){let{use:i,fallback:r}=e,{use:a,fallback:o}=t;i&&a&&(n.use=i.concat(a)),r&&o&&(n.fallback=d(r,o))}return n},q=(0,i.createContext)({}),W=e=>{let{value:t}=e,n=(0,i.useContext)(q),r=p(t),a=(0,i.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,i.useMemo)(()=>r?a:U(n,a),[r,n,a]),s=a&&a.provider,c=(0,i.useRef)(l);s&&!c.current&&(c.current=L(s(o.cache||V),a));let u=c.current;return u&&(o.cache=u[0],o.mutate=u[1]),S(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,i.createElement)(q.Provider,d(e,{value:o}))}},12215:function(e,t,n){"use strict";n.d(t,{q:()=>i});let i="$inf$"},67395:function(e,t,n){"use strict";n.d(t,{CC:()=>i,I0:()=>o,jB:()=>r,q2:()=>a});let i=0,r=1,a=2,o=3},64764:function(e,t,n){"use strict";n.d(t,{Ht:()=>d,aw:()=>p,qm:()=>u});var i=n(22695),r=n(12215),a=n(35400);let o=i.i&&window.__SWR_DEVTOOLS_USE__,s=o?window.__SWR_DEVTOOLS_USE__:[],l=e=>(0,i.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],c=s.concat(e=>(t,n,a)=>{let o=n&&((...e)=>{let[a]=(0,i.s)(t),[,,,o]=i.b.get(i.c);if(a.startsWith(r.q))return n(...e);let s=o[a];return(0,i.e)(s)?n(...e):(delete o[a],s)});return e(t,o,a)}),u=e=>function(...t){let n,r=(n=(0,a.useContext)(i.S),(0,a.useMemo)(()=>(0,i.m)(i.d,n),[n])),[o,s,u]=l(t),p=(0,i.f)(r,u),d=e,{use:f}=p,m=(f||[]).concat(c);for(let e=m.length;e--;)d=m[e](d);return d(o,s||p.fetcher||null,p)},p=(e,t,n)=>{let i=t[e]||(t[e]=[]);return i.push(n),()=>{let e=i.indexOf(n);e>=0&&(i[e]=i[i.length-1],i.pop())}},d=(e,t)=>(...n)=>{let[i,r,a]=l(n),o=(a.use||[]).concat(t);return e(i,r,{...a,use:o})};o&&(window.__SWR_DEVTOOLS_REACT__=a)},44924:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(13624);let r=(0,n(64764).Ht)(i.Ay,e=>(t,n,i)=>(i.revalidateOnFocus=!1,i.revalidateIfStale=!1,i.revalidateOnReconnect=!1,e(t,n,i)))},13624:function(e,t,n){"use strict";n.d(t,{Ay:()=>m,BE:()=>f});var i=n(35400),r=n(58139),a=n(22695),o=n(67395),s=n(64764);let l=()=>{},c=l(),u=(new WeakMap,i.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),p={dedupe:!0},d=Promise.resolve(a.U),f=a.O.defineProperty(a.g,"defaultValue",{value:a.d}),m=(0,s.qm)((e,t,n)=>{let{cache:l,compare:c,suspense:f,fallbackData:m,revalidateOnMount:h,revalidateIfStale:g,refreshInterval:y,refreshWhenHidden:b,refreshWhenOffline:v,keepPreviousData:A}=n,[w,$,k,x]=a.b.get(l),[C,E]=(0,a.s)(e),D=(0,i.useRef)(!1),S=(0,i.useRef)(!1),B=(0,i.useRef)(C),z=(0,i.useRef)(t),P=(0,i.useRef)(n),T=()=>P.current.isVisible()&&P.current.isOnline(),[M,O,F,I]=(0,a.z)(l,C),N=(0,i.useRef)({}).current,j=(0,a.e)(m)?(0,a.e)(n.fallback)?a.U:n.fallback[C]:m,R=(e,t)=>{for(let n in N)if("data"===n){if(!c(e[n],t[n])&&(!(0,a.e)(e[n])||!c(Y,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},L=(0,i.useMemo)(()=>{let e=!!C&&!!t&&((0,a.e)(h)?!P.current.isPaused()&&!f&&!1!==g:h),n=t=>{let n=(0,a.m)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},i=M(),r=I(),o=n(i),s=i===r?o:n(r),l=o;return[()=>{let e=n(M());return R(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,C]),V=(0,r.useSyncExternalStore)((0,i.useCallback)(e=>F(C,(t,n)=>{R(n,t)||e()}),[l,C]),L[0],L[1]),H=!D.current,G=w[C]&&w[C].length>0,U=V.data,q=(0,a.e)(U)?j&&(0,a.B)(j)?u(j):j:U,W=V.error,K=(0,i.useRef)(q),Y=A?(0,a.e)(U)?(0,a.e)(K.current)?q:K.current:U:q,J=(!G||!!(0,a.e)(W))&&(H&&!(0,a.e)(h)?h:!P.current.isPaused()&&(f?!(0,a.e)(q)&&g:(0,a.e)(q)||g)),Z=!!(C&&t&&H&&J),X=(0,a.e)(V.isValidating)?Z:V.isValidating,Q=(0,a.e)(V.isLoading)?Z:V.isLoading,ee=(0,i.useCallback)(async e=>{let t,i,r=z.current;if(!C||!r||S.current||P.current.isPaused())return!1;let s=!0,l=e||{},u=!k[C]||!l.dedupe,p=()=>a.I?!S.current&&C===B.current&&D.current:C===B.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},m=()=>{let e=k[C];e&&e[1]===i&&delete k[C]},h={isValidating:!0};(0,a.e)(M().data)&&(h.isLoading=!0);try{if(u&&(O(h),n.loadingTimeout&&(0,a.e)(M().data)&&setTimeout(()=>{s&&p()&&P.current.onLoadingSlow(C,n)},n.loadingTimeout),k[C]=[r(E),(0,a.o)()]),[t,i]=k[C],t=await t,u&&setTimeout(m,n.dedupingInterval),!k[C]||k[C][1]!==i)return u&&p()&&P.current.onDiscarded(C),!1;d.error=a.U;let e=$[C];if(!(0,a.e)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),u&&p()&&P.current.onDiscarded(C),!1;let o=M().data;d.data=c(o,t)?o:t,u&&p()&&P.current.onSuccess(t,C,n)}catch(n){m();let e=P.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,u&&p()&&(e.onError(n,C,e),(!0===t||(0,a.a)(t)&&t(n))&&(!P.current.revalidateOnFocus||!P.current.revalidateOnReconnect||T())&&e.onErrorRetry(n,C,e,e=>{let t=w[C];t&&t[0]&&t[0](o.I0,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,l]),et=(0,i.useCallback)((...e)=>(0,a.n)(l,B.current,...e),[]);if((0,a.u)(()=>{z.current=t,P.current=n,(0,a.e)(U)||(K.current=U)}),(0,a.u)(()=>{if(!C)return;let e=ee.bind(a.U,p),t=0;P.current.revalidateOnFocus&&(t=Date.now()+P.current.focusThrottleInterval);let n=(0,s.aw)(C,w,(n,i={})=>{if(n==o.CC){let n=Date.now();P.current.revalidateOnFocus&&n>t&&T()&&(t=n+P.current.focusThrottleInterval,e())}else if(n==o.jB)P.current.revalidateOnReconnect&&T()&&e();else if(n==o.q2)return ee();else if(n==o.I0)return ee(i)});return S.current=!1,B.current=C,D.current=!0,O({_k:E}),J&&!k[C]&&((0,a.e)(q)||a.r?e():(0,a.t)(e)),()=>{S.current=!0,n()}},[C]),(0,a.u)(()=>{let e;function t(){let t=(0,a.a)(y)?y(M().data):y;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!M().error&&(b||P.current.isVisible())&&(v||P.current.isOnline())?ee(p).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[y,b,v,C]),(0,i.useDebugValue)(Y),f){let e=C&&(0,a.e)(q);if(!a.I&&a.r&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(z.current=t,P.current=n,S.current=!1);let i=x[C];if(u(!(0,a.e)(i)&&e?et(i):d),!(0,a.e)(W)&&e)throw W;let r=e?ee(p):d;!(0,a.e)(Y)&&e&&(r.status="fulfilled",r.value=!0),u(r)}return{mutate:et,get data(){return N.data=!0,Y},get error(){return N.error=!0,W},get isValidating(){return N.isValidating=!0,X},get isLoading(){return N.isLoading=!0,Q}}})},82910:function(e,t,n){"use strict";n.d(t,{Ay:()=>b});var i=n(35400),r=n(13624),a=n(22695),o=n(12215),s=n(64764),l=n(58139);let c=()=>{},u=c(),p=Object,d=e=>e===u,f=new WeakMap,m=(e,t)=>e===`[object ${t}]`,h=0,g=e=>{let t,n,i=typeof e,r=p.prototype.toString.call(e),a=m(r,"Date"),o=m(r,"RegExp"),s=m(r,"Object");if(p(e)!==e||a||o)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=f.get(e))return t;if(t=++h+"~",f.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=g(e[n])+",";f.set(e,t)}if(s){t="#";let i=p.keys(e).sort();for(;!d(n=i.pop());)d(e[n])||(t+=n+":"+g(e[n])+",");f.set(e,t)}}return t},y=Promise.resolve(),b=(0,s.Ht)(r.Ay,e=>(t,n,r)=>{let s,c=(0,i.useRef)(!1),{cache:u,initialSize:p=1,revalidateAll:d=!1,persistSize:f=!1,revalidateFirstPage:m=!0,revalidateOnMount:h=!1,parallel:b=!1}=r,[,,,v]=a.b.get(a.c);try{(s=(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t]})(t?t(0,null):null)[0])&&(s=o.q+s)}catch(e){}let[A,w,$]=(0,a.z)(u,s),k=(0,i.useCallback)(()=>(0,a.e)(A()._l)?p:A()._l,[u,s,p]);(0,l.useSyncExternalStore)((0,i.useCallback)(e=>s?$(s,()=>{e()}):()=>{},[u,s]),k,k);let x=(0,i.useCallback)(()=>{let e=A()._l;return(0,a.e)(e)?p:e},[s,p]),C=(0,i.useRef)(x());(0,a.u)(()=>{if(!c.current){c.current=!0;return}s&&w({_l:f?C.current:x()})},[s,u]);let E=h&&!c.current,D=e(s,async e=>{let i=A()._i,o=A()._r;w({_r:a.U});let s=[],l=x(),[c]=(0,a.z)(u,e),p=c().data,f=[],h=null;for(let e=0;e<l;++e){let[l,c]=(0,a.s)(t(e,b?null:h));if(!l)break;let[g,y]=(0,a.z)(u,l),A=g().data,w=d||i||(0,a.e)(A)||m&&!e&&!(0,a.e)(p)||E||p&&!(0,a.e)(p[e])&&!r.compare(p[e],A);if(n&&("function"==typeof o?o(A,c):w)){let t=async()=>{if(l in v){let e=v[l];delete v[l],A=await e}else A=await n(c);y({data:A,_k:c}),s[e]=A};b?f.push(t):await t()}else s[e]=A;b||(h=A)}return b&&await Promise.all(f.map(e=>e())),w({_i:a.U}),s},r),S=(0,i.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},i=!1!==n.revalidate;return s?(i&&((0,a.e)(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?D.mutate(e,{...n,revalidate:i}):D.mutate()):y},[s,u]),B=(0,i.useCallback)(e=>{let n;if(!s)return y;let[,i]=(0,a.z)(u,s);if((0,a.a)(e)?n=e(x()):"number"==typeof e&&(n=e),"number"!=typeof n)return y;i({_l:n}),C.current=n;let r=[],[o]=(0,a.z)(u,s),l=null;for(let e=0;e<n;++e){let[n]=(0,a.s)(t(e,l)),[i]=(0,a.z)(u,n),s=n?i().data:a.U;if((0,a.e)(s))return S(o().data);r.push(s),l=s}return S(r)},[s,u,S,x]);return{size:x(),setSize:B,mutate:S,get data(){return D.data},get error(){return D.error},get isValidating(){return D.isValidating},get isLoading(){return D.isLoading}}})},58644:function(e,t,n){"use strict";n.d(t,{y:()=>r});let i=e=>{let t,n=new Set,i=(e,i)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=i?i:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,a={setState:i,getState:r,getInitialState:()=>o,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()}},o=t=e(i,r,a);return a},r=e=>e?i(e):i}}]);
|
|
21
|
+
${e.stack}`,r(t)}}function o(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)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,i.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},6250:function(e,t,n){"use strict";n.d(t,{dX:()=>u,wE:()=>m,_3:()=>o,uN:()=>f,$F:()=>p,Gz:()=>c,eb:()=>l,Sj:()=>d,mv:()=>s,PQ:()=>i.A});var i=n(60950);let r="ArrowFunctionExpression";var a=n(74339);function o(e,t={}){return d(e,t,h)}async function s(e,t={}){return f(e,t,h)}function l(e,t={}){return d(e,t,g)}function c(e,t={}){return f(e,t,g)}function u(e,t={}){return d(e,t,y)}function p(e,t={}){return f(e,t,y)}function d(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;null==t&&(t={});let r=A(t,a.z),o=b("string"==typeof e?(0,i.A)(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function f(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);null==t&&(t={});let r=A(t,a.f);return Promise.resolve(b("string"==typeof e?(0,i.A)(e):e,r)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function m(e){return(0,i.A)(e)}function h(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function g(e){return"boolean"==typeof e}function y(e){return"number"==typeof e}function b(e,t){switch(e.type){case"UnaryExpression":var n,i,r,a,o,s,l,c,u,p,d,f,m=e,h=t;let g=b(m.argument,h);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var y=e,A=t;let x=b(y.left,A),C=b(y.right,A);switch(y.operator){case"+":return x+C;case"-":return x-C;case"*":return x*C;case"/":return x/C;case"%":return x%C;case"**":return x**C;case"==":return x==C;case"===":return x===C;case"!=":return x!=C;case"!==":return x!==C;case">":return x>C;case">=":return x>=C;case"<":return x<C;case"<=":return x<=C;case"in":return x in C;case"&&":return x&&C;case"||":return x||C;case"??":return x??C;default:throw`Expression evaluator does not support operator '${y.operator}' operator`}case"ConditionalExpression":return n=e,i=t,b(n.test,i)?b(n.consequent,i):b(n.alternate,i);case"CallExpression":var E=e,D=t;let S=E.arguments?.map(w(D)),B=b(E.callee,D);if(B){if("function"!=typeof B)throw`${k(E.callee)} is not a function`}else throw`No function named ${k(E.callee)} is defined in this context`;return B(...S);case"ArrowFunctionExpression":let z;return r=e,a=t,z=r.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<z.length)throw`Required argument(s) ${z.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(z.reduce((t,n,i)=>{let r=e[i];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(r)&&t.push([n,r]),t},[]));return b(r.body,a.addVariables(t))}).bind(a.thisObj??null);case"MemberExpression":return function(e,t){let n,i=b(e.object,t);if(void 0===i)switch(e.object.type){case"Identifier":{let n=v(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":{let n=v(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${n}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let r=i;if("string"==typeof i)r=String.prototype;else if("number"==typeof i)r=Number.prototype;else if("function"==typeof i);else if("object"!=typeof i)throw`VisitMemberExpression does not support member access on type ${typeof i}`;switch(t.thisObj=r,e.property.type){case"Identifier":case"MemberExpression":n=b(e.property,t);break;default:{let r=b(e.property,t);if(void 0===r)throw{type:"Illegal property access",message:"No property was supplied to the property access"};$(r),n=i[r]}}return"function"==typeof n?n.bind(i):n}(e,t);case"ArrayExpression":return o=e,s=t,o.elements?.map(w(s));case"SequenceExpression":let P;return l=e,c=t,(P=l.expressions.map(w(c)))[P.length-1];case"NewExpression":var T=e,M=t;if(T.callee&&"Identifier"===T.callee.type){let e=T.arguments?.map(w(M));switch(T.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${T.callee.name}`}}if(T.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return $((u=e).value),u.value;case"Identifier":var O=e,F=t;$(O.name);let I=F.thisObj;if(I&&("object"==typeof I||"function"==typeof I)&&O.name in I){let e=I[O.name];return $(e),e}if(F.variables&&O.name in F.variables){let e=F.variables[O.name];return $(e),e}return O.name in F.globals?F.globals[O.name]:void 0;case"TemplateLiteral":let N,j;return p=e,d=t,N=p.expressions?.map(w(d))??[],(j=p.quasis?.map(w(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+N.join("")+j.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function v(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return v(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function A(e,t){let n={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}function w(e){return function(t){return null===t?null:b(t,e)}}function $(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function k(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}i.A.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:r,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=r,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),i.A.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let i=t.node;for(;i.type===e.MEMBER_EXP||i.type===e.CALL_EXP&&i.callee.type===e.MEMBER_EXP;)i=i.type===e.MEMBER_EXP?i.object:i.callee.object;i.type="NewExpression"}})}}),i.A.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(t){let n=this.index,i="",r=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:i+=this.expr.charAt(this.index++)};r(),this.code===e.PERIOD_CODE&&(i+=this.expr.charAt(this.index++),r());let a=this.char;("e"===a||"E"===a)&&(i+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(i+=this.expr.charAt(this.index++)),r(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+i+this.char+")"));let o=this.code;if(e.isIdentifierStart(o))this.throwError("Variable names cannot start with a number ("+i+this.char+")");else if(o===e.PERIOD_CODE){i.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:o,number:i},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(i),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(i){if(48===this.code){var r,a,o;let s=this.index,l=this.expr.charAt(this.index+1),c=t.call(this,l);if(!c)return;let u="";for(;r=this.code,a=c,95===r||a.some(([e,t])=>r>=e&&r<=t);)95===this.code?this.index++:u+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,n.call(this,i);return}this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(u,"x"===(o=l)||"X"===o?16:"b"===o||"B"===o?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,i)})}}),i.A.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,i=!1;for(;this.index<this.expr.length;){if(47===this.code&&!i){let i,r=this.expr.slice(n,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{i=new RegExp(r,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?i=!0:i&&this.code===e.CBRACK_CODE&&(i=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),i.A.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:i,alternate:r},n.operator&&e.binary_ops[n.operator]<=.9){let i=n;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),i.A.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},i="",r="",a=!1,o=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:r,cooked:i},tail:a});for(;this.index<o;){let o=this.expr.charAt(++this.index);if("`"===o)return this.index+=1,a=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===o&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),r="",i="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===o)switch(r+=o,o=this.expr.charAt(++this.index),r+=o,o){case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+=" ";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;default:i+=o}else i+=o,r+=o}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),i.A.addBinaryOp("in",7),i.A.addBinaryOp("??",1)},74339:function(e,t,n){"use strict";n.d(t,{f:()=>r,z:()=>i});let i={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},r={...i,Promise}},11621:function(e,t,n){"use strict";n.d(t,{xg:()=>er,zx:()=>ed,ES:()=>ei,FY:()=>ef,zF:()=>K,wG:()=>ez,Xb:()=>eE,Ef:()=>H,io:()=>ex,Fg:()=>ev,dO:()=>V,VK:()=>eo,Vx:()=>e_,sr:()=>eg,DQ:()=>W,Tj:()=>ea,Ju:()=>eb,pm:()=>ek,cL:()=>em,Gp:()=>eh,K0:()=>es,Yo:()=>el,Q_:()=>eD,No:()=>ec,a9:()=>q});var i,r,a=n(70937),o=n(13070),s=n(6250),l=n(10201),c=n(27760),u=n(9826),p=n(75133),d=n(61098),f=n(37999),m=n(81963);let h=function(e,t,n){(void 0===n||(0,m.A)(e[t],n))&&(void 0!==n||t in e)||(0,f.A)(e,t,n)},g=function(e,t,n){for(var i=-1,r=Object(e),a=n(e),o=a.length;o--;){var s=a[++i];if(!1===t(r[s],s,r))break}return e};var y=n(13137),b=n(84934),v=n(17052),A=n(47514),w=n(17820),$=n(36820),k=n(55259),x=n(62873),C=n(75323),E=n(49885),D=n(12174),S=n(92562),B=n(43148);let z=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var P=n(51158),T=n(22678);let M=function(e,t,n,i,r,a,o){var s=z(e,n),l=z(t,n),c=o.get(l);if(c)return void h(e,n,c);var u=a?a(s,l,n+"",e,t,o):void 0,p=void 0===u;if(p){var d=(0,$.A)(l),f=!d&&(0,C.A)(l),m=!d&&!f&&(0,B.A)(l);(u=l,d||f||m)?(0,$.A)(s)?u=s:(0,x.A)(s)&&(0,k.A)(s)?u=(0,v.A)(s):f?(p=!1,u=(0,y.A)(l,!0)):m?(p=!1,u=(0,b.A)(l,!0)):u=[]:(0,S.A)(l)||(0,w.A)(l)?(u=s,(0,w.A)(s))?u=(0,P.A)(s,(0,T.A)(s)):(!(0,D.A)(s)||(0,E.A)(s))&&(u=(0,A.A)(l)):p=!1}p&&(o.set(l,u),r(u,l,i,a,o),o.delete(l)),h(e,n,u)},O=function e(t,n,i,r,a){t!==n&&g(n,function(o,s){if(a||(a=new d.A),(0,D.A)(o))M(t,n,s,i,e,r,a);else{var l=r?r(z(t,s),o,s+"",t,n,a):void 0;void 0===l&&(l=o),h(t,s,l)}},T.A)};var F=n(68527),I=n(54979),N=n(44168),j=n(27322);let R=function(e,t,n){if(!(0,D.A)(n))return!1;var i=typeof t;return("number"==i?!!((0,k.A)(n)&&(0,j.A)(t,n.length)):"string"==i&&t in n)&&(0,m.A)(n[t],e)};var L=(i=function(e,t,n){O(e,t,n)},r=function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=i.length>3&&"function"==typeof a?(r--,a):void 0,o&&R(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var s=t[n];s&&i(e,s,n,a)}return e},(0,N.A)((0,I.A)(r,void 0,F.A),r+""));function V(e=!0,t=!1){return H((0,u.s)(),e,t)}function H(e,t=!0,n=!1){return!!(e?t:n)}var G=n(467);let U=(0,G.Zd)("extensionsInternal",{slots:{},extensions:{}}),q=()=>(0,G.jf)("extensionsInternal",{slots:{},extensions:{}});function W(e){let t=U.getState(),n=e(t);n!==t&&U.setState(n)}let K=()=>(0,G.jf)("extensions",{slots:{}});function Y(e){let t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,p.A)(o.hs.getState().mountedExtensions,t)||o.hs.setState({mountedExtensions:t})}Y(U.getState()),U.subscribe(Y);let J=q(),Z=K(),X=(0,o.YP)(),Q=(0,o.GI)();function ee(e,t,n,i,r){let a={},s=(0,u.s)(),l=Object.entries(i.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[i,c]of Object.entries(e.slots)){let{config:u}=(0,o.vu)(t,c.name),p=ep(i,e,u,n,l,s,r.session);a[i]={moduleName:c.moduleName,assignedExtensions:p}}(0,p.A)(Z.getState().slots,a)||Z.setState({slots:a})}function et(){ee(J.getState(),X.getState(),Q.getState(),l.jX.getState(),a.eA.getState())}function en(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function ei(e){let[t]=e.split("#");return t}function er(e,t){let n=ei(t);return e.extensions[n]}function ea(e){return er(J.getState(),e)}J.subscribe(e=>{ee(e,X.getState(),Q.getState(),l.jX.getState(),a.eA.getState())}),X.subscribe(e=>{ee(J.getState(),e,Q.getState(),l.jX.getState(),a.eA.getState())}),Q.subscribe(e=>{ee(J.getState(),X.getState(),e,l.jX.getState(),a.eA.getState())}),l.jX.subscribe(e=>{ee(J.getState(),X.getState(),Q.getState(),e,a.eA.getState())}),a.eA.subscribe(e=>{ee(J.getState(),X.getState(),Q.getState(),l.jX.getState(),e)}),et(),(0,c.gj)(et);let eo=e=>J.setState(t=>(t.extensions[e.name]={...e,instances:[]},t));function es(e,t){W(n=>{let i=n.slots[e];return i?{...n,slots:{...n.slots,[e]:{...i,attachedIds:[...i.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...en(e),attachedIds:[t]}}}})}function el(e,t){W(n=>{let i=n.slots[e];return i&&i.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...i,attachedIds:i.attachedIds.filter(e=>e!==t)}}}:n})}function ec(e){W(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function eu(e,t,n,i){let r=t.indexOf(e);if(-1!==r)return r;{if(void 0!==n)return 1e3+n;let t=i.indexOf(e);return -1!==t?2e3+t:-1}}function ep(e,t,n,i,r,l,c){let u=function(e,t){let n=e.add||[],i=e.remove||[],r=e.order||[],{extensions:a}=J.getState();return[...t,...n].filter(e=>!i.includes(e)).sort((e,n)=>{let i=eu(e,r,a[ei(e)]?.order,t),o=eu(n,r,a[ei(n)]?.order,t);return -1===o?-1:-1===i?1:i-o})}(n,t.slots[e].attachedIds),p=[];for(let d of u){let{config:u}=(0,o.P0)(i,e,d),f=L(u,(0,o.g$)(n,e,d)),m=ei(d),h=t.extensions[m];if(h){let e=f?.["Display conditions"]?.privileges??h.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!c?.user||!(0,a.st)(e,c.user)))continue;let t=f?.["Display conditions"]?.expression??null;if(null!==t)try{if(!(0,s.eb)(t,{session:c}))continue}catch(e){console.error(`Error while evaluating expression ${t}`,e);continue}if(h.featureFlag&&!r.includes(h.featureFlag)||window.offlineEnabled&&!H(l,h.online,h.offline))continue;p.push({id:d,name:m,moduleName:h.moduleName,config:f,featureFlag:h.featureFlag,meta:h.meta,online:f?.["Display conditions"]?.online??h.online??!0,offline:f?.["Display conditions"]?.offline??h.offline??!1})}}return p}function ed(e){let t=J.getState(),{config:n}=(0,o.G9)(e),i=Q.getState(),r=l.jX.getState(),s=a.eA.getState(),c=(0,u.s)();return ep(e,t,n,i,Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),c,s.session)}let ef=(e,t)=>J.setState(n=>{let i=n.slots[t]?.moduleName;if(i&&i!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${i}.`),n;if(i&&i==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let r=en(t,e);return{...n,slots:{...n.slots,[t]:r}}}),em=()=>Z.setState(()=>({slots:{},extensions:{}})),eh=(0,G.Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function e_({name:e,basePath:t,mode:n,componentContext:i}){eh.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:i})}function eg(e){eh.getState().slotName===e&&eh.setState(eh.getInitialState(),!0)}let ey=(0,G.Zd)("modalRegistry",{modals:{}});function eb(e){ey.setState(t=>(t.modals[e.name]=e,t))}function ev(e){let t=ey.getState().modals[e];if(!t){let n=ea(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),eb(t))}return t}var eA=n(61836);let ew=(0,G.Zd)("workspaceRegistrations",{workspaces:{}}),e$=(0,G.Zd)("workspaceGroups",{workspaceGroups:{}});function ek(e){ew.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function ex(e){e$.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let eC=new Set;function eE(e){let t=ew.getState().workspaces;if(t[e])return t[e];{let t=ea(e);if(t){var n;let i;return eC.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),eC.add(e)),{name:t.name,title:(n=t,"string"==typeof(i=n?.meta?.title)?i:i&&"object"==typeof i?(0,eA.t)(n.moduleName,i.key,i.default):n.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function eD(e){let t=e$.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}var eS=n(22956);let eB=0;async function ez(e,t,n,i,r=e=>e,a={}){let o=ei(i),s=ea(i),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${o}' to attach to '${t}'`);let{meta:c,moduleName:u,online:p,offline:d,load:f}=s;if(V(p,d)){W(r=>({...r,extensions:{...r.extensions,[o]:{...r.extensions[o],instances:[...r.extensions[o].instances,{domElement:e,id:i,slotName:t,slotModuleName:n}]}}}));let s=await f(),p=eB++;l=(0,eS.xL)(r({...s,name:`${t}/${o}-${p}`}),{...a,_meta:c,_extensionContext:{extensionId:i,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:u},domElement:e})}}else console.warn(`Tried to render ${i} into ${t} but no DOM element was available.`);return l}},27760:function(e,t,n){"use strict";n.d(t,{$3:()=>g,FI:()=>m,LQ:()=>h,Vt:()=>y,Yt:()=>r,bJ:()=>b,bK:()=>v,dX:()=>A,ff:()=>c,gj:()=>a,ls:()=>w,pc:()=>l,sT:()=>o});let i="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(i,{detail:{online:e}}))}function a(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(i,t),()=>window.removeEventListener(i,t)}function o(e){return e({online:!window.offlineEnabled||navigator.onLine}),a(e)}let s="openmrs:precache-static-dependencies";function l(e={}){window.dispatchEvent(new CustomEvent(s,{detail:e}))}function c(e){let t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}let u="openmrs:notification-shown",p="openmrs:actionable-notification-shown",d="openmrs:toast-shown",f="openmrs:snack-bar-shown";function m(e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function g(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function b(e){let t=t=>e(t.detail);return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}function v(e){let t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function w(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}},17744:function(e,t,n){"use strict";function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function r(e){return e&&e.sensitive?"":"i"}function a(e,t,n){if(e instanceof RegExp){if(!t)return e;var o=e.source.match(/\((?!\?)/g);if(o)for(var s=0;s<o.length;s++)t.push({name:s,prefix:"",suffix:"",modifier:"",pattern:""});return e}return Array.isArray(e)?RegExp("(?:"+e.map(function(e){return a(e,t,n).source}).join("|")+")",r(n)):function(e,t,n){void 0===n&&(n={});for(var a=n.strict,o=void 0!==a&&a,s=n.start,l=n.end,c=n.encode,u=void 0===c?function(e){return e}:c,p="["+i(n.endsWith||"")+"]|$",d="["+i(n.delimiter||"/#?")+"]",f=void 0===s||s?"^":"",m=0;m<e.length;m++){var h=e[m];if("string"==typeof h)f+=i(u(h));else{var g=i(u(h.prefix)),y=i(u(h.suffix));if(h.pattern)if(t&&t.push(h),g||y)if("+"===h.modifier||"*"===h.modifier){var b="*"===h.modifier?"?":"";f+="(?:"+g+"((?:"+h.pattern+")(?:"+y+g+"(?:"+h.pattern+"))*)"+y+")"+b}else f+="(?:"+g+"("+h.pattern+")"+y+")"+h.modifier;else f+="("+h.pattern+")"+h.modifier;else f+="(?:"+g+y+")"+h.modifier}}if(void 0===l||l)o||(f+=d+"?"),f+=n.endsWith?"(?="+p+")":"$";else{var v=e[e.length-1],A="string"==typeof v?d.indexOf(v[v.length-1])>-1:void 0===v;o||(f+="(?:"+d+"(?="+p+"))?"),A||(f+="(?="+d+"|"+p+")")}return new RegExp(f,r(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var i=e[n];if("*"===i||"+"===i||"?"===i){t.push({type:"MODIFIER",index:n,value:e[n++]});continue}if("\\"===i){t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if("{"===i){t.push({type:"OPEN",index:n,value:e[n++]});continue}if("}"===i){t.push({type:"CLOSE",index:n,value:e[n++]});continue}if(":"===i){for(var r="",a=n+1;a<e.length;){var o=e.charCodeAt(a);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){r+=e[a++];continue}break}if(!r)throw TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:r}),n=a;continue}if("("===i){var s=1,l="",a=n+1;if("?"===e[a])throw TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;){if("\\"===e[a]){l+=e[a++]+e[a++];continue}if(")"===e[a]){if(0==--s){a++;break}}else if("("===e[a]&&(s++,"?"!==e[a+1]))throw TypeError("Capturing groups are not allowed at "+a);l+=e[a++]}if(s)throw TypeError("Unbalanced pattern at "+n);if(!l)throw TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:l}),n=a;continue}t.push({type:"CHAR",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,a=void 0===r?"./":r,o="[^"+i(t.delimiter||"/#?")+"]+?",s=[],l=0,c=0,u="",p=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=p(e);if(void 0!==t)return t;var i=n[c];throw TypeError("Unexpected "+i.type+" at "+i.index+", expected "+e)},f=function(){for(var e,t="";e=p("CHAR")||p("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=p("CHAR"),h=p("NAME"),g=p("PATTERN");if(h||g){var y=m||"";-1===a.indexOf(y)&&(u+=y,y=""),u&&(s.push(u),u=""),s.push({name:h||l++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""});continue}var b=m||p("ESCAPED_CHAR");if(b){u+=b;continue}if(u&&(s.push(u),u=""),p("OPEN")){var y=f(),v=p("NAME")||"",A=p("PATTERN")||"",w=f();d("CLOSE"),s.push({name:v||(A?l++:""),pattern:v&&!A?o:A,prefix:y,suffix:w,modifier:p("MODIFIER")||""});continue}d("END")}return s}(e,n),t,n)}n.d(t,{tA:()=>w,JK:()=>A,g4:()=>$,vf:()=>s,MY:()=>l,Wh:()=>v,qh:()=>d,lz:()=>c,D_:()=>p,JG:()=>m,oo:()=>g,zl:()=>h});let o=(0,n(467).Zd)("breadcrumbs",[]);function s(e){return l([e])}function l(e){let t=[...c(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?a(e.matcher):a(e.path),settings:e}))];o.setState(t,!0)}function c(){return o.getState()}function u(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=u(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){let n=u(e,t);if(n){let t=[n],i=u(e,n.settings.parent);for(;void 0!==i;)t.push(i),i=u(e,i.settings.parent);return t.reverse()}}return[]}function d(e){return p(c(),e)}var f=n(22956);function m(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,"");return h(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function h(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function g({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),i=m(e,t).replace(window.location.origin,"");i.startsWith(n)?(0,f.EH)(i):window.location.assign(i)}let y="openmrs:history";function b(e){let t=JSON.parse(sessionStorage.getItem(y)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(y,JSON.stringify(t))}function v(){0===JSON.parse(sessionStorage.getItem(y)??"[]").length&&document.referrer&&b(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=A();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(y,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?w({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&b(window.location.href)})}function A(){return JSON.parse(sessionStorage.getItem(y)??"[]")}function w({toUrl:e}){let t=A(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);g({to:t[n]}),sessionStorage.setItem(y,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function $(){sessionStorage.removeItem(y)}},54328:function(e,t,n){"use strict";let i,r,a;n.d(t,{nr:()=>P,xN:()=>il,u1:()=>iB,KG:()=>iM,FO:()=>ic,FE:()=>i$,LM:()=>n6,sA:()=>iy,Rs:()=>b,ff:()=>iC,wn:()=>iD,sK:()=>iO,lY:()=>iu,ms:()=>$,Zr:()=>it,WK:()=>iT,WA:()=>ik,UH:()=>v,cy:()=>ip,Gp:()=>is,jU:()=>ig,Og:()=>z,iD:()=>iw,C$:()=>io,qb:()=>iA,Iq:()=>ie,NU:()=>iE,sZ:()=>y,yD:()=>ix,Io:()=>ii,wJ:()=>B,JC:()=>w,e:()=>n2,xc:()=>ir,pb:()=>ia,bO:()=>ib,AO:()=>n7,Td:()=>iS,Gj:()=>A});try{self["workbox:window:6.5.4"]&&_()}catch(e){}function o(e,t){return new Promise(function(n){var i=new MessageChannel;i.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[i.port2])})}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var c=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function u(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var p=function(e,t){this.type=e,Object.assign(this,t)};function d(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function f(){}var m={type:"SKIP_WAITING"};function h(e,t){if(!t)return e&&e.then?e.then(f):Promise.resolve()}var g=function(e){function t(t,n){var i,r;return void 0===n&&(n={}),(i=e.call(this)||this).nn={},i.tn=0,i.rn=new c,i.en=new c,i.on=new c,i.un=0,i.an=new Set,i.cn=function(){var e=i.fn,t=e.installing;i.tn>0||!u(t.scriptURL,i.sn.toString())||performance.now()>i.un+6e4?(i.vn=t,e.removeEventListener("updatefound",i.cn)):(i.hn=t,i.an.add(t),i.rn.resolve(t)),++i.tn,t.addEventListener("statechange",i.ln)},i.ln=function(e){var t=i.fn,n=e.target,r=n.state,a=n===i.vn,o={sw:n,isExternal:a,originalEvent:e};!a&&i.mn&&(o.isUpdate=!0),i.dispatchEvent(new p(r,o)),"installed"===r?i.wn=self.setTimeout(function(){"installed"===r&&t.waiting===n&&i.dispatchEvent(new p("waiting",o))},200):"activating"===r&&(clearTimeout(i.wn),a||i.en.resolve(n))},i.dn=function(e){var t=i.hn,n=t!==navigator.serviceWorker.controller;i.dispatchEvent(new p("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:i.mn})),n||i.on.resolve(t)},r=function(e){var t=e.data,n=e.ports,r=e.source;return d(i.getSW(),function(){i.an.has(r)&&i.dispatchEvent(new p("message",{data:t,originalEvent:e,ports:n,sw:r}))})},i.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(e){return Promise.reject(e)}},i.sn=t,i.nn=n,navigator.serviceWorker.addEventListener("message",i.gn),i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n,i,r=t.prototype;return r.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var i,r,a,o=this;return i=function(){if(!n&&"complete"!==document.readyState)return h(new Promise(function(e){return window.addEventListener("load",e)}))},r=function(){return o.mn=!!navigator.serviceWorker.controller,o.yn=o.pn(),d(o.bn(),function(e){o.fn=e,o.yn&&(o.hn=o.yn,o.en.resolve(o.yn),o.on.resolve(o.yn),o.yn.addEventListener("statechange",o.ln,{once:!0}));var t=o.fn.waiting;return t&&u(t.scriptURL,o.sn.toString())&&(o.hn=t,Promise.resolve().then(function(){o.dispatchEvent(new p("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),o.hn&&(o.rn.resolve(o.hn),o.an.add(o.hn)),o.fn.addEventListener("updatefound",o.cn),navigator.serviceWorker.addEventListener("controllerchange",o.dn),o.fn})},(a=i())&&a.then?a.then(r):r(a)}catch(e){return Promise.reject(e)}},r.update=function(){try{return this.fn?h(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},r.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},r.messageSW=function(e){try{return d(this.getSW(),function(t){return o(t,e)})}catch(e){return Promise.reject(e)}},r.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&o(this.fn.waiting,m)},r.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},r.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return d(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},n=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],s(t.prototype,n),i&&s(t,i),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,void 0):void 0}}(e))){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function y(e,t){if(void 0!==a)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),a;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let n=new g(e,t);return a=n.register().then(()=>n.controlling.then(()=>n))}function b(){return a??Promise.resolve(void 0)}let v="x-omrs-offline-response-body",A="x-omrs-offline-response-status",w="x-omrs-offline-caching-strategy";async function $(e){let t=await b();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function k(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function x(){return!window.indexedDB}async function C(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function E(){return await C()||await x()||await k()}let D="openmrs3:offline-mode",S="unavailable";function B(){return{current:S,notAvailable:"unavailable"===S,active:"on"===S}}function z(e){"unavailable"!==S&&"unavailable"!==e&&(localStorage.setItem(D,"on"===e?"active":"disabled"),S=e)}async function P(){await E()||(S="active"===localStorage.getItem(D)?"on":"off"),navigator.onLine}let T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=Object.keys,O=Array.isArray;function F(e,t){return"object"!=typeof t||M(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||T.Promise||(T.Promise=Promise);let I=Object.getPrototypeOf,N={}.hasOwnProperty;function j(e,t){return N.call(e,t)}function R(e,t){"function"==typeof t&&(t=t(I(e))),("undefined"==typeof Reflect?M:Reflect.ownKeys)(t).forEach(n=>{V(e,n,t[n])})}let L=Object.defineProperty;function V(e,t,n,i){L(e,t,F(n&&j(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function H(e){return{from:function(t){return e.prototype=Object.create(t.prototype),V(e.prototype,"constructor",e),{extend:R.bind(null,e.prototype)}}}}let G=Object.getOwnPropertyDescriptor;function U(e,t){let n;return G(e,t)||(n=I(e))&&U(n,t)}let q=[].slice;function W(e,t,n){return q.call(e,t,n)}function K(e,t){return t(e)}function Y(e){if(!e)throw Error("Assertion Failed")}function J(e){T.setImmediate?setImmediate(e):setTimeout(e,0)}function Z(e,t){return e.reduce((e,n,i)=>{var r=t(n,i);return r&&(e[r[0]]=r[1]),e},{})}function X(e,t){if("string"==typeof t&&j(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],i=0,r=t.length;i<r;++i){var a=X(e,t[i]);n.push(a)}return n}var o=t.indexOf(".");if(-1!==o){var s=e[t.substr(0,o)];return null==s?void 0:X(s,t.substr(o+1))}}function Q(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Y("string"!=typeof n&&"length"in n);for(var i=0,r=t.length;i<r;++i)Q(e,t[i],n[i])}else{var a=t.indexOf(".");if(-1!==a){var o=t.substr(0,a),s=t.substr(a+1);if(""===s)void 0===n?O(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n;else{var l=e[o];l&&j(e,o)||(l=e[o]={}),Q(l,s,n)}}else void 0===n?O(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function ee(e){var t={};for(var n in e)j(e,n)&&(t[n]=e[n]);return t}let et=[].concat;function en(e){return et.apply([],e)}let ei="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(en([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>T[e]),er=ei.map(e=>T[e]);Z(ei,e=>[e,!0]);let ea=null;function eo(e){ea="undefined"!=typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let n=ea&&ea.get(t);if(n)return n;if(O(t)){n=[],ea&&ea.set(t,n);for(var i=0,r=t.length;i<r;++i)n.push(e(t[i]))}else if(er.indexOf(t.constructor)>=0)n=t;else{let i=I(t);for(var a in n=i===Object.prototype?{}:Object.create(i),ea&&ea.set(t,n),t)j(t,a)&&(n[a]=e(t[a]))}return n}(e);return ea=null,t}let{toString:es}={};function el(e){return es.call(e).slice(8,-1)}let ec="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",eu="symbol"==typeof ec?function(e){var t;return null!=e&&(t=e[ec])&&t.apply(e)}:function(){return null},ep={};function ed(e){var t,n,i,r;if(1==arguments.length){if(O(e))return e.slice();if(this===ep&&"string"==typeof e)return[e];if(r=eu(e)){for(n=[];!(i=r.next()).done;)n.push(i.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}let ef="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var em="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),eh=()=>!0;let e_=!Error("").stack;function eg(){if(e_)try{throw eg.arguments,Error()}catch(e){return e}return Error()}function ey(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(eh).map(e=>"\n"+e).join("")):""}var eb=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ev=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(eb),eA={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ew(e,t){this._e=eg(),this.name=e,this.message=t}function e$(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function ek(e,t,n,i){this._e=eg(),this.failures=t,this.failedKeys=i,this.successCount=n,this.message=e$(e,t)}function ex(e,t){this._e=eg(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=e$(e,t)}H(ew).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ey(this._e,2))}},toString:function(){return this.name+": "+this.message}}),H(ek).from(ew),H(ex).from(ew);var eC=ev.reduce((e,t)=>(e[t]=t+"Error",e),{}),eE=ev.reduce((e,t)=>{var n=t+"Error";function i(e,i){this._e=eg(),this.name=n,e?"string"==typeof e?(this.message=`${e}${i?"\n "+i:""}`,this.inner=i||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=eA[t]||n,this.inner=null)}return H(i).from(ew),e[t]=i,e},{});eE.Syntax=SyntaxError,eE.Type=TypeError,eE.Range=RangeError;var eD=eb.reduce((e,t)=>(e[t+"Error"]=eE[t],e),{}),eS=ev.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=eE[t]),e),{});function eB(){}function ez(e){return e}function eP(e,t){return null==e||e===ez?t:function(n){return t(e(n))}}function eT(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function eM(e,t){return e===eB?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var i=this.onsuccess,r=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?eT(i,this.onsuccess):i),r&&(this.onerror=this.onerror?eT(r,this.onerror):r),void 0!==a?a:n}}function eO(e,t){return e===eB?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?eT(n,this.onsuccess):n),i&&(this.onerror=this.onerror?eT(i,this.onerror):i)}}function eF(e,t){return e===eB?t:function(n){var i=e.apply(this,arguments);F(n,i);var r=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?eT(r,this.onsuccess):r),a&&(this.onerror=this.onerror?eT(a,this.onerror):a),void 0===i?void 0===o?void 0:o:F(i,o)}}function eI(e,t){return e===eB?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function eN(e,t){return e===eB?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var i=this,r=arguments.length,a=Array(r);r--;)a[r]=arguments[r];return n.then(function(){return t.apply(i,a)})}return t.apply(this,arguments)}}eS.ModifyError=ek,eS.DexieError=ew,eS.BulkError=ex;var ej={};let[eR,eL,eV]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,I(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,I(t),e]})(),eH=eL&&eL.then,eG=eR&&eR.constructor,eU=!!eV;var eq=!1,eW=eV?()=>{eV.then(tr)}:T.setImmediate?setImmediate.bind(null,tr):T.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{tr(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tr,0)},eK=function(e,t){e3.push([e,t]),eJ&&(eW(),eJ=!1)},eY=!0,eJ=!0,eZ=[],eX=[],eQ=null,e0=ez,e1={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:tD,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{tD(e[0],e[1])}catch(e){}})}},e2=e1,e3=[],e4=0,e5=[];function e6(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=eB,this._lib=!1;var t=this._PSD=e2;if(em&&(this._stackHolder=eg(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ej)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&e9(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(n=>{if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var i=t._lib&&ta();n&&"function"==typeof n.then?e(t,(e,t)=>{n instanceof e6?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,te(t)),i&&to()}},e9.bind(null,t))}catch(e){e9(t,e)}}(this,e)}let e7={get:function(){var e=e2,t=tm;function n(n,i){var r=!e.global&&(e!==e2||t!==tm);let a=r&&!ty();var o=new e6((t,o)=>{tt(this,new e8(tx(n,e,r,a),tx(i,e,r,a),t,o,e))});return em&&ti(o,this),o}return n.prototype=ej,n},set:function(e){V(this,"then",e&&e.prototype===ej?e7:{get:function(){return e},set:e7.set})}};function e8(e,t,n,i,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i,this.psd=r}function e9(e,t){if(eX.push(t),null===e._state){var n=e._lib&&ta();t=e0(t),e._state=!1,e._value=t,em&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=U(t,"stack");t._promise=e,V(t,"stack",{get:()=>eq?n&&(n.get?n.get.apply(t):n.value):e.stack})}),eZ.some(t=>t._value===e._value)||eZ.push(e),te(e),n&&to()}}function te(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)tt(e,t[n]);var r=e._PSD;--r.ref||r.finalize(),0===e4&&(++e4,eK(()=>{0==--e4&&ts()},[]))}function tt(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++e4,eK(tn,[n,e,t])}else e._listeners.push(t)}function tn(e,t,n){try{eQ=t;var i,r=t._value;t._state?i=e(r):(eX.length&&(eX=[]),i=e(r),-1===eX.indexOf(r)&&function(e){for(var t=eZ.length;t;)if(eZ[--t]._value===e._value)return void eZ.splice(t,1)}(t)),n.resolve(i)}catch(e){n.reject(e)}finally{eQ=null,0==--e4&&ts(),--n.psd.ref||n.psd.finalize()}}function ti(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function tr(){ta()&&to()}function ta(){var e=eY;return eY=!1,eJ=!1,e}function to(){var e,t,n;do for(;e3.length>0;)for(e=e3,e3=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(e3.length>0);eY=!0,eJ=!0}function ts(){var e=eZ;eZ=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=e5.slice(0),n=t.length;n;)t[--n]()}function tl(e){return new e6(ej,!1,e)}function tc(e,t){var n=e2;return function(){var i=ta(),r=e2;try{return tw(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{tw(r,!1),i&&to()}}}R(e6.prototype,{then:e7,_then:function(e,t){tt(this,new e8(null,null,e,t,e2))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):tl(e)):this.then(null,e=>e&&e.name===t?n(e):tl(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),tl(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eq=!0;var e=(function e(t,n,i){if(n.length===i)return n;var r="";if(!1===t._state){var a,o,s=t._value;null!=s?(a=s.name||"Error",o=s.message||s,r=ey(s,0)):(a=s,o=""),n.push(a+(o?": "+o:"")+r)}return em&&((r=ey(t._stackHolder,2))&&-1===n.indexOf(r)&&n.push(r),t._prev&&e(t._prev,n,i)),n})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eq=!1}}},timeout:function(e,t){return e<1/0?new e6((n,i)=>{var r=setTimeout(()=>i(new eE.Timeout(t)),e);this.then(n,i).finally(clearTimeout.bind(null,r))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&V(e6.prototype,Symbol.toStringTag,"Dexie.Promise"),e1.env=t$(),R(e6,{all:function(){var e=ed.apply(null,arguments).map(tb);return new e6(function(t,n){0===e.length&&t([]);var i=e.length;e.forEach((r,a)=>e6.resolve(r).then(n=>{e[a]=n,--i||t(e)},n))})},resolve:e=>{if(e instanceof e6)return e;if(e&&"function"==typeof e.then)return new e6((t,n)=>{e.then(t,n)});var t=new e6(ej,!0,e);return ti(t,eQ),t},reject:tl,race:function(){var e=ed.apply(null,arguments).map(tb);return new e6((t,n)=>{e.map(e=>e6.resolve(e).then(t,n))})},PSD:{get:()=>e2,set:e=>e2=e},totalEchoes:{get:()=>tm},newPSD:t_,usePSD:tk,scheduler:{get:()=>eK,set:e=>{eK=e}},rejectionMapper:{get:()=>e0,set:e=>{e0=e}},follow:(e,t)=>new e6((n,i)=>t_((t,n)=>{var i=e2;i.unhandleds=[],i.onunhandled=n,i.finalize=eT(function(){var e;e=()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])},e5.push(function t(){e(),e5.splice(e5.indexOf(t),1)}),++e4,eK(()=>{0==--e4&&ts()},[])},i.finalize),e()},t,n,i))}),eG&&(eG.allSettled&&V(e6,"allSettled",function(){let e=ed.apply(null,arguments).map(tb);return new e6(t=>{0===e.length&&t([]);let n=e.length,i=Array(n);e.forEach((e,r)=>e6.resolve(e).then(e=>i[r]={status:"fulfilled",value:e},e=>i[r]={status:"rejected",reason:e}).then(()=>--n||t(i)))})}),eG.any&&"undefined"!=typeof AggregateError&&V(e6,"any",function(){let e=ed.apply(null,arguments).map(tb);return new e6((t,n)=>{0===e.length&&n(AggregateError([]));let i=e.length,r=Array(i);e.forEach((e,a)=>e6.resolve(e).then(e=>t(e),e=>{r[a]=e,--i||n(AggregateError(r))}))})}));let tu={awaits:0,echoes:0,id:0};var tp=0,td=[],tf=0,tm=0,th=0;function t_(e,t,n,i){var r=e2,a=Object.create(r);a.parent=r,a.ref=0,a.global=!1,a.id=++th;var o=e1.env;a.env=eU?{Promise:e6,PromiseProp:{value:e6,configurable:!0,writable:!0},all:e6.all,race:e6.race,allSettled:e6.allSettled,any:e6.any,resolve:e6.resolve,reject:e6.reject,nthen:tC(o.nthen,a),gthen:tC(o.gthen,a)}:{},t&&F(a,t),++r.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=tk(a,e,n,i);return 0===a.ref&&a.finalize(),s}function tg(){return tu.id||(tu.id=++tp),++tu.awaits,tu.echoes+=100,tu.id}function ty(){return!!tu.awaits&&(0==--tu.awaits&&(tu.id=0),tu.echoes=100*tu.awaits,!0)}function tb(e){return tu.echoes&&e&&e.constructor===eG?(tg(),e.then(e=>(ty(),e),e=>(ty(),tS(e)))):e}function tv(e){++tm,tu.echoes&&0!=--tu.echoes||(tu.echoes=tu.id=0),td.push(e2),tw(e,!0)}function tA(){var e=td[td.length-1];td.pop(),tw(e,!1)}function tw(e,t){var n,i=e2;if((t?!tu.echoes||tf++&&e===e2:!tf||--tf&&e===e2)||(n=t?tv.bind(null,e):tA,eH.call(eR,n)),e!==e2&&(e2=e,i===e1&&(e1.env=t$()),eU)){var r=e1.env.Promise,a=e.env;eL.then=a.nthen,r.prototype.then=a.gthen,(i.global||e.global)&&(Object.defineProperty(T,"Promise",a.PromiseProp),r.all=a.all,r.race=a.race,r.resolve=a.resolve,r.reject=a.reject,a.allSettled&&(r.allSettled=a.allSettled),a.any&&(r.any=a.any))}}function t$(){var e=T.Promise;return eU?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(T,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:eL.then,gthen:e.prototype.then}:{}}function tk(e,t,n,i,r){var a=e2;try{return tw(e,!0),t(n,i,r)}finally{tw(a,!1)}}function tx(e,t,n,i){return"function"!=typeof e?e:function(){var r,a=e2;n&&tg(),tw(t,!0);try{return e.apply(this,arguments)}finally{tw(a,!1),i&&(r=ty,eH.call(eR,r))}}}function tC(e,t){return function(n,i){return e.call(this,tx(n,t),tx(i,t))}}-1===(""+eH).indexOf("[native code]")&&(tg=ty=eB);let tE="unhandledrejection";function tD(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var i,r={promise:t,reason:e};if(T.document&&document.createEvent?((i=document.createEvent("Event")).initEvent(tE,!0,!0),F(i,r)):T.CustomEvent&&F(i=new CustomEvent(tE,{detail:r}),r),i&&T.dispatchEvent&&(dispatchEvent(i),!T.PromiseRejectionEvent&&T.onunhandledrejection))try{T.onunhandledrejection(i)}catch(e){}em&&i&&!i.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var tS=e6.reject;let tB="3.2.7",tz=String.fromCharCode(65535),tP=-1/0,tT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tM="String expected.",tO=[],tF="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tI=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),tN="__dbnames",tj="readonly",tR="readwrite";function tL(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tV={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tH(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=eo(t))[e],t)}class tG{_trans(e,t,n){let i=this._tx||e2.trans,r=this.name;function a(e,n,i){if(!i.schema[r])throw new eE.NotFound("Table "+r+" not part of transaction");return t(i.idbtrans,i)}let o=ta();try{return i&&i.db===this.db?i===e2.trans?i._promise(e,a,n):t_(()=>i._promise(e,a,n),{trans:i,transless:e2.transless||e2}):function e(t,n,i,r){if(t.idbdb&&(t._state.openComplete||e2.letThrough||t._vip)){var a=t._createTransaction(n,i,t._dbSchema);try{a.create(),t._state.PR1398_maxLoop=3}catch(a){return a.name===eC.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,i,r))):tS(a)}return a._promise(n,(e,t)=>t_(()=>(e2.trans=a,r(e,t,a)))).then(e=>a._completion.then(()=>e))}if(t._state.openComplete)return tS(new eE.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tS(new eE.DatabaseClosed);t.open().catch(eB)}return t._state.dbReadyPromise.then(()=>e(t,n,i,r))}(this.db,e,[this.name],a)}finally{o&&to()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(O(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=M(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let n=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(n&&this.db._maxKey!==tz){let i=n.keyPath.slice(0,t.length);return this.where(i).equals(i.map(t=>e[t]))}!n&&em&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:i}=this.schema,r=this.db._deps.indexedDB;function a(e,t){try{return 0===r.cmp(e,t)}catch(e){return!1}}let[o,s]=t.reduce(([t,n],r)=>{let o=i[r],s=e[r];return[t||o,t||!o?tL(n,o&&o.multi?e=>{let t=X(e,r);return O(t)&&t.some(e=>a(s,e))}:e=>a(s,X(e,r))):n]},[null,null]);return o?this.where(o.name).equals(e[o.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,O(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let n=Object.create(e.prototype);for(var i in t)if(j(t,i))try{n[i]=t[i]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){F(this,e)})}add(e,t){let{auto:n,keyPath:i}=this.schema.primKey,r=e;return i&&n&&(r=tH(i)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[r]})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(i)try{Q(e,i,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||O(e))return this.where(":id").equals(e).modify(t);{let n=X(e,this.schema.primKey.keyPath);if(void 0===n)return tS(new eE.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?M(t).forEach(n=>{Q(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){let{auto:n,keyPath:i}=this.schema.primKey,r=e;return i&&n&&(r=tH(i)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[r],keys:null!=t?[t]:null})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(i)try{Q(e,i,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tV})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){let i=Array.isArray(t)?t:void 0,r=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:a}=this.schema.primKey;if(a&&i)throw new eE.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new eE.InvalidArgument("Arguments objects and keys must have the same length");let o=e.length,s=a&&n?e.map(tH(a)):e;return this.core.mutate({trans:t,type:"add",keys:i,values:s,wantResults:r}).then(({numFailures:e,results:t,lastResult:n,failures:i})=>{if(0===e)return r?t:n;throw new ex(`${this.name}.bulkAdd(): ${e} of ${o} operations failed`,i)})})}bulkPut(e,t,n){let i=Array.isArray(t)?t:void 0,r=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:a}=this.schema.primKey;if(a&&i)throw new eE.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new eE.InvalidArgument("Arguments objects and keys must have the same length");let o=e.length,s=a&&n?e.map(tH(a)):e;return this.core.mutate({trans:t,type:"put",keys:i,values:s,wantResults:r}).then(({numFailures:e,results:t,lastResult:n,failures:i})=>{if(0===e)return r?t:n;throw new ex(`${this.name}.bulkPut(): ${e} of ${o} operations failed`,i)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:i})=>{if(0===e)return n;throw new ex(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,i)})}}function tU(e){var t={},n=function(n,i){if(i){for(var r=arguments.length,a=Array(r-1);--r;)a[r-1]=arguments[r];return t[n].subscribe.apply(null,a),e}if("string"==typeof n)return t[n]};n.addEventType=a;for(var i=1,r=arguments.length;i<r;++i)a(arguments[i]);return n;function a(e,i,r){if("object"!=typeof e){i||(i=eI),r||(r=eB);var o={subscribers:[],fire:r,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=i(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter(function(t){return t!==e}),o.fire=o.subscribers.reduce(i,r)}};return t[e]=n[e]=o,o}M(e).forEach(function(t){var n=e[t];if(O(n))a(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new eE.InvalidArgument("Invalid event config");var i=a(t,ez,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];i.subscribers.forEach(function(e){J(function(){e.apply(null,t)})})})}})}}function tq(e,t){return H(t).from({prototype:e}),t}function tW(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tK(e,t){e.filter=tL(e.filter,t)}function tY(e,t,n){var i=e.replayFilter;e.replayFilter=i?()=>tL(i(),t()):t,e.justLimit=n&&!i}function tJ(e,t){if(e.isPrimKey)return t.primaryKey;let n=t.getIndexByKeyPath(e.index);if(!n)throw new eE.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tZ(e,t,n){let i=tJ(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:i,range:e.range}})}function tX(e,t,n,i){let r=e.replayFilter?tL(e.filter,e.replayFilter()):e.filter;if(e.or){let a={},o=(e,n,i)=>{if(!r||r(n,i,e=>n.stop(e),e=>n.fail(e))){var o=n.primaryKey,s=""+o;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(o)),j(a,s)||(a[s]=!0,t(e,n,i))}};return Promise.all([e.or._iterate(o,n),tQ(tZ(e,i,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return tQ(tZ(e,i,n),tL(e.algorithm,r),t,!e.keysOnly&&e.valueMapper)}function tQ(e,t,n,i){var r=tc(i?(e,t,r)=>n(i(e),t,r):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=eB},t=>{e.fail(t),n=eB})||r(e.value,e,e=>n=e),n()})})}function t0(e,t){try{let n=t1(e),i=t1(t);if(n!==i)return"Array"===n?1:"Array"===i?-1:"binary"===n?1:"binary"===i?-1:"string"===n?1:"string"===i?-1:"Date"===n?1:"Date"!==i?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let n=e.length,i=t.length,r=n<i?n:i;for(let n=0;n<r;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===i?0:n<i?-1:1}(t2(e),t2(t));case"Array":return function(e,t){let n=e.length,i=t.length,r=n<i?n:i;for(let n=0;n<r;++n){let i=t0(e[n],t[n]);if(0!==i)return i}return n===i?0:n<i?-1:1}(e,t)}}catch(e){}return NaN}function t1(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let n=el(e);return"ArrayBuffer"===n?"binary":n}function t2(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class t3{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,tS.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,tS.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=tL(t.algorithm,e)}_iterate(e,t){return tX(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&F(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>tX(t,e,n,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,n=t.table.core;if(tW(t,!0))return n.count({trans:e,query:{index:tJ(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var i=0;return tX(t,()=>(++i,!1),e,n).then(()=>i)}).then(e)}sortBy(e,t){let n=e.split(".").reverse(),i=n[0],r=n.length-1;function a(e,t){return t?a(e[n[t]],t-1):e[i]}var o="next"===this._ctx.dir?1:-1;function s(e,t){var n=a(e,r),i=a(t,r);return n<i?-o:n>i?o:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&tW(t,!0)&&t.limit>0){let{valueMapper:n}=t,i=tJ(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:i,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{let n=[];return tX(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,tW(t)?tY(t,()=>{var t=e;return(e,n)=>0===t||(1===t?--t:n(()=>{e.advance(t),t=0}),!1)}):tY(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),tY(this._ctx,()=>{var t=e;return function(e,n,i){return--t<=0&&n(i),t>=0}},!0),this}until(e,t){return tK(this._ctx,function(n,i,r){return!e(n.value)||(i(r),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return tK(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=tL(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&tW(t,!0)&&t.limit>0)return this._read(e=>{var n=tJ(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return tK(this._ctx,function(e){var t=e.primaryKey.toString(),i=j(n,t);return n[t]=!0,!i}),this}modify(e){var t=this._ctx;return this._write(n=>{var i;if("function"==typeof e)i=e;else{var r=M(e),a=r.length;i=function(t){for(var n=!1,i=0;i<a;++i){var o=r[i],s=e[o];X(t,o)!==s&&(Q(t,o,s),n=!0)}return n}}let o=t.table.core,{outbound:s,extractKey:l}=o.schema.primaryKey,c=this.db._options.modifyChunkSize||200,u=[],p=0,d=[],f=(e,t)=>{let{failures:n,numFailures:i}=t;for(let t of(p+=e-i,M(n)))u.push(n[t])};return this.clone().primaryKeys().then(r=>{let a=u=>{let p=Math.min(c,r.length-u);return o.getMany({trans:n,keys:r.slice(u,u+p),cache:"immutable"}).then(d=>{let m=[],h=[],g=s?[]:null,y=[];for(let e=0;e<p;++e){let t=d[e],n={value:eo(t),primKey:r[u+e]};!1!==i.call(n,n.value,n)&&(null==n.value?y.push(r[u+e]):s||0===t0(l(t),l(n.value))?(h.push(n.value),s&&g.push(r[u+e])):(y.push(r[u+e]),m.push(n.value)))}let b=tW(t)&&t.limit===1/0&&("function"!=typeof e||e===t4)&&{index:t.index,range:t.range};return Promise.resolve(m.length>0&&o.mutate({trans:n,type:"add",values:m}).then(e=>{for(let t in e.failures)y.splice(parseInt(t),1);f(m.length,e)})).then(()=>(h.length>0||b&&"object"==typeof e)&&o.mutate({trans:n,type:"put",keys:g,values:h,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(h.length,e))).then(()=>(y.length>0||b&&e===t4)&&o.mutate({trans:n,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>r.length>u+p&&a(u+c))})};return a(0).then(()=>{if(u.length>0)throw new ek("Error modifying one or more objects",u,p,d);return r.length})})})}delete(){var e=this._ctx,t=e.range;return tW(e)&&(e.isPrimKey&&!tF||3===t.type)?this._write(n=>{let{primaryKey:i}=e.table.core.schema;return e.table.core.count({trans:n,query:{index:i,range:t}}).then(i=>e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:n,numFailures:r})=>{if(r)throw new ek("Could not delete some values",Object.keys(e).map(t=>e[t]),i-r);return i-r}))}):this.modify(t4)}}let t4=(e,t)=>t.value=null;function t5(e,t){return e<t?-1:+(e!==t)}function t6(e,t){return e>t?-1:+(e!==t)}function t7(e,t,n){var i=e instanceof nn?new e.Collection(e):e;return i._ctx.error=n?new n(t):TypeError(t),i}function t8(e){return new e.Collection(e,()=>nt("")).limit(0)}function t9(e,t,n,i){var r,a,o,s,l,c,u,p=n.length;if(!n.every(e=>"string"==typeof e))return t7(e,tM);function d(e){r="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),a="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),o="next"===e?t5:t6;var t=n.map(function(e){return{lower:a(e),upper:r(e)}}).sort(function(e,t){return o(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),c=e,u="next"===e?"":i}d("next");var f=new e.Collection(e,()=>ne(s[0],l[p-1]+i));f._ondirectionchange=function(e){d(e)};var m=0;return f._addAlgorithm(function(e,n,i){var r=e.key;if("string"!=typeof r)return!1;var d=a(r);if(t(d,l,m))return!0;for(var f=null,h=m;h<p;++h){var g=function(e,t,n,i,r,a){for(var o=Math.min(e.length,i.length),s=-1,l=0;l<o;++l){var c=t[l];if(c!==i[l])return 0>r(e[l],n[l])?e.substr(0,l)+n[l]+n.substr(l+1):0>r(e[l],i[l])?e.substr(0,l)+i[l]+n.substr(l+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;0>r(e[l],c)&&(s=l)}return o<i.length&&"next"===a?e+n.substr(e.length):o<e.length&&"prev"===a?e.substr(0,n.length):s<0?null:e.substr(0,s)+i[s]+n.substr(s+1)}(r,d,s[h],l[h],o,c);null===g&&null===f?m=h+1:(null===f||o(f,g)>0)&&(f=g)}return n(null!==f?function(){e.continue(f+u)}:i),!1}),f}function ne(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function nt(e){return{type:1,lower:e,upper:e}}class nn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,i){n=!1!==n,i=!0===i;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||i)&&(!n||!i)?t8(this):new this.Collection(this,()=>ne(e,t,!n,!i))}catch(e){return t7(this,tT)}}equals(e){return null==e?t7(this,tT):new this.Collection(this,()=>nt(e))}above(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(e,void 0,!0))}aboveOrEqual(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(e,void 0,!1))}below(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(void 0,e,!1,!0))}belowOrEqual(e){return null==e?t7(this,tT):new this.Collection(this,()=>ne(void 0,e))}startsWith(e){return"string"!=typeof e?t7(this,tM):this.between(e,e+tz,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):t9(this,(e,t)=>0===e.indexOf(t[0]),[e],tz)}equalsIgnoreCase(e){return t9(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ed.apply(ep,arguments);return 0===e.length?t8(this):t9(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ed.apply(ep,arguments);return 0===e.length?t8(this):t9(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tz)}anyOf(){let e=ed.apply(ep,arguments),t=this._cmp;try{e.sort(t)}catch(e){return t7(this,tT)}if(0===e.length)return t8(this);let n=new this.Collection(this,()=>ne(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let i=0;return n._addAlgorithm((n,r,a)=>{let o=n.key;for(;t(o,e[i])>0;)if(++i===e.length)return r(a),!1;return 0===t(o,e[i])||(r(()=>{n.continue(e[i])}),!1)}),n}notEqual(e){return this.inAnyRange([[tP,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ed.apply(ep,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return t7(this,tT)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[tP,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let n=this._cmp,i=this._ascending,r=this._descending,a=this._min,o=this._max;if(0===e.length)return t8(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=i(e[0],e[1])))return t7(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",eE.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,c,u=i;function p(e,t){return u(e[0],t[0])}try{(c=e.reduce(function(e,t){let i=0,r=e.length;for(;i<r;++i){let r=e[i];if(0>n(t[0],r[1])&&n(t[1],r[0])>0){r[0]=a(r[0],t[0]),r[1]=o(r[1],t[1]);break}}return i===r&&e.push(t),e},[])).sort(p)}catch(e){return t7(this,tT)}let d=0,f=l?e=>i(e,c[d][1])>0:e=>i(e,c[d][1])>=0,m=s?e=>r(e,c[d][0])>0:e=>r(e,c[d][0])>=0,h=f,g=new this.Collection(this,()=>ne(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(h=f,u=i):(h=m,u=r),c.sort(p)},g._addAlgorithm((e,t,n)=>{for(var r=e.key;h(r);)if(++d===c.length)return t(n),!1;return!!(!f(r)&&!m(r))||(0===this._cmp(r,c[d][1])||0===this._cmp(r,c[d][0])||t(()=>{u===i?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=ed.apply(ep,arguments);return e.every(e=>"string"==typeof e)?0===e.length?t8(this):this.inAnyRange(e.map(e=>[e,e+tz])):t7(this,"startsWithAnyOf() only works with strings")}}function ni(e){return tc(function(t){return nr(t),e(t.target.error),!1})}function nr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let na="storagemutated",no="x-storagemutated-1",ns=tU(null,na);class nl{_lock(){return Y(!e2.global),++this._reculock,1!==this._reculock||e2.global||(e2.lockOwnerFor=this),this}_unlock(){if(Y(!e2.global),0==--this._reculock)for(e2.global||(e2.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{tk(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&e2.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,n=this.db._state.dbOpenError;if(Y(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new eE.DatabaseClosed(n);case"MissingAPIError":throw new eE.MissingAPI(n.message,n);default:throw new eE.OpenFailed(n)}if(!this.active)throw new eE.TransactionInactive;return Y(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=tc(t=>{nr(t),this._reject(e.error)}),e.onabort=tc(t=>{nr(t),this.active&&this._reject(new eE.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=tc(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&ns.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return tS(new eE.ReadOnly("Transaction is readonly"));if(!this.active)return tS(new eE.TransactionInactive);if(this._locked())return new e6((i,r)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(i,r)},e2])});if(n)return t_(()=>{var e=new e6((e,n)=>{this._lock();let i=t(e,n,this);i&&i.then&&i.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var i=new e6((e,n)=>{var i=t(e,n,this);i&&i.then&&i.then(e,n)});return i._lib=!0,i}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let n=e6.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var i=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(i.get(-1/0).onsuccess=e)}()}var r=t._waitingFor;return new e6((e,i)=>{n.then(n=>t._waitingQueue.push(tc(e.bind(null,n))),e=>t._waitingQueue.push(tc(i.bind(null,e)))).finally(()=>{t._waitingFor===r&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new eE.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(j(t,e))return t[e];let n=this.schema[e];if(!n)throw new eE.NotFound("Table "+e+" not part of transaction");let i=new this.db.Table(e,n,this);return i.core=this.db.core.table(e),t[e]=i,i}}function nc(e,t,n,i,r,a,o){return{name:e,keyPath:t,unique:n,multi:i,auto:r,compound:a,src:(n&&!o?"&":"")+(i?"*":"")+(r?"++":"")+nu(t)}}function nu(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function np(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Z(n,e=>[e.name,e])}}let nd=e=>{try{return e.only([[]]),nd=()=>[[]],[[]]}catch(e){return nd=()=>tz,tz}};function nf(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>X(t,e):t=>X(t,e)}function nm(e){return[].slice.call(e)}let nh=0;function n_(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ng({_novip:e},t){let n=t.db,i=function(e,t,{IDBKeyRange:n,indexedDB:i},r){var a;return{dbcore:(a=function(e,t,n){let i;function r(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:n,upper:i,lowerOpen:r,upperOpen:a}=e;return void 0===n?void 0===i?null:t.upperBound(i,!!a):void 0===i?t.lowerBound(n,!!r):t.bound(n,i,!!r,!!a)}let{schema:a,hasGetAll:o}=(i=nm(e.objectStoreNames),{schema:{name:e.name,tables:i.map(e=>n.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:n}=e,i=O(t),r=null==t,a={},o={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:r,compound:i,keyPath:t,autoIncrement:n,unique:!0,extractKey:nf(t)},indexes:nm(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:n,multiEntry:i,keyPath:r}=e,o={name:t,compound:O(r),keyPath:r,unique:n,multiEntry:i,extractKey:nf(r)};return a[n_(r)]=o,o}),getIndexByKeyPath:e=>a[n_(e)]};return a[":id"]=o.primaryKey,null!=t&&(a[n_(t)]=o.primaryKey),o})},hasGetAll:i.length>0&&"getAll"in n.objectStore(i[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=a.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:n,keys:i,values:a,range:o}){return new Promise((s,l)=>{let c;s=tc(s);let u=e.objectStore(t),p=null==u.keyPath,d="put"===n||"add"===n;if(!d&&"delete"!==n&&"deleteRange"!==n)throw Error("Invalid operation type: "+n);let{length:f}=i||a||{length:1};if(i&&a&&i.length!==a.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let m=[],h=[],g=0,y=e=>{++g,nr(e)};if("deleteRange"===n){if(4===o.type)return s({numFailures:g,failures:h,results:[],lastResult:void 0});3===o.type?m.push(c=u.clear()):m.push(c=u.delete(r(o)))}else{let[e,t]=d?p?[a,i]:[a,null]:[i,null];if(d)for(let i=0;i<f;++i)m.push(c=t&&void 0!==t[i]?u[n](e[i],t[i]):u[n](e[i])),c.onerror=y;else for(let t=0;t<f;++t)m.push(c=u[n](e[t])),c.onerror=y}let b=e=>{let t=e.target.result;m.forEach((e,t)=>null!=e.error&&(h[t]=e.error)),s({numFailures:g,failures:h,results:"delete"===n?i:m.map(e=>e.result),lastResult:t})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:n})=>new Promise((i,r)=>{i=tc(i);let a=e.objectStore(t),o=n.length,s=Array(o),l,c=0,u=0,p=e=>{let t=e.target;s[t._pos]=t.result,++u===c&&i(s)},d=ni(r);for(let e=0;e<o;++e)null!=n[e]&&((l=a.get(n[e]))._pos=e,l.onsuccess=p,l.onerror=d,++c);0===c&&i(s)}),get:({trans:e,key:n})=>new Promise((i,r)=>{i=tc(i);let a=e.objectStore(t).get(n);a.onsuccess=e=>i(e.target.result),a.onerror=ni(r)}),query:e=>new Promise((n,i)=>{n=tc(n);let{trans:a,values:s,limit:l,query:c}=e,u=l===1/0?void 0:l,{index:p,range:d}=c,f=a.objectStore(t),m=p.isPrimaryKey?f:f.index(p.name),h=r(d);if(0===l)return n({result:[]});if(o){let e=s?m.getAll(h,u):m.getAllKeys(h,u);e.onsuccess=e=>n({result:e.target.result}),e.onerror=ni(i)}else{let e=0,t=!s&&"openKeyCursor"in m?m.openKeyCursor(h):m.openCursor(h),r=[];t.onsuccess=i=>{let a=t.result;return a?(r.push(s?a.value:a.primaryKey),++e===l?n({result:r}):void a.continue()):n({result:r})},t.onerror=ni(i)}}),openCursor:function({trans:e,values:n,query:i,reverse:a,unique:o}){return new Promise((s,l)=>{s=tc(s);let{index:c,range:u}=i,p=e.objectStore(t),d=c.isPrimaryKey?p:p.index(c.name),f=a?o?"prevunique":"prev":o?"nextunique":"next",m=!n&&"openKeyCursor"in d?d.openKeyCursor(r(u),f):d.openCursor(r(u),f);m.onerror=ni(l),m.onsuccess=tc(t=>{let n=m.result;if(!n)return void s(null);n.___id=++nh,n.done=!1;let i=n.continue.bind(n),r=n.continuePrimaryKey;r&&(r=r.bind(n));let a=n.advance.bind(n),o=()=>{throw Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw Error("Cursor not started")},n.fail=tc(l),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{let t=new Promise((e,t)=>{e=tc(e),m.onerror=ni(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=o,e(t)}}),s=()=>{if(m.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw Error("Cursor behind last entry")},n.stop()};return m.onsuccess=tc(e=>{m.onsuccess=s,s()}),n.continue=i,n.continuePrimaryKey=r,n.advance=a,s(),t},s(n)},l)})},count({query:e,trans:n}){let{index:i,range:a}=e;return new Promise((e,o)=>{let s=n.objectStore(t),l=i.isPrimaryKey?s:s.index(i.name),c=r(a),u=c?l.count(c):l.count();u.onsuccess=tc(t=>e(t.target.result)),u.onerror=ni(o)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:nd(t),schema:a}}(t,n,r),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),a))}}(e._middlewares,n,e._deps,t);e.core=i.dbcore,e.tables.forEach(t=>{let n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function ny({_novip:e},t,n,i){n.forEach(n=>{let r=i[n];t.forEach(t=>{let i=U(t,n);(!i||"value"in i&&void 0===i.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?V(t,n,{get(){return this.table(n)},set(e){L(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,r))})})}function nb({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function nv(e,t){return e._cfg.version-t._cfg.version}function nA(e,t){let n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){let r=e[n],a=t[n];if(r){let e={name:n,def:a,recreate:!1,del:[],add:[],change:[]};if(""+(r.primKey.keyPath||"")==""+(a.primKey.keyPath||"")&&(r.primKey.auto===a.primKey.auto||tF)){let t,n=r.idxByName,o=a.idxByName;for(t in n)o[t]||e.del.push(t);for(t in o){let i=n[t],r=o[t];i?i.src!==r.src&&e.change.push(r):e.add.push(r)}(e.del.length>0||e.add.length>0||e.change.length>0)&&i.change.push(e)}else e.recreate=!0,i.change.push(e)}else i.add.push([n,a])}return i}function nw(e,t,n,i){let r=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(e=>n$(r,e)),r}function n$(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function nk(e,t,n){let i={};return W(t.objectStoreNames,0).forEach(e=>{let t=n.objectStore(e),r=t.keyPath,a=nc(nu(r),r||"",!1,!1,!!t.autoIncrement,r&&"string"!=typeof r,!0),o=[];for(let e=0;e<t.indexNames.length;++e){let n=t.index(t.indexNames[e]);r=n.keyPath;var s=nc(n.name,r,!!n.unique,!!n.multiEntry,!1,r&&"string"!=typeof r,!1);o.push(s)}i[e]=np(e,a,o)}),i}function nx({_novip:e},t,n){let i=n.db.objectStoreNames;for(let r=0;r<i.length;++r){let a=i[r],o=n.objectStore(a);e._hasGetAll="getAll"in o;for(let e=0;e<o.indexNames.length;++e){let n=o.indexNames[e],i=o.index(n).keyPath,r="string"==typeof i?i:"["+W(i).join("+")+"]";if(t[a]){let e=t[a].idxByName[r];e&&(e.name=n,delete t[a].idxByName[r],t[a].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&T.WorkerGlobalScope&&T instanceof T.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class nC{_parseStoresSpec(e,t){M(e).forEach(n=>{if(null!==e[n]){var i=e[n].split(",").map((e,t)=>{let n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),i=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return nc(n,i||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),O(i),0===t)}),r=i.shift();if(r.multi)throw new eE.Schema("Primary key cannot be multi-valued");i.forEach(e=>{if(e.auto)throw new eE.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new eE.Schema("Index must have a name and cannot be an empty string")}),t[n]=np(n,r,i)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?F(this._cfg.storesSource,e):e;let n=t._versions,i={},r={};return n.forEach(e=>{F(i,e._cfg.storesSource),r=e._cfg.dbschema={},e._parseStoresSpec(i,r)}),t._dbSchema=r,nb(t,[t._allTables,t,t.Transaction.prototype]),ny(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],M(r),r),t._storeNames=M(r),this}upgrade(e){return this._cfg.contentUpgrade=eN(this._cfg.contentUpgrade||eB,e),this}}function nE(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new nq(tN,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function nD(e){return e&&"function"==typeof e.databases}function nS(e){return t_(function(){return e2.letThrough=!0,e()})}function nB(e){var t=t=>e.next(t),n=r(t),i=r(t=>e.throw(t));function r(e){return t=>{var r=e(t),a=r.value;return r.done?a:a&&"function"==typeof a.then?a.then(n,i):O(a)?Promise.all(a).then(n,i):n(a)}}return r(t)()}function nz(e,t,n){var i=arguments.length;if(i<2)throw new eE.InvalidArgument("Too few arguments");for(var r=Array(i-1);--i;)r[i-1]=arguments[i];return n=r.pop(),[e,en(r),n]}function nP(e,t,n){let i=O(e)?e.slice():[e];for(let e=0;e<n;++e)i.push(t);return i}let nT={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let n=e.table(t),{schema:i}=n,r={},a=[];function o(e,t,n){let i=n_(e),s=r[i]=r[i]||[],l=null==e?0:"string"==typeof e?1:e.length,c=t>0,u={...n,isVirtual:c,keyTail:t,keyLength:l,extractKey:nf(e),unique:!c&&n.unique};return s.push(u),u.isPrimaryKey||a.push(u),l>1&&o(2===l?e[0]:e.slice(0,l-1),t+1,n),s.sort((e,t)=>e.keyTail-t.keyTail),u}let s=o(i.primaryKey.keyPath,0,i.primaryKey);for(let e of(r[":id"]=[s],i.indexes))o(e.keyPath,0,e);function l(t){var n,i;let r=t.query.index;return r.isVirtual?{...t,query:{index:r,range:(n=t.query.range,i=r.keyTail,{type:1===n.type?2:n.type,lower:nP(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:nP(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}:t}return{...n,schema:{...i,primaryKey:s,indexes:a,getIndexByKeyPath:function(e){let t=r[n_(e)];return t&&t[0]}},count:e=>n.count(l(e)),query:e=>n.query(l(e)),openCursor(t){let{keyTail:i,isVirtual:r,keyLength:a}=t.query.index;return r?n.openCursor(l(t)).then(n=>n&&Object.create(n,{continue:{value:function(r){null!=r?n.continue(nP(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value(t,r){n.continuePrimaryKey(nP(t,e.MAX_KEY,i),r)}},primaryKey:{get:()=>n.primaryKey},key:{get(){let e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:()=>n.value}})):n.openCursor(t)}}}}}};function nM(e,t,n,i){return n=n||{},i=i||"",M(e).forEach(r=>{if(j(t,r)){var a=e[r],o=t[r];if("object"==typeof a&&"object"==typeof o&&a&&o){let e=el(a);e!==el(o)?n[i+r]=t[r]:"Object"===e?nM(a,o,n,i+r+"."):a!==o&&(n[i+r]=t[r])}else a!==o&&(n[i+r]=t[r])}else n[i+r]=void 0}),M(t).forEach(r=>{j(e,r)||(n[i+r]=t[r])}),n}let nO={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let n=e.table(t),{primaryKey:i}=n.schema;return{...n,mutate(e){let r=e2.trans,{deleting:a,creating:o,updating:s}=r.table(t).hook;switch(e.type){case"add":if(o.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"put":if(o.fire===eB&&s.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"delete":if(a.fire===eB)break;return r._promise("readwrite",()=>l(e),!0);case"deleteRange":if(a.fire===eB)break;return r._promise("readwrite",()=>(function e(t,r,a){return n.query({trans:t,values:!1,query:{index:i,range:r},limit:a}).then(({result:n})=>l({type:"delete",keys:n,trans:t}).then(i=>i.numFailures>0?Promise.reject(i.failures[0]):n.length<a?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...r,lower:n[n.length-1],lowerOpen:!0},a)))})(e.trans,e.range,1e4),!0)}return n.mutate(e);function l(e){var t,r;let l=e2.trans,c=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(i.extractKey));if(!c)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:c}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(r=e).type?Promise.resolve([]):n.getMany({trans:r.trans,keys:c,cache:"immutable"})).then(t=>{let r=c.map((n,r)=>{let c=t[r],u={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(u,n,c,l);else if("add"===e.type||void 0===c){let t=o.fire.call(u,n,e.values[r],l);null==n&&null!=t&&(n=t,e.keys[r]=n,i.outbound||Q(e.values[r],i.keyPath,n))}else{let t=nM(c,e.values[r]),i=s.fire.call(u,t,n,c,l);if(i){let t=e.values[r];Object.keys(i).forEach(e=>{j(t,e)?t[e]=i[e]:Q(t,e,i[e])})}}return u});return n.mutate(e).then(({failures:n,results:i,numFailures:a,lastResult:o})=>{for(let a=0;a<c.length;++a){let o=i?i[a]:c[a],s=r[a];null==o?s.onerror&&s.onerror(n[a]):s.onsuccess&&s.onsuccess("put"===e.type&&t[a]?e.values[a]:o)}return{failures:n,results:i,numFailures:a,lastResult:o}}).catch(e=>(r.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function nF(e,t,n){try{if(!t||t.keys.length<e.length)return null;let i=[];for(let r=0,a=0;r<t.keys.length&&a<e.length;++r)0===t0(t.keys[r],e[a])&&(i.push(n?eo(t.values[r]):t.values[r]),++a);return i.length===e.length?i:null}catch(e){return null}}let nI={stack:"dbcore",level:-1,create:e=>({table:t=>{let n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);let t=nF(e.keys,e.trans._cache,"clone"===e.cache);return t?e6.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?eo(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function nN(e){return!("from"in e)}let nj=function(e,t){if(!this){let t=new nj;return e&&"d"in e&&F(t,e),t}F(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function nR(e,t,n){let i=t0(t,n);if(isNaN(i))return;if(i>0)throw RangeError();if(nN(e))return F(e,{from:t,to:n,d:1});let r=e.l,a=e.r;if(0>t0(n,e.from))return r?nR(r,t,n):e.l={from:t,to:n,d:1,l:null,r:null},nH(e);if(t0(t,e.to)>0)return a?nR(a,t,n):e.r={from:t,to:n,d:1,l:null,r:null},nH(e);0>t0(t,e.from)&&(e.from=t,e.l=null,e.d=a?a.d+1:1),t0(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);let o=!e.r;r&&!e.l&&nL(e,r),a&&o&&nL(e,a)}function nL(e,t){nN(t)||function e(t,{from:n,to:i,l:r,r:a}){nR(t,n,i),r&&e(t,r),a&&e(t,a)}(e,t)}function nV(e){let t=nN(e)?null:{s:0,n:e};return{next(e){let n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>t0(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=t0(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function nH(e){var t,n;let i=((null==(t=e.r)?void 0:t.d)||0)-((null==(n=e.l)?void 0:n.d)||0),r=i>1?"r":i<-1?"l":"";if(r){let t="r"===r?"l":"r",n={...e},i=e[r];e.from=i.from,e.to=i.to,e[r]=i[r],n[r]=i[t],e[t]=n,n.d=nG(n)}e.d=nG(e)}function nG({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}R(nj.prototype,{add(e){return nL(this,e),this},addKey(e){return nR(this,e,e),this},addKeys(e){return e.forEach(e=>nR(this,e,e)),this},[ec](){return nV(this)}});let nU={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,n=new nj(e.MIN_KEY,e.MAX_KEY);return{...e,table:i=>{let r=e.table(i),{schema:a}=r,{primaryKey:o}=a,{extractKey:s,outbound:l}=o,c={...r,mutate:e=>{let o=e.trans,s=o.mutatedParts||(o.mutatedParts={}),l=e=>{let n=`idb://${t}/${i}/${e}`;return s[n]||(s[n]=new nj)},c=l(""),u=l(":dels"),{type:p}=e,[d,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],m=e.trans._cache;return r.mutate(e).then(e=>{if(O(d)){"delete"!==p&&(d=e.results),c.addKeys(d);let t=nF(d,m);t||"add"===p||u.addKeys(d),(t||f)&&a.indexes.forEach(function(e){let n=l(e.name||"");function i(t){return null!=t?e.extractKey(t):null}let r=t=>e.multiEntry&&O(t)?t.forEach(e=>n.addKey(e)):n.addKey(t);(t||f).forEach((e,n)=>{let a=t&&i(t[n]),o=f&&i(f[n]);0!==t0(a,o)&&(null!=a&&r(a),null!=o&&r(o))})})}else if(d){let e={from:d.lower,to:d.upper};u.add(e),c.add(e)}else c.add(n),u.add(n),a.indexes.forEach(e=>l(e.name).add(n));return e})}},u=({query:{index:t,range:n}})=>{var i,r;return[t,new nj(null!=(i=n.lower)?i:e.MIN_KEY,null!=(r=n.upper)?r:e.MAX_KEY)]},p={get:e=>[o,new nj(e.key)],getMany:e=>[o,(new nj).addKeys(e.keys)],count:u,query:u,openCursor:u};return M(p).forEach(e=>{c[e]=function(a){let{subscr:o}=e2;if(o){let c=e=>{let n=`idb://${t}/${i}/${e}`;return o[n]||(o[n]=new nj)},u=c(""),d=c(":dels"),[f,m]=p[e](a);if(c(f.name||"").add(m),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&a.values&&r.query({...a,values:!1});return r[e].apply(this,arguments).then(n=>{if("query"===e){if(l&&a.values)return t.then(({result:e})=>(u.addKeys(e),n));let e=a.values?n.result.map(s):n.result;a.values?u.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=a.values;return n&&Object.create(n,{key:{get:()=>(d.addKey(n.primaryKey),n.key)},primaryKey:{get(){let e=n.primaryKey;return d.addKey(e),e}},value:{get:()=>(e&&u.addKey(n.primaryKey),n.value)}})}return n})}d.add(n)}}return r[e].apply(this,arguments)}}),c}}}};class nq{constructor(e,t){var n,i,r;this._middlewares={},this.verno=0;const a=nq.dependencies;this._options=t={addons:nq.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:eB,dbReadyPromise:null,cancelOpen:eB,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new e6(e=>{s.dbReadyResolve=e}),s.openCanceller=new e6((e,t)=>{s.cancelOpen=t}),this._state=s,this.name=e,this.on=tU(this,"populate","blocked","versionchange","close",{ready:[eN,eB]}),this.on.ready.subscribe=K(this.on.ready.subscribe,e=>(t,n)=>{nq.vip(()=>{let i=this._state;if(i.openComplete)i.dbOpenError||e6.resolve().then(t),n&&e(t);else if(i.onReadyBeingFired)i.onReadyBeingFired.push(t),n&&e(t);else{e(t);let i=this;n||e(function e(){i.on.ready.unsubscribe(t),i.on.ready.unsubscribe(e)})}})}),this.Collection=(n=this,tq(t3.prototype,function(e,t){this.db=n;let i=tV,r=null;if(t)try{i=t()}catch(e){r=e}let a=e._ctx,o=a.table,s=o.hook.reading.fire;this._ctx={table:o,index:a.index,isPrimKey:!a.index||o.schema.primKey.keyPath&&a.index===o.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:a.or,valueMapper:s!==ez?s:null}})),this.Table=function(e){return tq(tG.prototype,function(t,n,i){this.db=e,this._tx=i,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:tU(null,{creating:[eM,eB],reading:[eP,ez],updating:[eF,eB],deleting:[eO,eB]})})}(this),this.Transaction=(i=this,tq(nl.prototype,function(e,t,n,r,a){this.db=i,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=tU(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new e6((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),tS(e)})})),this.Version=(r=this,tq(nC.prototype,function(e){this.db=r,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=function(e){return tq(nn.prototype,function(t,n,i){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:i};let r=e._deps.indexedDB;if(!r)throw new eE.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=(e,t)=>r.cmp(t,e),this._max=(e,t)=>r.cmp(e,t)>0?e:t,this._min=(e,t)=>0>r.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=nd(t.IDBKeyRange),this._createTransaction=(e,t,n,i)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,i),this._fireOnBlocked=e=>{this.on("blocked").fire(e),tO.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(nT),this.use(nO),this.use(nU),this.use(nI),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new eE.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new eE.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(nv),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||e2.letThrough||this._vip)?e():new e6((e,t)=>{if(this._state.openComplete)return t(new eE.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new eE.DatabaseClosed);this.open().catch(eB)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:i}){i&&this.unuse({stack:e,name:i});let r=this._middlewares[e]||(this._middlewares[e]=[]);return r.push({stack:e,create:t,level:null==n?10:n,name:i}),r.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){var t;let n=e._state,{indexedDB:i}=e._deps;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(()=>n.dbOpenError?tS(n.dbOpenError):e);em&&(n.openCanceller._stackHolder=eg()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;let r=n.openCanceller;function a(){if(n.openCanceller!==r)throw new eE.DatabaseClosed("db.open() was cancelled")}let o=n.dbReadyResolve,s=null,l=!1,c=()=>new e6((t,r)=>{if(a(),!i)throw new eE.MissingAPI;let o=e.name,c=n.autoSchema?i.open(o):i.open(o,Math.round(10*e.verno));if(!c)throw new eE.MissingAPI;c.onerror=ni(r),c.onblocked=tc(e._fireOnBlocked),c.onupgradeneeded=tc(t=>{if(s=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=nr,s.abort(),c.result.close();let e=i.deleteDatabase(o);e.onsuccess=e.onerror=tc(()=>{r(new eE.NoSuchDatabase(`Database ${o} doesnt exist`))})}else{let n,i,o,d;s.onerror=ni(r);var a,u,p=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=p<1,e._novip.idbdb=c.result,a=p/10,u=s,n=e._dbSchema,(i=e._createTransaction("readwrite",e._storeNames,n)).create(u),i._completion.catch(r),o=i._reject.bind(i),d=e2.transless||e2,t_(()=>{e2.trans=i,e2.transless=d,0===a?(M(n).forEach(e=>{nw(u,e,n[e].primKey,n[e].indexes)}),ng(e,u),e6.follow(()=>e.on.populate.fire(i)).catch(o)):(function({_novip:e},t,n,i){let r=[],a=e._versions,o=e._dbSchema=nk(e,e.idbdb,i),s=!1;return a.filter(e=>e._cfg.version>=t).forEach(a=>{r.push(()=>{let r=o,l=a._cfg.dbschema;nx(e,r,i),nx(e,l,i),o=e._dbSchema=l;let c=nA(r,l);c.add.forEach(e=>{nw(i,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new eE.Upgrade("Not yet support for changing primary key");{let t=i.objectStore(e.name);e.add.forEach(e=>n$(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),n$(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let u=a._cfg.contentUpgrade;if(u&&a._cfg.version>t){let t;ng(e,i),n._memoizedTables={},s=!0;let a=ee(l);c.del.forEach(e=>{a[e]=r[e]}),nb(e,[e.Transaction.prototype]),ny(e,[e.Transaction.prototype],M(a),a),n.schema=a;let o=ef(u);o&&tg();let p=e6.follow(()=>{if((t=u(n))&&o){var e=ty.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?e6.resolve(t):p.then(()=>t)}}),r.push(t=>{var i;s&&tF||(i=a._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==i[e]&&t.db.deleteObjectStore(e))),nb(e,[e.Transaction.prototype]),ny(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),(function e(){return r.length?e6.resolve(r.shift()(n.idbtrans)).then(e):e6.resolve()})().then(()=>{var e;M(e=o).forEach(t=>{i.db.objectStoreNames.contains(t)||nw(i,t,e[t].primKey,e[t].indexes)})})})(e,a,i,u).catch(o)})}},r),c.onsuccess=tc(()=>{s=null;let i=e._novip.idbdb=c.result,r=W(i.objectStoreNames);if(r.length>0)try{let t,a=i.transaction(1===r.length?r[0]:r,"readonly");n.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;let i=e._dbSchema=nk(0,t,n);e._storeNames=W(t.objectStoreNames,0),ny(e,[e._allTables],M(i),i)}(e,i,a):(nx(e,e._dbSchema,a),((t=nA(nk(0,e.idbdb,a),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ng(e,a)}catch(e){}tO.push(e),i.onversionchange=tc(t=>{n.vcFired=!0,e.on("versionchange").fire(t)}),i.onclose=tc(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},n){nD(e)||n===tN||nE(e,t).put({name:n}).catch(eB)}(e._deps,o),t()},r)}).catch(e=>e&&"UnknownError"===e.name&&n.PR1398_maxLoop>0?(n.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):e6.reject(e));return e6.race([r,("undefined"==typeof navigator?e6.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(c)]).then(()=>(a(),n.onReadyBeingFired=[],e6.resolve(nS(()=>e.on.ready.fire(e.vip))).then(function t(){if(n.onReadyBeingFired.length>0){let i=n.onReadyBeingFired.reduce(eN,eB);return n.onReadyBeingFired=[],e6.resolve(nS(()=>i(e.vip))).then(t)}}))).finally(()=>{n.onReadyBeingFired=null,n.isBeingOpened=!1}).then(()=>e).catch(t=>{n.dbOpenError=t;try{s&&s.abort()}catch(e){}return r===n.openCanceller&&e._close(),tS(t)}).finally(()=>{n.openComplete=!0,o()})}(this)}_close(){let e=this._state,t=tO.indexOf(this);if(t>=0&&tO.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new e6(t=>{e.dbReadyResolve=t}),e.openCanceller=new e6((t,n)=>{e.cancelOpen=n})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new eE.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new e6((n,i)=>{let r=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tc(()=>{!function({indexedDB:e,IDBKeyRange:t},n){nD(e)||n===tN||nE(e,t).delete(n).catch(eB)}(this._deps,this.name),n()}),e.onerror=ni(i),e.onblocked=this._fireOnBlocked};if(e)throw new eE.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(r):r()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return M(this._allTables).map(e=>this._allTables[e])}transaction(){let e=nz.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let i,r,a=e2.trans;a&&a.db===this&&-1===e.indexOf("!")||(a=null);let o=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(r=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===tj)i=tj;else{if("rw"!=e&&e!=tR)throw new eE.InvalidArgument("Invalid transaction mode: "+e);i=tR}if(a){if(a.mode===tj&&i===tR){if(!o)throw new eE.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&r.forEach(e=>{if(a&&-1===a.storeNames.indexOf(e)){if(!o)throw new eE.SubTransaction("Table "+e+" not included in parent transaction.");a=null}}),o&&a&&!a.active&&(a=null)}}catch(e){return a?a._promise(null,(t,n)=>{n(e)}):tS(e)}let s=(function e(t,n,i,r,a){return e6.resolve().then(()=>{let o,s=e2.transless||e2,l=t._createTransaction(n,i,t._dbSchema,r);if(r)l.idbtrans=r.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===eC.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,i,null,a))):tS(r)}let c=ef(a);c&&tg();let u=e6.follow(()=>{if(o=a.call(l,l))if(c){var e=ty.bind(null,null);o.then(e,e)}else"function"==typeof o.next&&"function"==typeof o.throw&&(o=nB(o))},{trans:l,transless:s});return(o&&"function"==typeof o.then?e6.resolve(o).then(e=>l.active?e:tS(new eE.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):u.then(()=>o)).then(e=>(r&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),tS(e)))})}).bind(null,this,i,r,a,n);return a?a._promise(i,s,"lock"):e2.trans?tk(e2.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!j(this._allTables,e))throw new eE.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let nW="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class nK{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[nW](){return this}}function nY(e,t){return M(t).forEach(n=>{nL(e[n]||(e[n]=new nj),t[n])}),e}try{i={indexedDB:T.indexedDB||T.mozIndexedDB||T.webkitIndexedDB||T.msIndexedDB,IDBKeyRange:T.IDBKeyRange||T.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function nJ(e){let t=nZ;try{nZ=!0,ns.storagemutated.fire(e)}finally{nZ=t}}R(nq,{...eS,delete:e=>new nq(e,{addons:[]}).delete(),exists:e=>new nq(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return nD(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==tN)):nE(e,t).toCollection().primaryKeys()})(nq.dependencies).then(e)}catch(e){return tS(new eE.MissingAPI)}},defineClass:()=>function(e){F(this,e)},ignoreTransaction:e=>e2.trans?tk(e2.transless,e):e(),vip:nS,async:function(e){return function(){try{var t=nB(e.apply(this,arguments));return t&&"function"==typeof t.then?t:e6.resolve(t)}catch(e){return tS(e)}}},spawn:function(e,t,n){try{var i=nB(e.apply(n,t||[]));return i&&"function"==typeof i.then?i:e6.resolve(i)}catch(e){return tS(e)}},currentTransaction:{get:()=>e2.trans||null},waitFor:function(e,t){let n=e6.resolve("function"==typeof e?nq.ignoreTransaction(e):e).timeout(t||6e4);return e2.trans?e2.trans.waitFor(n):n},Promise:e6,debug:{get:()=>em,set:e=>{em=e,eh="dexie"===e?()=>!0:tI}},derive:H,extend:F,props:R,override:K,Events:tU,on:ns,liveQuery:function(e){let t,n=!1,i=new nK(i=>{let r=ef(e),a=!1,o={},s={},l={get closed(){return a},unsubscribe:()=>{a=!0,ns.storagemutated.unsubscribe(d)}};i.start&&i.start(l);let c=!1,u=!1;function p(){return M(s).some(e=>o[e]&&function(e,t){let n=nV(t),i=n.next();if(i.done)return!1;let r=i.value,a=nV(e),o=a.next(r.from),s=o.value;for(;!i.done&&!o.done;){if(0>=t0(s.from,r.to)&&t0(s.to,r.from)>=0)return!0;0>t0(r.from,s.from)?r=(i=n.next(s.from)).value:s=(o=a.next(r.from)).value}return!1}(o[e],s[e]))}let d=e=>{nY(o,e),p()&&f()},f=()=>{let m,h;if(c||a)return;o={};let g={},y=(r&&tg(),m=()=>t_(e,{subscr:g,trans:null}),h=e2.trans?tk(e2.transless,m):m(),r&&h.then(ty,ty),h);u||(ns(na,d),u=!0),c=!0,Promise.resolve(y).then(e=>{n=!0,t=e,c=!1,a||(p()?f():(o={},s=g,i.next&&i.next(e)))},e=>{c=!1,n=!1,i.error&&i.error(e),l.unsubscribe()})};return f(),l});return i.hasValue=()=>n,i.getValue=()=>t,i},extendObservabilitySet:nY,getByKeyPath:X,setByKeyPath:Q,delByKeyPath:function(e,t){"string"==typeof t?Q(e,t,void 0):"length"in t&&[].map.call(t,function(t){Q(e,t,void 0)})},shallowClone:ee,deepClone:eo,getObjectDiff:nM,cmp:t0,asap:J,minKey:tP,addons:[],connections:tO,errnames:eC,dependencies:i,semVer:tB,version:tB.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),nq.maxKey=nd(nq.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(ns(na,e=>{if(!nZ){let t;tF?(t=document.createEvent("CustomEvent")).initCustomEvent(no,!0,!0,e):t=new CustomEvent(no,{detail:e}),nZ=!0,dispatchEvent(t),nZ=!1}}),addEventListener(no,({detail:e})=>{nZ||nJ(e)}));let nZ=!1;if("undefined"!=typeof BroadcastChannel){let e=new BroadcastChannel(no);"function"==typeof e.unref&&e.unref(),ns(na,t=>{nZ||e.postMessage(t)}),e.onmessage=e=>{e.data&&nJ(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){ns(na,e=>{try{nZ||("undefined"!=typeof localStorage&&localStorage.setItem(no,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:no,changedParts:e})))}catch(e){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",e=>{if(e.key===no){let t=JSON.parse(e.newValue);t&&nJ(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===no&&nJ(e.changedParts)})}e6.rejectionMapper=function(e,t){if(!e||e instanceof ew||e instanceof TypeError||e instanceof SyntaxError||!e.name||!eD[e.name])return e;var n=new eD[e.name](t||e.message,e);return"stack"in e&&V(n,"stack",{get:function(){return this.inner.stack}}),n},eh=tI;var nX=n(70937),nQ=n(467);function n0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class n1 extends nq{constructor(){super("EsmOffline"),n0(this,"syncQueue",void 0),n0(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function n2(){return new n1}let n3=new n1,n4={},n5=(0,nQ.Zd)("offline-synchronization",{});function n6(){return n5}async function n7(){if(n5.getState().synchronization)return;let e=await n3.syncQueue.count(),t={},n=Object.entries(n4),i=n.length,r={},a=new AbortController,o=()=>{let e=n5.getState().synchronization;n5.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{n5.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}});for(let e=0;e<i&&n.length>0;e++)for(let e=n.length;e--;){let[i,s]=n[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(r[i]={},await Promise.all(l),t[i]=n8(s,r,a,o),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{n5.setState({synchronization:void 0})}}async function n8({type:e,dependsOn:t,process:n},i,r,a){let o=[],s=[],l=await n9();await n3.syncQueue.where({type:e,userId:l}).each((e,t)=>{o.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let c=0;c<o.length;c++){let[u,p,{id:d,dependencies:f=[]}]=o[c];try{let a=await n(p,{abort:r,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:n})=>t.includes(n)?i[n][e]:void 0)});void 0!==d&&(i[e][d]=a),await n3.syncQueue.delete(u)}catch(e){await n3.syncQueue.update(u,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{a()}}}async function n9(){let e=await (0,nX.xC)();return e?.uuid||"*"}async function ie(e,t,n,i){let r=i&&i.id;return void 0!==r&&await n3.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===r).delete().catch(nq.errnames.DatabaseClosed),await n3.syncQueue.add({type:t,content:n,userId:e,descriptor:i||{},createdOn:new Date}).catch(nq.errnames.DatabaseClosed,()=>-1)}async function it(e,t,n){let i=await n9();return await ie(i,e,t,n)}async function ii(e,t){return(await ir(e,t)).map(e=>e.content)}async function ir(e,t){return await n3.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(nq.errnames.DatabaseClosed,()=>[])}async function ia(e){let t=await n9();return await ii(t,e)}async function io(e){let t=await n9();return await ir(t,e)}async function is(e){return await n3.syncQueue.get(e).catch(nq.errnames.DatabaseClosed,()=>void 0)}function il(e){return!!n4[e]?.options.onBeginEditSyncItem}async function ic(e){let t=await is(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let n=n4[t.type]?.options.onBeginEditSyncItem;if(!n)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function iu(e){await n3.syncQueue.delete(e).catch(nq.errnames.DatabaseClosed)}function ip(e,t,n,i={}){n4[e]={type:e,dependsOn:t,process:n,options:i}}let id="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),im=new Uint8Array(16),ih=[];for(let e=0;e<256;++e)ih.push((e+256).toString(16).slice(1));let i_=function(e,t,n){if(id&&!t&&!e)return id();let i=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(im)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return ih[e[t+0]]+ih[e[t+1]]+ih[e[t+2]]+ih[e[t+3]]+"-"+ih[e[t+4]]+ih[e[t+5]]+"-"+ih[e[t+6]]+ih[e[t+7]]+"-"+ih[e[t+8]]+ih[e[t+9]]+"-"+ih[e[t+10]]+ih[e[t+11]]+ih[e[t+12]]+ih[e[t+13]]+ih[e[t+14]]+ih[e[t+15]]}(i)},ig="OFFLINE+";function iy(){return ig+i_()}function ib(e){return e.startsWith(ig)}let iv={};function iA(){return Object.values(iv)}function iw(e){iv[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),iv[e.id]=e}async function i$(e){let t=await iz();return await ik(t,e)}async function ik(e,t){let n=new n1;return await n.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(nq.errnames.DatabaseClosed,()=>[])}async function ix(e,t){let n=await iz();return await iC(n,e,t)}async function iC(e,t,n){let i=new n1,r=await i.dynamicOfflineData.get({type:t,identifier:n}).catch(nq.errnames.DatabaseClosed,()=>void 0);r?r.users.includes(e)||await i.dynamicOfflineData.update(r.id,{users:[...r.users,e]}).catch(nq.errnames.DatabaseClosed):await i.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(nq.errnames.DatabaseClosed)}async function iE(e,t){let n=await iz();return await iD(n,e,t)}async function iD(e,t,n){let i=new n1,r=await i.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(nq.errnames.DatabaseClosed,()=>void 0);r&&(r.users.length>1?await i.dynamicOfflineData.update(r.id,{users:r.users.filter(t=>t!==e)}).catch(nq.errnames.DatabaseClosed):await i.dynamicOfflineData.delete(r.id).catch(nq.errnames.DatabaseClosed))}async function iS(e,t){let n=await i$(e);await Promise.all(n.map(async e=>iB(e.type,e.identifier,t)))}async function iB(e,t,n){await ix(e,t);let i=new n1,r=await iz(),a=await i.dynamicOfflineData.get({type:e,identifier:t}).catch(nq.errnames.DatabaseClosed,()=>void 0),o=iA().filter(t=>t.type===e);if(!a)return;let s=await Promise.all(o.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(n){let t=n.message?.toString()??n.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),p={syncedOn:new Date,syncedBy:r,succeededHandlers:l,erroredHandlers:c,errors:u};a.id&&await i.dynamicOfflineData.update(a.id,{syncState:p}).catch(nq.errnames.DatabaseClosed)}async function iz(){let e=(await (0,nX.xC)()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let iP=(0,nQ.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function iT(){return iF(),iP}function iM(e,t){iF(),iw({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??new AbortController().signal})})}async function iO(e){iF(),await iB("patient",e)}function iF(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}},44408:function(e,t,n){"use strict";let i;n.d(t,{fq:()=>eG,JK:()=>j,if:()=>eS,tQ:()=>eI,YY:()=>c,E4:()=>es,zD:()=>ee,g9:()=>L,uL:()=>g,kH:()=>ez,br:()=>b,Gz:()=>eu,M3:()=>eM,qw:()=>B,Wq:()=>ec,rr:()=>h,oU:()=>ej,wV:()=>eq,d7:()=>er,Jm:()=>eT,xH:()=>eH,W3:()=>A,zq:()=>a,Ie:()=>H,CH:()=>ef,ns:()=>R,vL:()=>ex,xl:()=>eD,Us:()=>G,UK:()=>Q,fS:()=>D,yJ:()=>Y,u:()=>ed,to:()=>eg,iy:()=>ev,_9:()=>K,Bf:()=>ew,Tt:()=>q,CX:()=>y,Ed:()=>em,p6:()=>E,Wr:()=>eP,TA:()=>eB,F7:()=>N,qv:()=>eE,sc:()=>V,WQ:()=>eO,Pj:()=>f,i_:()=>s,$B:()=>el,oq:()=>ek,wJ:()=>eN,mQ:()=>m,wr:()=>eU,mw:()=>ey,jn:()=>C,Fx:()=>ei});var r=n(35400);let a=(0,r.createContext)({moduleName:"",featureName:""});var o=n(17744);function s({to:e,templateParams:t,onBeforeNavigate:n,children:i,...a}){return(0,r.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),r.createElement("a",{onClick:i=>{0===i.button&&!i.ctrlKey&&!i.shiftKey&&!i.altKey&&!i.metaKey&&(i.preventDefault(),n?.(i),(0,o.oo)({to:e,templateParams:t})),0===i.button&&(i.ctrlKey||i.metaKey)&&n?.(i),0===i.button&&i.shiftKey&&n?.(i),1===i.button&&n?.(i)},href:(0,o.JG)(e,t),...a},i)}var l=n(11621);let c=({state:e,children:t,...n})=>{let{extension:i}=(0,r.useContext)(a),o=(0,r.useRef)(null),s=(0,r.useRef)(Promise.resolve()),c=(0,r.useCallback)(t=>{i?.extensionSlotName&&i.extensionSlotModuleName&&i.extensionSlotModuleName&&!o.current&&(0,l.wG)(t,i.extensionSlotName,i.extensionSlotModuleName,i.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,r.useEffect)(()=>()=>{if(o&&o.current)switch(o.current.getStatus()){case"MOUNTING":o.current.mountPromise.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()});break;case"MOUNTED":o.current.unmount();break;case"UPDATING":s.current&&s.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,r.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,s.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(s.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),i?r.createElement("div",{ref:c,"data-extension-id":i?.extensionId,style:{position:"relative"},...n}):null};var u=n(467);function p(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[i,r]of Object.entries(t)){let t=function(...t){e.setState(e=>r(e,...t))};n[i]=t}return n}let d=()=>e=>e;function f(e,t=d(),n){let[i,a]=(0,r.useState)(()=>t(e.getState()));(0,r.useEffect)(()=>(0,u.i7)(e,t,a),[e,t]);let o=(0,r.useMemo)(()=>n?p(e,n):{},[e,n]);return{...i,...o}}function m(e,t){return f(e,d(),t)}function h(e){return function(t){let[n,i]=(0,r.useState)(e.getState());(0,r.useEffect)(()=>e.subscribe(e=>i(e)),[]);let a=(0,r.useMemo)(()=>t?p(e,t):{},[t]);return{...n,...a}}}let g=e=>f((0,l.zF)(),t=>t.slots?.[e]);function y(e){let t=g(e);return t?.assignedExtensions??[]}function b(e){let{moduleName:t}=(0,r.useContext)(a);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)(()=>{(0,l.FY)(t,e)},[]),{extensions:y(e),extensionSlotName:e,extensionSlotModuleName:t}}function v(e){return e}function A({name:e,extensionSlotName:t,select:n=v,children:i,state:o,style:s,...l}){if(i&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let u=e??t,p=(0,r.useRef)(null),{extensions:d,extensionSlotModuleName:f}=b(u),m=(0,r.useMemo)(()=>n(d),[n,d]),h=(0,r.useMemo)(()=>{if("function"==typeof i&&!r.isValidElement(i))return m.map(e=>i(e,o))},[i,m]);return r.createElement("div",{ref:p,"data-extension-slot-name":u,"data-extension-slot-module-name":f,style:{...s,position:"relative"},...l},u&&m?.map((e,t)=>r.createElement(a.Provider,{key:e.id,value:{moduleName:f,featureName:"",extension:{extensionId:e.id,extensionSlotName:u,extensionSlotModuleName:f}}},h?.[t]??("function"!=typeof i?i:null)??r.createElement(c,{state:o}))))}let w=(0,n(58644).y)()(()=>({}));(0,u.CE)("openmrs-app-context",w);let $={};function k(e,t){w.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}var x=n(90108);function C(e,t){let n=(0,r.useRef)(t??{}),i=(0,r.useRef)(t=>k(e,t));return(0,r.useEffect)(()=>(!function(e,t=$){w.setState(n=>{if(e in n)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===$?{}:t})})}(e,t??{}),()=>{w.setState(t=>(e in t&&delete t[e],t))}),[e]),(0,r.useEffect)(()=>{let i=t??{};(0,x.b)(n.current,i)||(k(e,()=>i),n.current=i)},[t]),i.current}function E({namespace:e,value:t}){return C(e,t),null}let D=({children:e,value:t,fallback:n})=>t?r.createElement(r.Fragment,null,e):n?r.createElement(r.Fragment,null,n):null;var S=n(70937);let B=({privilege:e,fallback:t,children:n})=>{let[i,a]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=(0,S.HW)({includeAuthStatus:!1}).subscribe(a);return()=>e.unsubscribe()},[]),i&&(0,S.st)(e,i))?r.createElement(r.Fragment,null,n):t?r.createElement(r.Fragment,null,t):null};var z=n(25873),P=n(6309),T=n(58088),M=n(13624);let O={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},F=new Map,I={errorRetryCount:3,fetcher:S.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>F};function N(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},O,e),n={...I,...t.swrConfig};return function(e){var i,o,s,l,c;return s=o=class extends(i=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.");{let i=r.createElement(r.Suspense,{fallback:null},r.createElement(M.SWRConfig,{value:n},r.createElement(a.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(T.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,i):i}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},l="displayName",c=`OpenmrsReactComponent(${t.featureName})`,l in s?Object.defineProperty(s,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[l]=c,o}}function j(e,t){return(0,P.A)({React:r,ReactDOMClient:z,rootComponent:N(t)(e)})}function R(e,t){return()=>e().then(({default:e})=>j(e,t))}function L(e,t){return()=>Promise.resolve(j(e,t))}let V=R;function H(){let e=(0,r.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,r.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function G(e,t=e=>e??{}){let[n,i]=(0,r.useState)();return(0,r.useEffect)(()=>{if(null==e||""===e.replace(" ",""))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,r.useEffect)(()=>{var r;let a;return(r=e=>{if(void 0!==e){let r=t?t(e):e??{};(0,x.b)(n,r)||i(r)}})(Object.freeze(Object.assign({},a=function(e,t=e=>e){let n=w.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}(e)))),w.subscribe(t=>{let n=e in t?t[e]:null;n!==a&&(a=n,r(Object.freeze(Object.assign({},n))))})},[]),n}var U=n(75133);function q(e){let[t,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>(0,l.zF)().subscribe(i=>{let r=i.slots[e]?.assignedExtensions.map(e=>e.id)??[];(0,U.A)(r,t)||n(r)}),[]),t}var W=n(30924);function K(e,t){let{data:n,error:i,mutate:a,isLoading:o,isValidating:s}=(0,M.default)(`${W.Zu}?patient=${e}&includeEncounterless=${t}`,S.lo);return(0,r.useMemo)(()=>({isLoading:o,data:n?.data.results??[],error:i,mutate:a,isValidating:s}),[n,i,o,s,a])}function Y(e){(0,r.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}var J=n(13070);let Z={},X=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
22
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function Q(e){let{moduleName:t,extension:n}=(0,r.useContext)(a),i=e?.externalModuleName??t;if(!i&&!n)throw Error(X);let o=function(e){let t=(0,r.useMemo)(()=>(0,J.IS)(e),[e]),n=function(e){let[t,n]=(0,r.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,r.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw Z[e]||(Z[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),Z[e];return n}(i),s=function(e){let t=(0,r.useMemo)(J.GI,[]),n=function(e,t){let[n,i]=(0,r.useState)(t?()=>{let n=e.getState(),i=(0,J.P0)(n,t.extensionSlotName,t.extensionId);if(i.loaded&&i.config)return i.config}:null);return(0,r.useEffect)(()=>{if(t)return e.subscribe(e=>{let r=(0,J.P0)(e,t.extensionSlotName,t.extensionId);r.loaded&&r.config&&!(0,U.A)(r.config,n)&&i(r.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!Z[n]&&t&&(Z[n]=new Promise(n=>{let i=t.subscribe(t=>{let r=(0,J.P0)(t,e.extensionSlotName,e.extensionId);r.loaded&&r.config&&(n(r.config),i())})})),Z[n]}return n||{}}(n);return(0,r.useMemo)(()=>e?.externalModuleName&&i===e.externalModuleName?{...o}:{...o,...s},[i,e?.externalModuleName,o,s])}let ee=y;var et=n(27760),en=n(9826);function ei(){let[e,t]=(0,r.useState)((0,en.s)());return(0,r.useEffect)(()=>(0,et.gj)(({online:e})=>t(e)),[]),e}function er(e,t=300){let[n,i]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let n=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var ea=n(44924);let eo=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function es(){let e=`${S.Jj}/emrapi/configuration?v=${eo}`,t=(0,ea.A)(e,S.lo);return(0,r.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let el=h((0,l.a9)());function ec(e){let t=y(e);return(0,r.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let eu=h((0,l.zF)());var ep=n(10201);function ed(e){let{flags:t}=f(ep.jX);return t[e]?.enabled??!1}function ef(){let[,e]=(0,r.useState)(0);return(0,r.useCallback)(()=>{e(e=>e+1)},[])}function em(e,t,n={}){return e_(e,t,eh,n)}let eh={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let i=new URL((0,S.Gm)(e.toString()),window.location.toString());return i.searchParams.set("limit",""+t),i.searchParams.set("startIndex",""+n),i.searchParams.set("totalCount","true"),i.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function e_(e,t,n,i={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:s,getData:l}=n,{immutable:c,swrConfig:u}=i,p=i.fetcher??S.lo,[d,f]=(0,r.useState)(1),m=(0,r.useRef)(NaN),h=(0,r.useRef)(NaN),g=(d-1)*t,y=(0,r.useMemo)(()=>a(e,t,g),[e,t,g]),{data:b,...v}=(c?ea.A:M.default)(y,p,u);b?.data&&(m.current=o(b?.data),h.current=s(b?.data));let A=Math.ceil(m.current/t),w=(0,r.useCallback)(e=>{0<e&&e<=A?f(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,d,A]),$=(0,r.useCallback)(()=>{w(d+1)},[e,d,A]),k=(0,r.useCallback)(()=>{w(d-1)},[e,d,A]);return{data:l(b?.data),totalPages:A,totalCount:m.current,currentPage:d,currentPageSize:h,paginated:A>1,showNextButton:d<A,showPreviousButton:d>1,goTo:w,goToNext:$,goToPrevious:k,...v}}function eg(e,t,n={}){return e_(e,t,ey(),n)}function ey(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let i=new URL((0,S.Gm)(e.toString()),window.location.toString());return i.searchParams.set("_count",""+t),i.searchParams.set("_getpagesoffset",""+n),i.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var eb=n(82910);function ev(e,t={}){return eA(e,eh,t)}function eA(e,t,n={}){let{swrInfiniteConfig:i,immutable:a}=n,{getNextUrl:o,getTotalCount:s,getData:l}=t,c=n.fetcher??S.lo,u=(0,r.useCallback)((n,i)=>0==n?e?.toString()??null:t.getNextUrl(i.data),[e]),{data:p,size:d,setSize:f,...m}=(0,eb.Ay)(u,c,{...i,...a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=o(p?.[p.length-1].data),g=s(p?.[0]?.data);return{data:p?.flatMap(e=>l(e.data)),totalCount:g,hasMore:null!=h,loadMore:()=>{f((p?.length??0)+1)},nextUri:h,...m}}function ew(e,t={}){return e$(e,eh,t)}function e$(e,t,n={}){let i=eA(e,t,n),{hasMore:a,error:o,data:s,loadMore:l,isLoading:c,nextUri:u}=i;return((0,r.useEffect)(()=>{a&&!o&&l()},[a,u]),n.partialData)?i:{...i,data:a||o?void 0:s,isLoading:c||a}}function ek(e,t={}){return e$(e,ey(),t)}function ex(e,t={}){return eA(e,ey(),t)}function eC(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function eE(){let[e,t]=(0,r.useState)(eC);return(0,r.useEffect)(()=>{let e=()=>{t(eC())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let eD=e=>"small-desktop"===e||"large-desktop"===e;function eS(e){let t=(0,r.useContext)(a);(0,r.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),(0,l.Vx)(e),()=>{(0,l.sr)(e.name)}),[t,e])}function eB(){return f(l.Gp)}function ez(e=null,t=null){let[n,i]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let n=(0,W.Vs)(e,t).subscribe(e=>{i(e)},e=>{console.error(e)});return()=>n.unsubscribe()},[e,t]),n}function eP(e,t=!0){let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let i=i=>{!t||!n.current||n.current.contains(i.target)||e(i)};return window.addEventListener("mousedown",i),window.addEventListener("touchstart",i),()=>{window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",i)}},[e,t]),n}function eT(e){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function eM(e,t={}){let{abortController:n,fetchInit:i,url:a,swrConfig:o}=t,s=H(),l=(0,r.useMemo)(()=>i?.signal??n?.signal??s.signal,[n?.signal,i?.signal,s.signal]),c=(0,r.useCallback)(e=>{let t=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,a);return(0,S.lo)(t,{...i,signal:l})},[l,i,a]);return(0,M.default)(e,c,o)}function eO(e=[],t=10){let[n,i]=(0,r.useState)(1),a=(0,r.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]),o=(0,r.useMemo)(()=>{let i=(n-1)*t,r=(n+0)*t;return e.slice(i,r)},[e,n,t]),s=(0,r.useCallback)(e=>{i(Math.max(1,Math.min(a,e)))},[i,a]),l=(0,r.useCallback)(()=>{n<a&&i(n+1)},[n,a,i]),c=(0,r.useCallback)(()=>{n>1&&i(n-1)},[n,i]);return(0,r.useMemo)(()=>({results:o,totalPages:a,currentPage:n,paginated:e.length>t,showNextButton:n<a,showPreviousButton:n>1,goTo:s,goToNext:l,goToPrevious:c}),[o,a,e.length,t,n,s,l,c])}function eF(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function eI(e){let[t,n]=(0,r.useState)(e??eF()),{data:i,error:a,isValidating:o}=(0,M.default)(t?["patient",t]:null,()=>(0,W.hG)(t,{}));return(0,r.useEffect)(()=>{let e=()=>{let e=eF();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,r.useMemo)(()=>({isLoading:o&&!a&&!i,patient:i,patientUuid:t,error:a}),[o,a,i,t])}function eN(){let e=`${S.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:i}=(0,M.default)(e,S.lo);return(0,r.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:i,error:n}),[t,n,i])}function ej(e){let{extensions:t,extensionSlotModuleName:n}=b(e);return e?t.map(t=>({state:i})=>r.createElement(a.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n}}},r.createElement(c,{state:i}))):[]}var eR=n(23464),eL=n(85602);let eV={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid},mutateVisit(e){for(let t of Object.values(e.mutateVisitCallbacks??{}))t();return{}}};function eH(e){let t=(0,r.useId)();return(0,r.useEffect)(()=>{let n=(0,W.BX)();return e&&n.setState({mutateVisitCallbacks:{...n.getState().mutateVisitCallbacks,[t]:e}}),()=>{if(e){let e={...n.getState().mutateVisitCallbacks};delete e[t],n.setState({mutateVisitCallbacks:e})}}},[t,e]),m((0,W.BX)(),eV)}function eG(e,t=W.Rb){let{patientUuid:n,manuallySetVisitUuid:i,setVisitContext:a}=eH(),o=e&&n==e?i:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${o}?v=${t}`,{data:c,error:u,mutate:p,isValidating:d}=(0,M.default)(e?`${S.Jj}/visit${s}`:null,S.lo),{data:f,error:m,mutate:h,isValidating:g}=(0,M.default)(e&&o?`${S.Jj}/visit${l}`:null,S.lo),y=(0,r.useMemo)(()=>c?.data.results.find(e=>null===e.stopDatetime)??null,[c]),b=(0,r.useMemo)(()=>o&&f?f.data:null,[f,o]),v=(0,r.useRef)(null);(0,r.useEffect)(()=>{!d&&y&&n===e&&null===i&&a(y),g||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&a(null),v.current=b)},[b,i,y,d,g,n]);let A=(0,r.useCallback)(()=>{p(),h()},[p,h]);return eH(A),{error:u||m,mutate:A,isValidating:d||g,activeVisit:y,currentVisit:b,currentVisitIsRetrospective:!!o,isLoading:!!((!c||o&&!f)&&(!u||!m))}}function eU(){let[e,t]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let e=(0,W.Pu)().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}function eq(){let e=(0,r.useRef)(),[t,n]=(0,r.useState)(null),a=null;if(!t){if(i){let e=(0,S.EW)().getState();e.loaded&&(a=e.session)}else i=new Promise(t=>{let n=({loaded:n,session:i})=>{n&&(t(i),a=i,e.current&&(e.current(),e.current=void 0))};n((0,S.EW)().getState()),a||(e.current=(0,S.EW)().subscribe(n))});if(a)n(a);else throw i}(0,r.useEffect)(()=>(e.current||(e.current=(0,S.EW)().subscribe(({loaded:e,session:t})=>{e&&(a=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||a;if(!o)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return o}eR.extend(eL)},467:function(e,t,n){"use strict";n.d(t,{i7:()=>c,jf:()=>l,CE:()=>s,Zd:()=>o});var i=n(90108),r=n(58644);let a={};function o(e,t){let n=a[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;{let n=(0,r.y)()(()=>t);return a[e]={value:n,active:!0},n}}function s(e,t){let n=a[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):(a[e]={value:t,active:!0},t)}function l(e,t){let n=a[e];if(!n){let n=(0,r.y)()(()=>t??{});return a[e]={value:n,active:!1},n}return n.value}function c(...e){let[t,n,r]=e,a=void 0===r?n:r,o=void 0===r?e=>e:n;return a(o(t.getState())),t.subscribe((e,t)=>{let n=o(e);(0,i.b)(t,n)||a(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=a)},1e3)},61836:function(e,t,n){"use strict";n.d(t,{V:()=>G,t:()=>H});let i={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"};var r=n(85761),a=n(93442);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),i.forEach(function(t){(0,a.A)(e,t,n[t])})}return e}var s=n(79736),l=n(36678);function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=n(98423);function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,d.A)(e,t)}var m={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},h=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.init(t,n)}return(0,l.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||m,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,o({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){(0,s.A)(this,e),this.observers={}}return(0,l.A)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function y(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function v(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(r())return{};var o=i(a.shift());!e[o]&&n&&(e[o]=new n),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{}}return r()?{}:{obj:e,k:i(a.shift())}}function A(e,t,n){var i=v(e,t,Object);i.obj[i.k]=n}function w(e,t){var n=v(e,t),i=n.obj,r=n.k;if(i)return i[r]}function $(e,t,n){var i=w(e,n);return void 0!==i?i:w(t,n)}function k(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function C(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return x[e]}):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,D=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,s.A)(this,t),n=u(this,p(t).call(this)),E&&g.call(c(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),(0,l.A)(t,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=[e,t];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(a=e.split(".")),w(this.data,a)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),A(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)("string"==typeof n[r]||"[object Array]"===Object.prototype.toString.apply(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=t,t=s[1]),this.addNamespaces(t);var l=w(this.data,s)||{};i?function e(t,n,i){for(var r in n)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof n[r]||n[r]instanceof String?i&&(t[r]=n[r]):e(t[r],n[r],i):t[r]=n[r]);return t}(l,n,r):l=o({},l,n),A(this.data,s,l),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?o({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),S={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,n,i,r))}),t}},B={},z=function(e){function t(e){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.A)(this,t),r=u(this,p(t).call(this)),E&&g.call(c(r)),n=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=c(r),n.forEach(function(t){e[t]&&(i[t]=e[t])}),r.options=a,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=h.create("translator"),r}return f(t,e),(0,l.A)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:r};var o=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,n,i){var a=this;if("object"!==(0,r.A)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,l=this.extractFromKey(e[e.length-1],n),c=l.key,u=l.namespaces,p=u[u.length-1],d=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase())return f?p+(n.nsSeparator||this.options.nsSeparator)+c:c;var m=this.resolve(e,n),h=m&&m.res,g=m&&m.usedKey||c,y=m&&m.exactUsedKey||c,b=Object.prototype.toString.apply(h),v=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(A&&h&&w&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof v||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var $="[object Array]"===b,k=$?[]:{},x=$?y:g;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var E="".concat(x).concat(s).concat(C);k[C]=this.translate(E,o({},n,{joinArrays:!1,ns:u})),k[C]===E&&(k[C]=h[C])}h=k}}else if(A&&"string"==typeof v&&"[object Array]"===b)(h=h.join(v))&&(h=this.extendTranslation(h,e,n,i));else{var D=!1,S=!1,B=void 0!==n.count&&"string"!=typeof n.count,z=t.hasDefaultValue(n),P=B?this.pluralResolver.getSuffix(d,n.count):"",T=n["defaultValue".concat(P)]||n.defaultValue;!this.isValidLookup(h)&&z&&(D=!0,h=T),this.isValidLookup(h)||(S=!0,h=c);var M=z&&T!==h&&this.options.updateMissing;if(S||D||M){if(this.logger.log(M?"updateKey":"missingKey",d,p,c,M?T:h),s){var O=this.resolve(c,o({},n,{keySeparator:!1}));O&&O.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var N=0;N<I.length;N++)F.push(I[N]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(n.lng||this.language):F.push(n.lng||this.language);var j=function(e,t,i){a.options.missingKeyHandler?a.options.missingKeyHandler(e,p,t,M?i:h,M,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,p,t,M?i:h,M,n),a.emit("missingKey",e,p,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&B?F.forEach(function(e){a.pluralResolver.getSuffixes(e).forEach(function(t){j([e],c+t,n["defaultValue".concat(t)]||T)})}):j(F,c,T))}h=this.extendTranslation(h,e,n,m,i),S&&h===c&&this.options.appendNamespaceToMissingKey&&(h="".concat(p,":").concat(c)),S&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(o({},n,{interpolation:o({},this.options.interpolation,n.interpolation)}));var s,l=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=o({},this.options.interpolation.defaultVariables,u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),l){var p=e.match(this.interpolator.nestingRegexp);s<(p&&p.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return r&&r[0]===i[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):a.translate.apply(a,i.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=S.handle(f,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!o.isValidLookup(t)){var l=o.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;o.options.fallbackNS&&(u=u.concat(o.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,f=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);u.forEach(function(e){o.isValidLookup(t)||(a=e,!B["".concat(f[0],"-").concat(e)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(a)&&(B["".concat(f[0],"-").concat(e)]=!0,o.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(function(n){if(!o.isValidLookup(t)){r=n;var a,l,u=c,f=[u];for(o.i18nFormat&&o.i18nFormat.addLookupKeys?o.i18nFormat.addLookupKeys(f,c,n,e,s):(p&&(a=o.pluralResolver.getSuffix(n,s.count)),p&&d&&f.push(u+a),d&&f.push(u+="".concat(o.options.contextSeparator).concat(s.context)),p&&f.push(u+=a));l=f.pop();)o.isValidLookup(t)||(i=l,t=o.getResource(n,e,l,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(g);function P(e){return e.charAt(0).toUpperCase()+e.slice(1)}var T=function(){function e(t){(0,s.A)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=h.create("languageUtils")}return(0,l.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var i=n.formatLanguageCode(e);(!n.options.supportedLngs||n.isSupportedCode(i))&&(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(i))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],a=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),i.forEach(function(e){0>r.indexOf(e)&&a(n.formatLanguageCode(e))}),r}}]),e}(),M=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],O={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},F=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.languageUtils=t,this.options=i,this.logger=h.create("pluralResolver"),this.rules=(n={},M.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:O[e.fc]}})}),n)}return(0,l.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map(function(e){return t+e})}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map(function(n){return t.getSuffix(e,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),a=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):o():"v2"===this.options.compatibilityJSON?o():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),I=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=h.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,l.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:C,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?k(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?k(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?k(t.nestingPrefix):t.nestingPrefixEscaped||k("$t("),this.nestingSuffix=t.nestingSuffix?k(t.nestingSuffix):t.nestingSuffixEscaped||k(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,a,o,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(s.formatSeparator)){var r=$(t,l,e);return s.alwaysFormat?s.format(r,void 0,n):r}var a=e.split(s.formatSeparator),o=a.shift().trim(),c=a.join(s.formatSeparator).trim();return s.format($(t,l,o),c,n,i)};this.resetRegExp();var p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(o=0;r=t.regex.exec(e);){if(void 0===(a=u(r[1].trim())))if("function"==typeof p){var n=p(e,r,i);a="string"==typeof n?n:""}else if(d){a=r[0];continue}else s.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=b(a));if(e=e.replace(r[0],t.safeValue(a)),t.regex.lastIndex=0,++o>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,i,r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o({},a);function l(e,t){var n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,s)).replace(/'/g,'"');try{s=JSON.parse(r),t&&(s=o({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(r)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],u=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var p=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=p.shift(),c=p,u=!0}if((i=t(l.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=b(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),u&&(i=c.reduce(function(e,t){return r.format(e,t,a.lng,a)},i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}(),N=function(e){function t(e,n,i){var r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,s.A)(this,t),r=u(this,p(t).call(this)),E&&g.call(c(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=a,r.logger=h.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,a.backend,a),r}return f(t,e),(0,l.A)(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,a=[],o=[],s=[],l=[];return e.forEach(function(e){var i=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[s]=2:r.state[s]<0||(1===r.state[s]?0>o.indexOf(s)&&o.push(s):(r.state[s]=1,i=!1,0>o.indexOf(s)&&o.push(s),0>a.indexOf(s)&&a.push(s),0>l.indexOf(t)&&l.push(t)))}),i||s.push(e)}),(a.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:i}),{toLoad:a,pending:o,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),n&&this.store.addResourceBundle(r,a,n),this.state[e]=t?-1:2;var o={};this.queue.forEach(function(n){i=n.loaded,(c=(l=v(i,[r],Object)).obj)[u=l.k]=c[u]||[],s||c[u].push(a);for(var i,s,l,c,u,p=n.pending,d=p.indexOf(e);-1!==d;)p.splice(d,1),d=p.indexOf(e);t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(e){o[e]||(o[e]=[]),n.loaded[e].length&&n.loaded[e].forEach(function(t){0>o[e].indexOf(t)&&o[e].push(t)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,l){s&&l&&r<5?setTimeout(function(){i.read.call(i,e,t,n,r+1,2*a,o)},a):o(s,l)}):o(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,function(i,o){i&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(r," failed"),i),!i&&o&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(r),o),t.loaded(e,i,o)})}},{key:"saveMissing",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==n||""===n||(this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,o({},a,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i))}}]),t}(g);function j(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&0>e.whitelist.indexOf("cimode")&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function R(){}var L=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if((0,s.A)(this,t),e=u(this,p(t).call(this)),E&&g.call(c(e)),e.options=j(n),e.services={},e.logger=h,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),u(e,c(e));setTimeout(function(){e.init(n,i)},0)}return e}return f(t,e),(0,l.A)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=o({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.A)(e[2])||"object"===(0,r.A)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,j(t)),this.format=this.options.interpolation.format,n||(n=R),!this.options.isClone){this.modules.logger?h.init(i(this.modules.logger),this.options):h.init(null,this.options);var a=new T(this.options);this.store=new D(this.options.resources,this.options);var s=this.services;s.logger=h,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new F(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new I(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new N(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new z(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var c=y(),u=function(){var t=function(t,i){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,i=n,r="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return i();var a=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)}),this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(a,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(e,t,n){var i=y();return e||(e=this.languages),t||(t=this.options.ns),n||(n=R),this.services.backendConnector.reload(e,t,function(e){i.resolve(),n(e)}),i}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&S.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=y();this.emit("languageChanging",e);var r=function(e,r){r?(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})},a=function(e){var t="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);t&&(n.language||(n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t)),n.translator.language||n.translator.changeLanguage(t),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(t)),n.loadResources(t,function(e){r(e,t)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var a;if("object"!==(0,r.A)(i)){for(var s=arguments.length,l=Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,i].concat(l))}else a=o({},i);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var o=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===i||2===i};if(n.precheck){var s=n.precheck(this,o);if(void 0!==s)return s}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||o(i,e)&&(!r||o(a,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=y();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>n.options.ns.indexOf(e)&&n.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=y();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter(function(e){return 0>i.indexOf(e)});return r.length?(this.options.preload=i.concat(r),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,r=o({},this.options,n,{isClone:!0}),a=new t(r);return["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new z(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a.emit.apply(a,[e].concat(n))}),a.init(r,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g));let V=L.default||L;function H(e,t,n,i){return V.t(t,{ns:e,defaultValue:n,...i})}function G(e,t,n){return i[e]?H("core",e,t??i[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}V.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},40785:function(e,t,n){"use strict";n.d(t,{K:()=>c});var i=n(18140),r=n(8902),a=n(23464),o=n(44397),s=n(10840),l=n(42729);function c(e,t=a()){let n;if(null==e)return null;let o=(0,l.J)(),u=a(t);if("string"==typeof e){let t=(0,r.CD)(e,o);if(t.invalid)return console.warn(`Could not interpret '${e}' as a date`),null;t.day&&!t.month&&(t=Object.assign({},(0,s.A)(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},(0,s.A)(t,"day"),{date:t.day})),n=a(u).set(t)}else n=a(e);let p=u.diff(n,"hours"),d=u.diff(n,"days"),f=u.diff(n,"weeks"),m=u.diff(n,"months"),h=u.diff(n,"years"),g={},y={style:"short",localeMatcher:"lookup"};if(p<2){let e=u.diff(n,"minutes");g.minutes=e,0===e&&(y.minutesDisplay="always")}else if(d<2)g.hours=p;else if(f<4)g.days=d;else if(h<1){let e=u.subtract(f,"weeks").diff(n,"days");g.weeks=f,g.days=e}else if(h<2){let e=u.subtract(m,"months").diff(n,"days");g.months=m,g.days=e}else if(h<18){let e=u.subtract(h,"year").diff(n,"months");g.years=h,g.months=e}else g.years=h;return new i.DurationFormat(o,y).format(g)}a.extend(o)},22613:function(e,t,n){"use strict";n.d(t,{Rt:()=>z,vU:()=>y,hl:()=>g,XE:()=>k,fU:()=>B,a3:()=>T,LW:()=>E,_U:()=>A,d4:()=>P,l0:()=>v,a7:()=>x,kQ:()=>b,Yq:()=>D});var i=n(31530),r=n(32878),a=n(18140),o=n(8902),s=n(23464),l=n(85602),c=n(44397),u=n(57657);let p=function(e){return null==e};var d=n(10840),f=n(42729);function m(e,t){var n=function(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t,0);return n.get?n.get.call(e):n.value}s.extend(l),s.extend(u),s.extend(c);let h="YYYY-MM-DDTHH:mm:ss.SSSZZ";function g(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&s(e,h).isValid()}function y(e){return s(e).isToday()}function b(e){return g(e)?s(e,h).toDate():null}function v(e,t=!1){let n=s(e);return t&&(n=n.utc()),n.format(h)}function A(e){return s(e).toDate()}var w=new WeakMap;let $=new class{register(e,t){m(this,w).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(m(this,w).has(t))return m(this,w).get(t)}if(e.language&&m(this,w).has(e.language))return m(this,w).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return m(this,w).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,w,{writable:!0,value:new Map})}};function k(e,t){$.register(e,t)}function x(e){let t=e??(0,f.J)();return $.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let C={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function E(e,t={}){let n=(0,f.J)(),i=(0,o.CD)(e,n);if(i.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!p(i.day)&&p(i.month)&&(i=Object.assign({},(0,d.A)(i,"day"),{month:i.day})),i.month&&(i.month-=1),i.day&&(i=Object.assign({},(0,d.A)(i,"day"),{date:i.day}));let r=s().set(i).toDate();return p(i.year)&&(t.year=!1),p(i.month)&&(t.month=!1),p(i.date)&&(t.day=!1),D(r,t)}function D(e,t){let n,i=t?.locale??(0,f.J)(),r=new Intl.Locale(i),{calendar:a,mode:o,time:l,day:c,month:u,year:p,noToday:d,numberingSystem:m}={...C,...{noToday:"am"===r.language},...t},h={calendar:a??x(r),year:p?"numeric":void 0,month:u?"short":void 0,day:c?"2-digit":void 0,numberingSystem:m},g=s(e).isToday();if(g&&!d)n=(n=new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(i)+n.slice(1);else{"en"===r.language&&(i="en-GB");let t=new Intl.DateTimeFormat(i,h).formatToParts(e);("en"===r.language||"am"===r.language)&&"standard"==o&&p&&c&&(t=t.map(S("-"))),"wide"==o&&(t=t.map(S(" — "))),"ethiopic"===h.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===l||g&&"for today"===l)&&(n+=`, ${B(e)}`),n}let S=e=>(t,n,i)=>"literal"!==t.type||" "!==t.value||n<i.length-1&&"era"===i[n+1].type?t:{type:"literal",value:e};function B(e){return e.toLocaleTimeString((0,f.J)(),{hour:"2-digit",minute:"2-digit"})}function z(e,t){return D(e,{...t,time:!0})}function P(e,t){let n=x("string"==typeof t?new Intl.Locale(t):t);return n?(0,i.yP)(e,(0,r.d)(n)):e}function T(e,t){return new a.DurationFormat((0,f.J)(),t).format(e)}},42729:function(e,t,n){"use strict";function i(){let e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e}n.d(t,{J:()=>i})},9826:function(e,t,n){"use strict";function i(e){return!window.offlineEnabled||(e??navigator.onLine)}n.d(t,{s:()=>i})},67943:function(e,t,n){"use strict";function i(e){return a(s(e,"usual","official"))}function r(e){return i(e)}function a(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function o(e){return a(e)}function s(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,i;return t=e,i=n,t.use?t.use===i:"usual"===i});if(t)return t}}n.d(t,{QC:()=>r,Qr:()=>a,VO:()=>s,Vp:()=>i,qK:()=>o})},90108:function(e,t,n){"use strict";function i(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||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)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);return n.length===i.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>i})},22695:function(e,t,n){"use strict";n.d(t,{f:()=>U,I:()=>C,j:()=>H,c:()=>V,B:()=>f,n:()=>j,g:()=>W,r:()=>E,u:()=>S,U:()=>l,d:()=>G,o:()=>N,z:()=>A,s:()=>F,a:()=>p,O:()=>c,e:()=>u,S:()=>q,i:()=>y,t:()=>D,b:()=>o,m:()=>d});var i=n(35400),r=n(67395),a=Object.prototype.hasOwnProperty;let o=new WeakMap,s=()=>{},l=s(),c=Object,u=e=>e===l,p=e=>"function"==typeof e,d=(e,t)=>({...e,...t}),f=e=>p(e.then),m={},h={},g="undefined",y=typeof window!=g,b=typeof document!=g,v=y&&"Deno"in window,A=(e,t)=>{let n=o.get(e);return[()=>!u(t)&&e.get(t)||m,i=>{if(!u(t)){let r=e.get(t);t in h||(h[t]=r),n[5](t,d(r,i),r||m)}},n[6],()=>!u(t)&&t in h?h[t]:!u(t)&&e.get(t)||m]},w=!0,[$,k]=y&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[s,s],x={initFocus:e=>(b&&document.addEventListener("visibilitychange",e),$("focus",e),()=>{b&&document.removeEventListener("visibilitychange",e),k("focus",e)}),initReconnect:e=>{let t=()=>{w=!0,e()},n=()=>{w=!1};return $("online",t),$("offline",n),()=>{k("online",t),k("offline",n)}}},C=!i.useId,E=!y||v,D=e=>y&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(e):setTimeout(e,1),S=E?i.useEffect:i.useLayoutEffect,B="undefined"!=typeof navigator&&navigator.connection,z=!E&&B&&(["slow-2g","2g"].includes(B.effectiveType)||B.saveData),P=new WeakMap,T=(e,t)=>e===`[object ${t}]`,M=0,O=e=>{let t,n,i=typeof e,r=c.prototype.toString.call(e),a=T(r,"Date"),o=T(r,"RegExp"),s=T(r,"Object");if(c(e)!==e||a||o)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=P.get(e))return t;if(t=++M+"~",P.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=O(e[n])+",";P.set(e,t)}if(s){t="#";let i=c.keys(e).sort();for(;!u(n=i.pop());)u(e[n])||(t+=n+":"+O(e[n])+",");P.set(e,t)}}return t},F=e=>{if(p(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?O(e):"",t]},I=0,N=()=>++I;async function j(...e){let[t,n,i,a]=e,s=d({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),c=s.populateCache,m=s.rollbackOnError,h=s.optimisticData,g=s.throwOnError;if(p(n)){let e=[];for(let i of t.keys())!/^\$(inf|sub)\$/.test(i)&&n(t.get(i)._k)&&e.push(i);return Promise.all(e.map(y))}return y(n);async function y(n){let a,[d]=F(n);if(!d)return;let[y,b]=A(t,d),[v,w,$,k]=o.get(t),x=()=>{let e=v[d];return(p(s.revalidate)?s.revalidate(y().data,n):!1!==s.revalidate)&&(delete $[d],delete k[d],e&&e[0])?e[0](r.q2).then(()=>y().data):y().data};if(e.length<3)return x();let C=i,E=!1,D=N();w[d]=[D,0];let S=!u(h),B=y(),z=B.data,P=B._c,T=u(P)?z:P;if(S&&b({data:h=p(h)?h(T,z):h,_c:T}),p(C))try{C=C(T)}catch(e){a=e,E=!0}if(C&&f(C)){let e;if(C=await C.catch(e=>{a=e,E=!0}),D!==w[d][0]){if(E)throw a;return C}E&&S&&(e=a,"function"==typeof m?m(e):!1!==m)&&(c=!0,b({data:T,_c:l}))}if(c&&!E&&(p(c)?b({data:c(C,T),error:l,_c:l}):b({data:C,error:l,_c:l})),w[d][1]=N(),Promise.resolve(x()).then(()=>{b({_c:l})}),E){if(g)throw a;return}return C}}let R=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},L=(e,t)=>{if(!o.has(e)){let n=d(x,t),i=Object.create(null),a=j.bind(l,e),c=s,u=Object.create(null),p=(e,t)=>{let n=u[e]||[];return u[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,i)=>{e.set(t,n);let r=u[t];if(r)for(let e of r)e(n,i)},m=()=>{if(!o.has(e)&&(o.set(e,[i,Object.create(null),Object.create(null),Object.create(null),a,f,p]),!E)){let t=n.initFocus(setTimeout.bind(l,R.bind(l,i,r.CC))),a=n.initReconnect(setTimeout.bind(l,R.bind(l,i,r.jB)));c=()=>{t&&t(),a&&a(),o.delete(e)}}};return m(),[e,a,m,c]}return[e,o.get(e)[4]]},[V,H]=L(new Map),G=d({onLoadingSlow:s,onSuccess:s,onError:s,onErrorRetry:(e,t,n,i,r)=>{let a=n.errorRetryCount,o=r.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;(u(a)||!(o>a))&&setTimeout(i,s,r)},onDiscarded:s,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:z?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:z?5e3:3e3,compare:function e(t,n){var i,r;if(t===n)return!0;if(t&&n&&(i=t.constructor)===n.constructor){if(i===Date)return t.getTime()===n.getTime();if(i===RegExp)return t.toString()===n.toString();if(i===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return -1===r}if(!i||"object"==typeof t){for(i in r=0,t)if(a.call(t,i)&&++r&&!a.call(n,i)||!(i in n)||!e(t[i],n[i]))return!1;return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:V,mutate:H,fallback:{}},{isOnline:()=>w,isVisible:()=>{let e=b&&document.visibilityState;return u(e)||"hidden"!==e}}),U=(e,t)=>{let n=d(e,t);if(t){let{use:i,fallback:r}=e,{use:a,fallback:o}=t;i&&a&&(n.use=i.concat(a)),r&&o&&(n.fallback=d(r,o))}return n},q=(0,i.createContext)({}),W=e=>{let{value:t}=e,n=(0,i.useContext)(q),r=p(t),a=(0,i.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,i.useMemo)(()=>r?a:U(n,a),[r,n,a]),s=a&&a.provider,c=(0,i.useRef)(l);s&&!c.current&&(c.current=L(s(o.cache||V),a));let u=c.current;return u&&(o.cache=u[0],o.mutate=u[1]),S(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,i.createElement)(q.Provider,d(e,{value:o}))}},12215:function(e,t,n){"use strict";n.d(t,{q:()=>i});let i="$inf$"},67395:function(e,t,n){"use strict";n.d(t,{CC:()=>i,I0:()=>o,jB:()=>r,q2:()=>a});let i=0,r=1,a=2,o=3},64764:function(e,t,n){"use strict";n.d(t,{Ht:()=>m,aw:()=>f,iX:()=>c,qm:()=>d,uv:()=>u});var i=n(22695),r=n(12215),a=n(35400);let o=i.i&&window.__SWR_DEVTOOLS_USE__,s=o?window.__SWR_DEVTOOLS_USE__:[],l=e=>(0,i.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],c=()=>{let e=(0,a.useContext)(i.S);return(0,a.useMemo)(()=>(0,i.m)(i.d,e),[e])},u=(e,t)=>{let[n,r]=(0,i.s)(e),[,,,a]=i.b.get(i.c);if(a[n])return a[n];let o=t(r);return a[n]=o,o},p=s.concat(e=>(t,n,a)=>{let o=n&&((...e)=>{let[a]=(0,i.s)(t),[,,,o]=i.b.get(i.c);if(a.startsWith(r.q))return n(...e);let s=o[a];return(0,i.e)(s)?n(...e):(delete o[a],s)});return e(t,o,a)}),d=e=>function(...t){let n=c(),[r,a,o]=l(t),s=(0,i.f)(n,o),u=e,{use:d}=s,f=(d||[]).concat(p);for(let e=f.length;e--;)u=f[e](u);return u(r,a||s.fetcher||null,s)},f=(e,t,n)=>{let i=t[e]||(t[e]=[]);return i.push(n),()=>{let e=i.indexOf(n);e>=0&&(i[e]=i[i.length-1],i.pop())}},m=(e,t)=>(...n)=>{let[i,r,a]=l(n),o=(a.use||[]).concat(t);return e(i,r,{...a,use:o})};o&&(window.__SWR_DEVTOOLS_REACT__=a)},44924:function(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(13624);let r=(0,n(64764).Ht)(i.default,e=>(t,n,i)=>(i.revalidateOnFocus=!1,i.revalidateIfStale=!1,i.revalidateOnReconnect=!1,e(t,n,i)))},13624:function(e,t,n){"use strict";n.r(t),n.d(t,{SWRConfig:()=>A,default:()=>w,mutate:()=>a.j,preload:()=>s.uv,unstable_serialize:()=>g,useSWRConfig:()=>s.iX});var i=n(35400),r=n(58139),a=n(22695),o=n(67395),s=n(64764);let l=()=>{},c=l(),u=Object,p=e=>e===c,d=new WeakMap,f=(e,t)=>e===`[object ${t}]`,m=0,h=e=>{let t,n,i=typeof e,r=u.prototype.toString.call(e),a=f(r,"Date"),o=f(r,"RegExp"),s=f(r,"Object");if(u(e)!==e||a||o)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=d.get(e))return t;if(t=++m+"~",d.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=h(e[n])+",";d.set(e,t)}if(s){t="#";let i=u.keys(e).sort();for(;!p(n=i.pop());)p(e[n])||(t+=n+":"+h(e[n])+",");d.set(e,t)}}return t},g=e=>(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?h(e):"",t]})(e)[0],y=i.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),b={dedupe:!0},v=Promise.resolve(a.U),A=a.O.defineProperty(a.g,"defaultValue",{value:a.d}),w=(0,s.qm)((e,t,n)=>{let{cache:l,compare:c,suspense:u,fallbackData:p,revalidateOnMount:d,revalidateIfStale:f,refreshInterval:m,refreshWhenHidden:h,refreshWhenOffline:g,keepPreviousData:A}=n,[w,$,k,x]=a.b.get(l),[C,E]=(0,a.s)(e),D=(0,i.useRef)(!1),S=(0,i.useRef)(!1),B=(0,i.useRef)(C),z=(0,i.useRef)(t),P=(0,i.useRef)(n),T=()=>P.current.isVisible()&&P.current.isOnline(),[M,O,F,I]=(0,a.z)(l,C),N=(0,i.useRef)({}).current,j=(0,a.e)(p)?(0,a.e)(n.fallback)?a.U:n.fallback[C]:p,R=(e,t)=>{for(let n in N)if("data"===n){if(!c(e[n],t[n])&&(!(0,a.e)(e[n])||!c(Y,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},L=(0,i.useMemo)(()=>{let e=!!C&&!!t&&((0,a.e)(d)?!P.current.isPaused()&&!u&&!1!==f:d),n=t=>{let n=(0,a.m)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},i=M(),r=I(),o=n(i),s=i===r?o:n(r),l=o;return[()=>{let e=n(M());return R(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,C]),V=(0,r.useSyncExternalStore)((0,i.useCallback)(e=>F(C,(t,n)=>{R(n,t)||e()}),[l,C]),L[0],L[1]),H=!D.current,G=w[C]&&w[C].length>0,U=V.data,q=(0,a.e)(U)?j&&(0,a.B)(j)?y(j):j:U,W=V.error,K=(0,i.useRef)(q),Y=A?(0,a.e)(U)?(0,a.e)(K.current)?q:K.current:U:q,J=(!G||!!(0,a.e)(W))&&(H&&!(0,a.e)(d)?d:!P.current.isPaused()&&(u?!(0,a.e)(q)&&f:(0,a.e)(q)||f)),Z=!!(C&&t&&H&&J),X=(0,a.e)(V.isValidating)?Z:V.isValidating,Q=(0,a.e)(V.isLoading)?Z:V.isLoading,ee=(0,i.useCallback)(async e=>{let t,i,r=z.current;if(!C||!r||S.current||P.current.isPaused())return!1;let s=!0,l=e||{},u=!k[C]||!l.dedupe,p=()=>a.I?!S.current&&C===B.current&&D.current:C===B.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},m=()=>{let e=k[C];e&&e[1]===i&&delete k[C]},h={isValidating:!0};(0,a.e)(M().data)&&(h.isLoading=!0);try{if(u&&(O(h),n.loadingTimeout&&(0,a.e)(M().data)&&setTimeout(()=>{s&&p()&&P.current.onLoadingSlow(C,n)},n.loadingTimeout),k[C]=[r(E),(0,a.o)()]),[t,i]=k[C],t=await t,u&&setTimeout(m,n.dedupingInterval),!k[C]||k[C][1]!==i)return u&&p()&&P.current.onDiscarded(C),!1;d.error=a.U;let e=$[C];if(!(0,a.e)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),u&&p()&&P.current.onDiscarded(C),!1;let o=M().data;d.data=c(o,t)?o:t,u&&p()&&P.current.onSuccess(t,C,n)}catch(n){m();let e=P.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,u&&p()&&(e.onError(n,C,e),(!0===t||(0,a.a)(t)&&t(n))&&(!P.current.revalidateOnFocus||!P.current.revalidateOnReconnect||T())&&e.onErrorRetry(n,C,e,e=>{let t=w[C];t&&t[0]&&t[0](o.I0,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,l]),et=(0,i.useCallback)((...e)=>(0,a.n)(l,B.current,...e),[]);if((0,a.u)(()=>{z.current=t,P.current=n,(0,a.e)(U)||(K.current=U)}),(0,a.u)(()=>{if(!C)return;let e=ee.bind(a.U,b),t=0;P.current.revalidateOnFocus&&(t=Date.now()+P.current.focusThrottleInterval);let n=(0,s.aw)(C,w,(n,i={})=>{if(n==o.CC){let n=Date.now();P.current.revalidateOnFocus&&n>t&&T()&&(t=n+P.current.focusThrottleInterval,e())}else if(n==o.jB)P.current.revalidateOnReconnect&&T()&&e();else if(n==o.q2)return ee();else if(n==o.I0)return ee(i)});return S.current=!1,B.current=C,D.current=!0,O({_k:E}),J&&!k[C]&&((0,a.e)(q)||a.r?e():(0,a.t)(e)),()=>{S.current=!0,n()}},[C]),(0,a.u)(()=>{let e;function t(){let t=(0,a.a)(m)?m(M().data):m;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!M().error&&(h||P.current.isVisible())&&(g||P.current.isOnline())?ee(b).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[m,h,g,C]),(0,i.useDebugValue)(Y),u){let e=C&&(0,a.e)(q);if(!a.I&&a.r&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(z.current=t,P.current=n,S.current=!1);let i=x[C];if(y(!(0,a.e)(i)&&e?et(i):v),!(0,a.e)(W)&&e)throw W;let r=e?ee(b):v;!(0,a.e)(Y)&&e&&(r.status="fulfilled",r.value=!0),y(r)}return{mutate:et,get data(){return N.data=!0,Y},get error(){return N.error=!0,W},get isValidating(){return N.isValidating=!0,X},get isLoading(){return N.isLoading=!0,Q}}})},82910:function(e,t,n){"use strict";n.d(t,{Ay:()=>b});var i=n(35400),r=n(13624),a=n(22695),o=n(12215),s=n(64764),l=n(58139);let c=()=>{},u=c(),p=Object,d=e=>e===u,f=new WeakMap,m=(e,t)=>e===`[object ${t}]`,h=0,g=e=>{let t,n,i=typeof e,r=p.prototype.toString.call(e),a=m(r,"Date"),o=m(r,"RegExp"),s=m(r,"Object");if(p(e)!==e||a||o)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=f.get(e))return t;if(t=++h+"~",f.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=g(e[n])+",";f.set(e,t)}if(s){t="#";let i=p.keys(e).sort();for(;!d(n=i.pop());)d(e[n])||(t+=n+":"+g(e[n])+",");f.set(e,t)}}return t},y=Promise.resolve(),b=(0,s.Ht)(r.default,e=>(t,n,r)=>{let s,c=(0,i.useRef)(!1),{cache:u,initialSize:p=1,revalidateAll:d=!1,persistSize:f=!1,revalidateFirstPage:m=!0,revalidateOnMount:h=!1,parallel:b=!1}=r,[,,,v]=a.b.get(a.c);try{(s=(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t]})(t?t(0,null):null)[0])&&(s=o.q+s)}catch(e){}let[A,w,$]=(0,a.z)(u,s),k=(0,i.useCallback)(()=>(0,a.e)(A()._l)?p:A()._l,[u,s,p]);(0,l.useSyncExternalStore)((0,i.useCallback)(e=>s?$(s,()=>{e()}):()=>{},[u,s]),k,k);let x=(0,i.useCallback)(()=>{let e=A()._l;return(0,a.e)(e)?p:e},[s,p]),C=(0,i.useRef)(x());(0,a.u)(()=>{if(!c.current){c.current=!0;return}s&&w({_l:f?C.current:x()})},[s,u]);let E=h&&!c.current,D=e(s,async e=>{let i=A()._i,o=A()._r;w({_r:a.U});let s=[],l=x(),[c]=(0,a.z)(u,e),p=c().data,f=[],h=null;for(let e=0;e<l;++e){let[l,c]=(0,a.s)(t(e,b?null:h));if(!l)break;let[g,y]=(0,a.z)(u,l),A=g().data,w=d||i||(0,a.e)(A)||m&&!e&&!(0,a.e)(p)||E||p&&!(0,a.e)(p[e])&&!r.compare(p[e],A);if(n&&("function"==typeof o?o(A,c):w)){let t=async()=>{if(l in v){let e=v[l];delete v[l],A=await e}else A=await n(c);y({data:A,_k:c}),s[e]=A};b?f.push(t):await t()}else s[e]=A;b||(h=A)}return b&&await Promise.all(f.map(e=>e())),w({_i:a.U}),s},r),S=(0,i.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},i=!1!==n.revalidate;return s?(i&&((0,a.e)(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?D.mutate(e,{...n,revalidate:i}):D.mutate()):y},[s,u]),B=(0,i.useCallback)(e=>{let n;if(!s)return y;let[,i]=(0,a.z)(u,s);if((0,a.a)(e)?n=e(x()):"number"==typeof e&&(n=e),"number"!=typeof n)return y;i({_l:n}),C.current=n;let r=[],[o]=(0,a.z)(u,s),l=null;for(let e=0;e<n;++e){let[n]=(0,a.s)(t(e,l)),[i]=(0,a.z)(u,n),s=n?i().data:a.U;if((0,a.e)(s))return S(o().data);r.push(s),l=s}return S(r)},[s,u,S,x]);return{size:x(),setSize:B,mutate:S,get data(){return D.data},get error(){return D.error},get isValidating(){return D.isValidating},get isLoading(){return D.isLoading}}})},58644:function(e,t,n){"use strict";n.d(t,{y:()=>r});let i=e=>{let t,n=new Set,i=(e,i)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=i?i:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,a={setState:i,getState:r,getInitialState:()=>o,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()}},o=t=e(i,r,a);return a},r=e=>e?i(e):i}}]);
|