@openmrs/esm-cohort-builder-app 4.0.7-pre.1539 → 4.0.7-pre.1543

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/dist/199.js CHANGED
@@ -25,4 +25,4 @@ To fix this, ensure that you define the "description" field inside the feature f
25
25
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
26
26
  To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function fi(){fo.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of fo){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",a=document.getElementById(o),i=`single-spa-application:${n}`;if(a){let e=document.createElement("div");e.id=i,a?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
27
27
  To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?aR(e,()=>fe(t.appName,t.component),function(e,{featureFlag:t}){return t?r=>!!ur(t)&&e(r):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?aI(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
28
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let fs={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function fl(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fs.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fs.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fs.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fs.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fs.SMALL_DESKTOP_MAX)}let fu=!1;function fc(){fu||(window.addEventListener("resize",fl),fl(),fu=!0)}var fd=r(4848),ff=r(6942),fp=r.n(ff);function fm({title:e,children:t}){let r="tablet"===dI();return(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,fd.jsx)("h4",{children:e}),t]})}let fh=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fg={primaryColor:{_type:no.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[od.oneOf(fh)]},secondaryColor:{_type:no.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[od.oneOf(fh)]}},fy={"Brand color #1":{_default:"#005d5d",_type:no.String},"Brand color #2":{_default:"#004144",_type:no.String},"Brand color #3":{_default:"#007d79",_type:no.String},excludePatientIdentifierCodeTypes:{uuids:{_type:no.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:no.UUID}}},implementationName:{_type:no.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:no.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[od.isUrl]},alt:{_type:no.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:no.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:no.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[od.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:no.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:no.String}},diagnosisTags:fg};var fv=r(9536);let fb={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fw=e=>(0,fd.jsx)(fv.TableBatchActions,{translateWithId:(e,t)=>{let r=fb[e];return r?iz(r,e,t):e},...e}),fE="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",fx="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",fD="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",f_="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fS=(0,cl.createContext)(null);function fC(){let e=(0,cl.useContext)(fS);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fk({menuTitle:e,children:t}){let[r,n]=cu().useState(!1),o=dV(()=>n(!1),r),a="tablet"===dI(),i=(0,cl.useCallback)(()=>n(e=>!e),[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(null),u=(0,cl.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cl.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cl.useMemo)(()=>({closeMenu:f}),[f]),m=(0,cl.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),h=cl.Children.toArray(t);(0,cl.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cl.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cl.isValidElement)(e)?(0,cl.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:g,index:t}):e);return(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:o,children:[(0,fd.jsx)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},f_),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,fd.jsx)(fS.Provider,{value:p,children:y})}),(0,fd.jsx)("span",{})]})]})}function fP(e){let t=(0,cl.useContext)(fS);return(0,fd.jsx)(fv.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var fO=r(8168);(en=ea||(ea={})).Pop="POP",en.Push="PUSH",en.Replace="REPLACE";var fR=function(e){return e},fT="beforeunload";function fN(e){e.preventDefault(),e.returnValue=""}function fj(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function fA(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let f$=(0,cl.createContext)(null),fI=(0,cl.createContext)(null);function fM(e,t){if(!e)throw Error(t)}function fL(){return null!=(0,cl.useContext)(fI)}function fF(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ea.Pop,navigator:a,static:i=!1}=e;fL()&&fM(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cl.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=fA(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=(0,cl.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:f,key:p}},[s,u,c,d,f,p]);return null==m?null:(0,cl.createElement)(f$.Provider,{value:l},(0,cl.createElement)(fI.Provider,{children:r,value:{location:m,navigationType:o}}))}function fB(e){let{basename:t,children:r,window:n}=e,o=(0,cl.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,fR({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=ea.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=ea.Pop,s=o(),l=s[0],u=s[1],c=fj(),d=fj();function f(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function p(e,t){return void 0===t&&(t=null),fR((0,fO.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?fA(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,fO.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:f,push:function e(t,o){var a=ea.Push,i=p(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=ea.Replace,a=p(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(fT,fN),function(){t(),d.length||r.removeEventListener(fT,fN)}}}}({window:n}));let a=o.current,[i,s]=(0,cl.useState)({action:a.action,location:a.location});return(0,cl.useLayoutEffect)(()=>a.listen(s),[a]),(0,cl.createElement)(fF,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let fU=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],fV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),fK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),fG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),fZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),fY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),fq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),fJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),fX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),fQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),f2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),f4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),f3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),f6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),f5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),f9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),f8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),f7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pe=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document",iconProps:e})})),po=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pa=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-download",iconProps:e})})),pi=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),ps=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),pl=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pu=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pc=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pd=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),pf=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pp=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),pm=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),ph=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group",iconProps:e})})),pg=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),py=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pv=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pb=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pw=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),pE=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),px=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),pD=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),p_=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pS=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pC=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pk=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pP=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),pO=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pR=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pT=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pN=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pj=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),pA=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),p$=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pI=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pM=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pL=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pF=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pB=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-report",iconProps:e})})),pK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),pG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-save",iconProps:e})})),pZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-search",iconProps:e})})),pY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),pq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),pJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),pX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),pQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),p2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table",iconProps:e})})),p4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-time",iconProps:e})})),p3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),p6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),p5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),p9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),p8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),p7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),me=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mo=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view",iconProps:e})})),ma=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mi=ma,ms=po,ml=p_,mu=pv,mc=pX,md=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cl.useRef)(e?document.getElementById(e):void 0);return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(mf,{ref:n,icon:e,iconProps:r})})})),mf=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cl.useRef)(null);return(0,cl.useImperativeHandle)(r,()=>i.current),(0,cl.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fd.jsx)("svg",{ref:i,className:fp()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,fd.jsx)("use",{href:`#${e}`})})})),mp=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cU.useTranslation)(),a=(fL()||fM(!1),(0,cl.useContext)(fI).location),i=(0,cl.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{className:fp()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,fd.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,fd.jsx)(md,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,fd.jsx)("span",{children:o(t)})]})})},e)};function mm(e){return function({basePath:t}){return(0,fd.jsx)(fB,{children:(0,fd.jsx)(mp,{basePath:t,...e})})}}function mh(e){let t=(0,cl.useRef)(null);return(0,cl.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mg(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let my="u">typeof document?cu().useLayoutEffect:()=>{};function mv(e){let t=(0,cl.useRef)(null);return my(()=>{t.current=e},[e]),(0,cl.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mb={prefix:String(Math.round(1e10*Math.random())),current:0},mw=cu().createContext(mb),mE=cu().createContext(!1),mx=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mD="function"==typeof cu().useId?function(e){let t=cu().useId(),[r]=(0,cl.useState)(mk()),n=r?"react-aria":`react-aria${mb.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cl.useContext)(mw),r=function(e=!1){let t=(0,cl.useContext)(mw),r=(0,cl.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cu().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mx.get(e);null==r?mx.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mx.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function m_(){return!1}function mS(){return!0}function mC(e){return()=>{}}function mk(){return"function"==typeof cu().useSyncExternalStore?cu().useSyncExternalStore(mC,m_,mS):(0,cl.useContext)(mE)}let mP=!!("u">typeof window&&window.document&&window.document.createElement),mO=new Map;function mR(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mD(t),a=(0,cl.useRef)(null);if(s&&s.register(a,o),mP){let e=mO.get(o);e&&!e.includes(n)?e.push(n):mO.set(o,[n])}return my(()=>()=>{s&&s.unregister(a),mO.delete(o)},[o]),(0,cl.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mT(e=[]){let t=mR(),[r,n]=function(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mv(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});my(()=>{n.current&&o()});let a=mv(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cl.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return my(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mO.delete(e)}));let mN=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mj(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mg(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mN(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mO.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mO.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mA=Symbol("default");function m$({values:e,children:t}){for(let[r,n]of e)t=cu().createElement(r.Provider,{value:n},t);return t}function mI(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mM(e,t){let r=(0,cl.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mA;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mL(e,t,r){let{ref:n,...o}=mM(r,e.slot)||{},a=mh((0,cl.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mj(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mF(e=!0){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(!1),o=(0,cl.useCallback)(e=>{n.current=!0,r(!!e)},[]);return my(()=>{n.current||r(!1)},[]),[o,t]}function mB(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mU=(0,cl.createContext)(null),mV=null;function mW(e,t="assertive",r=7e3){mV?mV.announce(e,t,r):(mV=new mH,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mV.announce(e,t,r):setTimeout(()=>{(null==mV?void 0:mV.isAttached())&&(null==mV||mV.announce(e,t,r))},100))}class mH{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{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"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mz=new Set(["id"]),mK=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mG=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mZ=/^(data-.*)$/;function mY(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mz.has(t)||r&&mK.has(t)||n&&mG.has(t)||(null==o?void 0:o.has(t))||mZ.test(t))&&(a[t]=e[t]);return a}let mq=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],mJ=mq.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mq.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mX=mq.join(':not([hidden]):not([tabindex="-1"]),');function mQ(e){return e.matches(mJ)}function m0(e){return e.matches(mX)}let m1=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m2=e=>e&&"window"in e&&e.window===e?e:m1(e).defaultView||window;function m4(e){if(function(){if(null==m3){m3=!1;try{document.createElement("div").focus({get preventScroll(){return m3=!0,!0}})}catch{}}return m3}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m3=null;function m6(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m5(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m9(e){let t=(0,cl.useRef)({isFocused:!1,observer:null});my(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mv(t=>{null==e||e(t)});return(0,cl.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m6(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let m8=!1;function m7(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function he(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ht(e){let t=null;return()=>(null==t&&(t=e()),t)}let hr=ht(function(){return he(/^Mac/i)}),hn=ht(function(){return he(/^iPhone/i)}),ho=ht(function(){return he(/^iPad/i)||hr()&&navigator.maxTouchPoints>1}),ha=ht(function(){return hn()||ho()});ht(function(){return hr()||ha()});let hi=ht(function(){return m7(/AppleWebKit/i)&&!hs()}),hs=ht(function(){return m7(/Chrome/i)}),hl=ht(function(){return m7(/Android/i)}),hu=ht(function(){return m7(/Firefox/i)}),hc=new Map,hd=new Set;function hf(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hc.delete(r.target)),0===hc.size)){for(let e of hd)e();hd.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);n||(n=new Set,hc.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hp(e){requestAnimationFrame(()=>{0===hc.size?e():hd.add(e)})}"u">typeof document&&("loading"!==document.readyState?hf():document.addEventListener("DOMContentLoaded",hf));let hm="default",hh="",hg=new WeakMap;function hy(e){if(ha())"disabled"===hm&&(hm="restoring",setTimeout(()=>{hp(()=>{if("restoring"===hm){let t=m1(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hh||""),hh="",hm="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hg.has(e)){let t=hg.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hg.delete(e)}}let hv=cu().createContext({register:()=>{}});function hb(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hw(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hE(e,t,r){var n=hb(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hx(e,t){my(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hD(){let e=(0,cl.useRef)(new Map),t=(0,cl.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cl.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cl.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cl.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hv.displayName="PressResponderContext";function h_(e,t){return!!t&&!!e&&e.contains(t)}function hS(e){return e.target}function hC(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hu()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hr()?a=!0:i=!0);let u=hi()&&hr()&&!ho()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hC.isOpening=r,m4(e),e.dispatchEvent(u),hC.isOpening=!1}function hk(e){return 0===e.mozInputSource&&!!e.isTrusted||(hl()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hC.isOpening=!1;var hP=r(1779),hO=r.n(hP),hR=new WeakMap;class hT{continuePropagation(){hE(this,hR,!1)}get shouldStopPropagation(){var e;return e=hb(this,hR,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hw(this,hR,{writable:!0,value:void 0}),hE(this,hR,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hN=Symbol("linkClicked");function hj(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cl.useContext)(hv);if(t){let{register:r,...n}=t;e=mj(n,e),r()}return hx(t,e.ref),e}(e),[m,h]=(0,cl.useState)(!1),g=(0,cl.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hD(),b=mv((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hT("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mv((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new hT("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hT("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mv((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hT("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mv(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hI(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hy(t.target),t.disposables))r();t.disposables=[]}}),D=mv(e=>{c&&x(e)}),_=mv(e=>{null==i||i(e)}),S=mv((e,t)=>{if(i){let r=new MouseEvent("click",e);m5(r,t),i(m6(r))}}),C=(0,cl.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(h$(t.nativeEvent,t.currentTarget)&&h_(t.currentTarget,hS(t.nativeEvent))){var n;hM(hS(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m1(t.currentTarget),"keyup",mg(t=>{h$(t,n)&&!t.repeat&&h_(n,hS(t))&&e.target&&E(hI(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hr()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||h_(t.currentTarget,hS(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hC.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hk(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(hI(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&h$(t,e.target)){hM(hS(t),t.key)&&t.preventDefault();let r=hS(t),o=h_(e.target,hS(t));w(hI(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hA(e.target)&&h_(e.target,r)&&!t[hN]&&(t[hN]=!0,hC(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!h_(t.currentTarget,hS(t.nativeEvent)))return;if(o=t.nativeEvent,!hl()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(ha()){if("default"===hm){let t=m1(e);hh=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hm="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hg.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hS(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m1(t.currentTarget),"pointerup",r,!1),y(m1(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(h_(t.currentTarget,hS(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!mQ(e);)e=e.parentElement;let t=m2(e),r=t.document.activeElement;if(!r||r===e)return;m8=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m4(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m4(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m8=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{h_(t.currentTarget,hS(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hI(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hI(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(h_(e.target,hS(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m4(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{h_(e.currentTarget,hS(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cl.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof m2(e).Element&&"auto"===m2(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,cl.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hy(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mj(p,C)}}function hA(e){return"A"===e.tagName&&e.hasAttribute("href")}function h$(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m2(t).HTMLInputElement&&!hF(t,r)||t instanceof m2(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hA(t))&&"Enter"!==r)}function hI(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hM(e,t){return e instanceof HTMLInputElement?!hF(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hA(e))}let hL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hF(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hL.has(e.type)}let hB=null,hU=new Set,hV=new Map,hW=!1,hH=!1,hz={Tab:!0,Escape:!0};function hK(e,t){for(let r of hU)r(e,t)}function hG(e){hW=!0,e.metaKey||!hr()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hB="keyboard",hK("keyboard",e))}function hZ(e){hB="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hW=!0,hK("pointer",e))}function hY(e){hk(e)&&(hW=!0,hB="virtual")}function hq(e){e.target!==window&&e.target!==document&&!m8&&e.isTrusted&&(hW||hH||(hB="virtual",hK("virtual",e)),hW=!1,hH=!1)}function hJ(){m8||(hW=!1,hH=!0)}function hX(e){if("u"<typeof window||hV.get(m2(e)))return;let t=m2(e),r=m1(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hW=!0,n.apply(this,arguments)},r.addEventListener("keydown",hG,!0),r.addEventListener("keyup",hG,!0),r.addEventListener("click",hY,!0),t.addEventListener("focus",hq,!0),t.addEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hZ,!0),r.addEventListener("pointermove",hZ,!0),r.addEventListener("pointerup",hZ,!0)),t.addEventListener("beforeunload",()=>{hQ(e)},{once:!0}),hV.set(t,{focus:n})}let hQ=(e,t)=>{let r=m2(e),n=m1(e);t&&n.removeEventListener("DOMContentLoaded",t),hV.has(r)&&(r.HTMLElement.prototype.focus=hV.get(r).focus,n.removeEventListener("keydown",hG,!0),n.removeEventListener("keyup",hG,!0),n.removeEventListener("click",hY,!0),r.removeEventListener("focus",hq,!0),r.removeEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hZ,!0),n.removeEventListener("pointermove",hZ,!0),n.removeEventListener("pointerup",hZ,!0)),hV.delete(r))};function h0(){return"pointer"!==hB}"u">typeof document&&("loading"!==(f=m1(void 0)).readyState?hX(void 0):f.addEventListener("DOMContentLoaded",()=>{hX(void 0)}));let h1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h2(e){let t=m1(e),r=((e=document)=>e.activeElement)(t);"virtual"===hB?hp(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m4(e)}):m4(e)}function h4(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cl.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=m9(a),s=(0,cl.useCallback)(e=>{let t=m1(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hS(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h3(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h6=cu().createContext(null),h5=cu().forwardRef(function(e,t){let{children:r,...n}=e,o=mh(t),a={...n,ref:o};return cu().createElement(h6.Provider,{value:a},r)});function h9(e,t){let{focusProps:r}=h4(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h3(e.onKeyDown),onKeyUp:h3(e.onKeyUp)}},o=mj(r,n),a=function(e){let t=(0,cl.useContext)(h6)||{};hx(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cl.useRef)(e.autoFocus);(0,cl.useEffect)(()=>{s.current&&t.current&&h2(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mj({...o,tabIndex:l},i)}}function h8(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cl.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hD(),l=(0,cl.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=m9(l),c=(0,cl.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m1(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hS(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!h_(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});m5(n,r),l(m6(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function h7(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cl.useRef)({isFocused:!1,isFocusVisible:r||h0()}),[i,s]=(0,cl.useState)(!1),[l,u]=(0,cl.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cl.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cl.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},hX(),(0,cl.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m1(null==r?void 0:r.target),i="u">typeof window?m2(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m2(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m2(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m2(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h1.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hz[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h0())};return hU.add(e),()=>{hU.delete(e)}},[]);let{focusProps:f}=h4({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=h8({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?p:f}}let ge=!1,gt=0;function gr(e){"touch"===e.pointerType&&(ge=!0,setTimeout(()=>{ge=!1},50))}function gn(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",gr),gt++,()=>{!(--gt>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",gr)}}function go(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cl.useState)(!1),s=(0,cl.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cl.useEffect)(gn,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hD(),{hoverProps:c,triggerHoverEnd:d}=(0,cl.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{ge&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m1(n.target),"pointerover",t=>{s.isHovered&&s.target&&!h_(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cl.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}if("u">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 ga=(0,cl.createContext)(!1);function gi(e){let t=(t,r)=>(0,cl.useContext)(ga)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cl.forwardRef)(t)}let gs=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gl=(0,cl.createContext)({}),gu=gi(function(e,t){var r;[e,t]=mL(e,t,gl);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hj({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=h9(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mj(b,y,mY(e,{labelable:!0}));return{isPressed:v,buttonProps:mj(r,w,{"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"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=h7(e),{hoverProps:c,isHovered:d}=go({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=mI({...e,values:f,defaultClassName:"react-aria-Button"}),m=mR(a.id),h=mR(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mW(e,"assertive"):y.current&&l&&!o&&mW(e,"assertive"),y.current=o},[o,l,g,m]),cu().createElement("button",{...mY(e,{propNames:gs}),...mj(a,s,c),...p,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cu().createElement(mU.Provider,{value:{id:h}},p.children))});(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null);let gc=(0,cl.createContext)({}),gd=(0,cl.createContext)({}),gf=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,gd);let{elementType:r="span",...n}=e;return cu().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gp=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gh(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gp.has(t.script)}let t=e.split("-")[0];return gm.has(t)}let gg=Symbol.for("react-aria.i18n.locale");function gy(){let e="u">typeof window&&window[gg]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gh(e)?"rtl":"ltr"}}let gv=gy(),gb=new Set;function gw(){for(let e of(gv=gy(),gb))e(gv)}function gE(){let e=mk(),[t,r]=(0,cl.useState)(gv);return((0,cl.useEffect)(()=>(0===gb.size&&window.addEventListener("languagechange",gw),gb.add(r),()=>{gb.delete(r),0===gb.size&&window.removeEventListener("languagechange",gw)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gx=cu().createContext(null);function gD(e){let{locale:t,children:r}=e,n=gE(),o=cu().useMemo(()=>t?{locale:t,direction:gh(t)?"rtl":"ltr"}:n,[n,t]);return cu().createElement(gx.Provider,{value:o},r)}function g_(){let e=gE();return(0,cl.useContext)(gx)||e}var gS={};function gC(e,t){return e-t*Math.floor(e/t)}function gk(e,t,r,n){let o=(t=gO(e,t))-1,a=-2;return r<=2?a=0:gP(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gP(e){return e%4==0&&(e%100!=0||e%400==0)}function gO(e,t){return"BC"===e?1-t:t}function gR(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gS={"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:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",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:"انقر لبدء عملية تحديد نطاق التاريخ",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:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",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:"Натиснете, за да пристъпите към избора на времеви интервал",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č\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Př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ě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:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",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:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",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:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",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:"לחץ כדי להתחיל בבחירת טווח התאריכים",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šite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započ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ő d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",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’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’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:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",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:"クリックして日付範囲の選択を開始",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:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",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:"날짜 범위 선택을 시작하려면 클릭하십시오.",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ėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",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šķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sā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ńczyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć 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ăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",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:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",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:"Щелкните, чтобы начать выбор диапазона дат",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č\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čanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpolož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č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šite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započ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ığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İ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ığı se\xe7imini başlatmak i\xe7in tıklayı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:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",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:"Натисніть, щоб почати вибір діапазону дат",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:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",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:"单击以开始选择日期范围",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:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",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:"按一下以開始選取日期範圍",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 gT={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 gN{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gC(t,146097),o=Math.floor(n/36524),a=gC(n,36524),i=Math.floor(a/1461),s=Math.floor(gC(a,1461)/365),[l,u]=gR(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gk(l,u,1,1),d=2;e<gk(l,u,3,1)?d=0:gP(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gk(l,u,f,1)+1;return new g0(l,u,f,p)}toJulianDay(e){return gk(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gT[gP(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gP(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"}}function gj(e,t){let r=e.copy(),n="hour"in r?gW(r,t):0;gA(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,g$(r),gI(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,g$(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,g$(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gA(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function g$(e){for(;e.month<1;)gA(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gA(e,1)}function gI(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 gM(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gI(e)}function gL(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gF(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gM(r),r}function gB(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gU(r),r}function gU(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 gV(e,t){let r=e%t;return r<0&&(r+=t),r}function gW(e,t){let r;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=gV(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gV(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gV(e.minute,60),r=Math.floor(e.hour/24),e.hour=gV(e.hour,24),r}function gH(e,t){let r=e.copy();return gW(r,t),r}function gz(e,t,r,n){let o=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=gG(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gM(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gG(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gG(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gG(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gM(o),o}function gK(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gG(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gG(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gG(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gG(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gG(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gZ(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?yr(gj(yi(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):g9(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),ys(yo(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gY(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 gq(e){let t,r=ys(e,new gN);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gJ(e){return`${gq(e)}T${gY(e)}`}function gX(e){let t,r="object"==typeof e[0]?e.shift():new gN;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var gQ=new WeakMap;class g0{copy(){return this.era?new g0(this.calendar,this.era,this.year,this.month,this.day):new g0(this.calendar,this.year,this.month,this.day)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(this,e)}cycle(e,t,r){return gz(this,e,t,r)}toDate(e){return yn(this,e)}toString(){return gq(this)}compare(e){return yg(this,e)}constructor(...e){hw(this,gQ,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gM(this)}}var g1=new WeakMap;class g2{copy(){return new g2(this.hour,this.minute,this.second,this.millisecond)}add(e){return gH(this,e)}subtract(e){return gH(this,gL(e))}set(e){return gB(this,e)}cycle(e,t,r){return gK(this,e,t,r)}toString(){return gY(this)}compare(e){var t,r;return t=this,r=e,yy(t)-yy(r)}constructor(e=0,t=0,r=0,n=0){hw(this,g1,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gU(this)}}var g4=new WeakMap;class g3{copy(){return this.era?new g3(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g3(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(gB(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gz(this,e,t,r);default:return gK(this,e,t,r)}}toDate(e,t){return yn(this,e,t)}toString(){return gJ(this)}compare(e){var t,r;let n=yg(this,e);return 0===n?(t=this,r=yi(e),yy(t)-yy(r)):n}constructor(...e){hw(this,g4,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gM(this)}}var g6=new WeakMap;class g5{copy(){return this.era?new g5(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g5(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gZ(this,e)}subtract(e){return gZ(this,gL(e))}set(e,t){let r,n;return 0===(n=gB(gF(r=yi(this),e),e)).compare(r)?this:ys(yo(yr(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=yi(e),i=ys(gB(a,{hour:t}),new gN),s=[yr(i,e.timeZone,"earlier"),yr(i,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===i.day)[0],l=ys(gB(a,{hour:o}),new gN),u=[yr(l,e.timeZone,"earlier"),yr(l,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===l.day).pop(),c=g9(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return ys(yo(c=36e5*gG(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gK(e,t,r,n);case"era":case"year":case"month":case"day":return ys(yo(yr(gz(yi(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(g9(e)-e.offset)}toString(){var e;let t,r,n;return`${gJ(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g5){var r,n;return e.timeZone===t?e:(r=e,n=t,ys(yo(g9(r)-r.offset,n),r.calendar))}return yo(yr(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hw(this,g6,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gM(this)}}function g9(e){return g8(gO((e=ys(e,new gN)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g8(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function g7(e,t){if("UTC"===t)return 0;if(e>0&&t===yb())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yt(e,t);return g8(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let ye=new Map;function yt(e,t){let r=ye.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ye.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function yr(e,t,r="compatible"){var n,o,a;let i=yi(e);if("UTC"===t)return g9(i);if(t===yb()&&"compatible"===r){i=ys(i,new gN);let e=new Date,t=gO(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=g9(i),l=g7(s-864e5,t),u=g7(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=yt(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function yn(e,t,r="compatible"){return new Date(yr(e,t,r))}function yo(e,t){let r=g7(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g5(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function ya(e){return new g0(e.calendar,e.era,e.year,e.month,e.day)}function yi(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g3(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function ys(e,t){if(yd(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gM(n),n}let yl={"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 yu(e,t){return t=ys(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yc(e,t){return yd(e.calendar,t.calendar)&&yu(e,t)}function yd(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yf={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yp(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yf[r]:(n=function(e){if(Intl.Locale){let t=yD.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yD.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yl[n]||0))%7;return o<0&&(o+=7),o}function ym(e){return yo(Date.now(),e)}function yh(e){return ya(ym(e))}function yg(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yy(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yv=null;function yb(){return null==yv&&(yv=new Intl.DateTimeFormat().resolvedOptions().timeZone),yv}function yw(e){return e.subtract({days:e.day-1})}function yE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yx(e,t,r){let n=yp(e,t,r);return e.subtract({days:n})}let yD=new Map;function y_(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yS(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yC=Symbol.for("react-aria.i18n.locale"),yk=Symbol.for("react-aria.i18n.strings");class yP{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yC];if(void 0===p){let e=window[yk];if(!e)return null;for(let r in p={},e)p[r]=new yP({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yO=new Map,yR=new Map;class yT{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yO.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yO.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yR.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yR.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let yN=new WeakMap;function yj(e,t){let r;return t&&yP.getGlobalDictionaryForPackage(t)||((r=yN.get(e))||(r=new yP(e),yN.set(e,r)),r)}function yA(e,t){let{locale:r}=g_(),n=yj(e,t);return(0,cl.useMemo)(()=>new yT(r,n),[r,n])}let y$=new Map;class yI{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 r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yB&&(yB="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yB&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yL(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)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=yL(e,t),this.options=t}}let yM={true:{ja:"h11"},false:{}};function yL(e,t={}){if("boolean"==typeof t.hour12&&(null==yF&&(yF="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yF)){let r=yM[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(y$.has(r))return y$.get(r);let n=new Intl.DateTimeFormat(e,t);return y$.set(r,n),n}let yF=null,yB=null;function yU(e,t){let r=(0,cl.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yV(e){e=yU(null!=e?e:{},yW);let{locale:t}=g_();return(0,cl.useMemo)(()=>new yI(t,e),[t,e])}function yW(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yH(e){return e&&e.__esModule?e.default:e}let yz=new WeakMap;function yK(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yG(e,t,r,n){let o=yA(yH(gS),"@react-aria/calendar"),a=yK(e)||yK(t),i=yV({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yV({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cl.useMemo)(()=>{if(yu(e,yw(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yu(t,yE(e)))return i.format(a.toDate(r));if(yu(t,yE(t)))return n?yZ(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yZ(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yZ(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yY(e,t){let r=(0,cl.useRef)(!0),n=(0,cl.useRef)(null);(0,cl.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cl.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yq(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mR(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function yJ(e,t){var r,n;let o,a,i,s,l,u=yA((r=gS)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mY(e),d=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yY(()=>{t.isFocused||mW(f)},[f]);let p=(i=yA(yH(gS),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yV({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yK(o)||yK(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cl.useMemo)(()=>{if(!l&&o&&a)if(yu(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yZ(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yY(()=>{p&&mW(p,"polite",4e3)},[p]);let m=mT([!!e.errorMessage,e.isInvalid,e.validationState]);yz.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:p});let[h,g]=(0,cl.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cl.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mj(c,yq({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let yX={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 yQ(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cl.useState)(!1),{focusWithinProps:a}=h8({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cl.useMemo)(()=>n?t:t?{...yX,...t}:yX,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cu().createElement(r,mj(a,i),t)}function y0(e,t,r,n){let o=mv(r),a=null==r;(0,cl.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let y1=0,y2=new Map;function y4(e){let[t,r]=(0,cl.useState)();return my(()=>{if(!e)return;let t=y2.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y1++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y2.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y2.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y3(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y6(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y5(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y3(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y6(e,t,"left"),n=y6(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,E=parseInt(p,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function y9(e,t){let r=e;for(y3(r,t)&&(r=r.parentElement);r&&!y3(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class y8 extends gN{fromJulianDay(e){let t=super.fromJulianDay(e);return new g0(this,gO(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(y7(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(y7(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function y7(e){let[t,r]=gR(e.year+-543);return new g0(t,r,e.month,e.day)}function ve(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vt(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-ve(e,r,1,1))/30),o=t+1-ve(e,r,n,1);return[r,n,o]}function vr(e){return Math.floor(e%4/3)}function vn(e,t){return t%13!=0?30:vr(e)+5}class vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),ve(1723856,t,e.month,e.day)}getDaysInMonth(e){return vn(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vr(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class va extends vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e);return new g0(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vi extends vo{fromJulianDay(e){let[t,r,n]=vt(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ve(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vn(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"}}let vs=765433;function vl(e){return 7>gC(7*e+1,19)}function vu(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gC(3*(r+1),7)&&(r+=1),r}function vc(e){let t,r;return vu(e)+(t=vu(e-1),r=vu(e),vu(e+1)-r==356?2:+(r-t==382))}function vd(e){return vc(e+1)-vc(e)}function vf(e,t){if(t>=6&&!vl(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vd(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vl(e):30}class vp{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vs*19+234)/235)+1,n=vc(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vc(--r)));let a=1,i=0;for(;i<o;)i+=vf(r,a),a++;let s=o-(i-=vf(r,--a));return new g0(this,r,a,s)}toJulianDay(e){let t=vc(e.year);for(let r=1;r<e.month;r++)t+=vf(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vf(e.year,e.month)}getMonthsInYear(e){return vl(e.year)?13:12}getDaysInYear(e){return vd(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vl(t.year)&&!vl(e.year)&&t.month>6?e.month--:!vl(t.year)&&vl(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vm extends gN{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gk(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gP(o.year-1)?31:30)+155+90+10):(t=gP(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new g0(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gR(e.year+78);return(gP(o)?(t=31,r=gk(n,o,3,21)):(t=30,r=gk(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gP(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 vh(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vg(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vh(t,n,1,1)))/29.5)+1),a=r-vh(t,n,o,1)+1;return new g0(e,n,o,a)}function vy(e){return(14+11*e)%30<11}class vv{fromJulianDay(e){return vg(this,1948440,e)}toJulianDay(e){return vh(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vy(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vy(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vb extends vv{fromJulianDay(e){return vg(this,1948439,e)}toJulianDay(e){return vh(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vw(e){return 460322+u[e-1300]}function vE(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vx(e,t){let r=vw(e);for(let n=1;n<t;n++)r+=vE(e,n);return r}function vD(e){return u[e+1-1300]-u[e-1300]}class v_ extends vv{fromJulianDay(e){let t=e-1948440,r=vw(1300),n=vw(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vw(++e)+1;let o=vD(e);if(n===o){r=12;break}if(n<o){let t=vE(e,r);for(r=1;n>t;)n-=t,t=vE(e,++r);break}}return new g0(this,e,r,t-vx(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vx(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vE(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vD(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let r=1;r<=12;r++)e+=vE(t,r)}}}}let vS=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vC=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vk=[1867,1911,1925,1988,2018],vP=["meiji","taisho","showa","heisei","reiwa"];function vO(e){let t=vS.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vS.length-1:0===t?0:t-1}function vR(e){let t=vk[vP.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g0(e.year+t,e.month,e.day)}class vT extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),r=vO(t);return new g0(this,vP[r],t.year-vk[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vR(e))}balanceDate(e){let t=vR(e),r=vO(t);vP[r]!==e.era&&(e.era=vP[r],e.year=t.year-vk[r]),this.constrainDate(e)}constrainDate(e){let t=vP.indexOf(e.era),r=vC[t];if(null!=r){let[n,o,a]=r,i=n-vk[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vS[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vP}getYearsInEra(e){let t=vP.indexOf(e.era),r=vS[t],n=vS[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vR(e))}getMinimumMonthInYear(e){let t=vN(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vN(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vN(e){if(1===e.year)return vS[vP.indexOf(e.era)]}let vj=[0,31,62,93,124,155,186,216,246,276,306,336];class vA{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vj[o]+1;return new g0(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vj[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gC(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function v$(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vI(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vM extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vI(gO(t.era,t.year));return new g0(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vL(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vI(v$(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vL(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vL(e){let[t,r]=gR(v$(e));return new g0(t,r,e.month,e.day)}function vF(e){switch(e){case"buddhist":return new y8;case"ethiopic":return new vo;case"ethioaa":return new va;case"coptic":return new vi;case"hebrew":return new vp;case"indian":return new vm;case"islamic-civil":return new vv;case"islamic-tbla":return new vb;case"islamic-umalqura":return new v_;case"japanese":return new vT;case"persian":return new vA;case"roc":return new vM;default:return new gN}}function vB(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vU(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vV(e,t,r,n,o){let a=e;if(t.years)a=yw(e.subtract({months:e.month-1}));else t.months?a=yw(e):t.weeks&&(a=yx(e,r));return vH(e,a,t,r,n,o)}function vW(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vH(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yS(t,vV(ya(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=y_(t,vW(ya(a),r,n));e&&(t=e)}return t}function vz(e,t,r){if(t){let r=yS(e,ya(t));r&&(e=r)}if(r){let t=y_(e,ya(r));t&&(e=t)}return e}function vK(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vG(e,t,r){let[n,o]=(0,cl.useState)(e||t),a=(0,cl.useRef)(void 0!==e),i=void 0!==e;(0,cl.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cl.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vZ(e){var t,r,n;let o=(0,cl.useMemo)(()=>new yI(e.locale),[e.locale]),a=(0,cl.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:m}=e,h=(0,cl.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cl.useMemo)(()=>g?ys(ya(g),h):null,[g,h]),b=(0,cl.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vG((0,cl.useMemo)(()=>e.focusedValue?vz(ys(ya(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cl.useMemo)(()=>vz(e.defaultFocusedValue?ys(ya(e.defaultFocusedValue),h):v||ys(yh(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cl.useState)(()=>{switch(d){case"start":return vV(w,l,i,u,c);case"end":return vW(w,l,i,u,c);default:return vU(w,l,i,u,c)}}),[_,S]=(0,cl.useState)(e.autoFocus||!1),C=(0,cl.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[k,P]=(0,cl.useState)(h);if(!yd(h,k)){let e=ys(w,h);D(vU(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vz(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vK(e=vz(e,u,c),x,f))&&(e=ys(e,(null==g?void 0:g.calendar)||new gN),g&&"hour"in g?y(g.set(e)):y(e))}}vB(w,u,c)?E(vz(w,u,c)):0>w.compare(x)?D(vW(w,l,i,u,c)):w.compare(C)>0&&D(vV(w,l,i,u,c));let T=(0,cl.useMemo)(()=>!!v&&(!!(f&&f(v))||vB(v,u,c)),[v,f,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cl.useMemo)(()=>"visible"===p?l:vY(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:C},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vz(w.add(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vz(w.subtract(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yx(w,i)):(l.months||l.years)&&O(yw(w))},focusSectionEnd(){l.days?O(C):l.weeks?O(yx(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yE(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vY(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vY(l)))},selectFocusedDate(){f&&f(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vB(e,u,c),isSelected(e){return null!=v&&yu(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yu(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return yu(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return yu(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yp(r=yx(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(yu(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vY(e){let t={...e};for(let r in e)t[r]=1;return t}function vq(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:ya(e),end:ya(t)}):null}function vJ(e,t){return(e=ys(e,(null==t?void 0:t.calendar)||new gN),t&&"hour"in t)?t.set(e):e}function vX(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vQ=(0,cl.createContext)(null),v0=(0,cl.createContext)(null),v1=(0,cl.createContext)(null),v2=(0,cl.createContext)(null),v4=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,vQ);let{locale:r}=g_(),n=vZ({...e,locale:r,createCalendar:e.createCalendar||vF}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=yJ(e,n),u=mI({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cu().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:a,next:i}}],[gc,{"aria-hidden":!0,level:2,children:l}],[v1,n],[vQ,e],[gd,{slots:{errorMessage:s}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,o["aria-label"])),u.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v3=(0,cl.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mL(e,t,v0);let{locale:s}=g_(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vG(t,r||null,n),[f,p]=(0,cl.useState)(null),m="center";if(c&&c.start&&c.end){let e=vU(ya(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cl.useRef)(null),[g,y]=(0,cl.useState)(null),v=(0,cl.useMemo)(()=>yS(s,null==g?void 0:g.start),[s,g]),b=(0,cl.useMemo)(()=>y_(l,null==g?void 0:g.end),[l,g]),w=vZ({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vX(t,w,-1),end:vX(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cl.useState)(w.visibleRange);yc(w.visibleRange.start,x.start)&&yc(w.visibleRange.end,x.end)||(E(f),D(w.visibleRange));let _=e=>{e?(p(e),E(e)):(p(null),E(null))},S=f?vq(f,w.focusedDate):c&&vq(c.start,c.end),C=t=>{if(e.isReadOnly)return;let r=vK(vz(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vq(f,r);e&&d({start:vJ(e.start,null==c?void 0:c.start),end:vJ(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[k,P]=(0,cl.useState)(!1),{isDateUnavailable:O}=e,R=(0,cl.useMemo)(()=>!!c&&!f&&(!!(O&&(O(c.start)||O(c.end)))||vB(c.start,s,l)||vB(c.end,s,l)),[O,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){C(w.focusedDate)},selectDate:C,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vB(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:k,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vF}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=yJ(r,l),a=(0,cl.useRef)(!1),y0(i=(0,cl.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y0(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},y0(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mI({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cu().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:c,next:d}}],[gc,{"aria-hidden":!0,level:2,children:p}],[v2,l],[v0,e],[gd,{slots:{errorMessage:f}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,u["aria-label"])),m.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v6=(0,cl.createContext)(null),v5=(0,cl.forwardRef)(function(e,t){var r,n;let o=(0,cl.useContext)(v1),a=(0,cl.useContext)(v2),i=mM(vQ),s=mM(v0),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=g_(),s=yG(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yz.get(t),c=yq({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yV({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=g_(),p=(0,cl.useMemo)(()=>{let e=yx(yh(t.timeZone),f,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((yp(yw(n),f,a)+r)/7));return{gridProps:mj(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"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?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:p,weeksInMonth:m}}({startDate:u,endDate:yE(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cu().createElement(v6.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:m}},cu().createElement("table",{...mY(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cu().createElement(cu().Fragment,null,cu().createElement(v9,null,e=>cu().createElement(v8,null,e)),cu().createElement(v7,null,e.children))))}),v9=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cl.useContext)(v6);return cu().createElement("thead",{...mY(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cu().createElement("tr",null,i.map((e,t)=>cu().cloneElement(r(e),{key:t}))))}),v8=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cu().createElement("th",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),v7=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cl.useContext)(v1),i=(0,cl.useContext)(v2),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cl.useContext)(v6);return cu().createElement("tbody",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cu().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cu().cloneElement(r(e),{key:t}):cu().createElement("td",{key:t})))))}),be=(0,cl.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cl.useContext)(v1),s=(0,cl.useContext)(v2),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cl.useContext)(v6))?n:{startDate:l.visibleRange.start},c=(0,cl.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yz.get(t),u=yA((n=gS)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yV({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yK(a),timeZone:t.timeZone}),d=t.isSelected(a),f=t.isCellFocused(a);i=i||t.isCellDisabled(a);let p=t.isCellUnavailable(a),m=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&yu(t.value,a));h&&(d=!0),a=yU(a,yc);let g=(0,cl.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yu(a,yh(t.timeZone)),v=(0,cl.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yu(a,t.value.start)||yu(a,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&yu(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yu(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y4(b),E=(0,cl.useRef)(!1),x=(0,cl.useRef)(!1),D=(0,cl.useRef)(void 0),{pressProps:_,isPressed:S}=hj({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(yu(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yu(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.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)}}});i||(o=yu(a,t.focusedDate)?0:-1),(0,cl.useEffect)(()=>{f&&r.current&&(m4(r.current),"pointer"!==hB&&document.activeElement===r.current&&y5(r.current,{containingElement:y9(r.current)}))},[f,r]);let C=yV({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),k=(0,cl.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mj(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":v,"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:S,isFocused:f,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:k}}({date:e},l,c),{hoverProps:m,isHovered:h}=go({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=h7();y&&(y=p.isFocused);let v=(o=u,a=ys(a=e,o.calendar),o=yw(o),a=yw(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yu(e,l.highlightedRange.start),w=yu(e,l.highlightedRange.end));let E=mI({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),x={"data-focused":p.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return cu().createElement("td",{...d,ref:r},cu().createElement("div",{...mj(mY(t),f,g,m,x,E),ref:c}))}),bt=(0,cl.createContext)({}),br=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,bt);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=go({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:m}=h7({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mI({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cu().createElement("div",{...mj(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bn=(0,cl.createContext)({}),bo=gi(function(e,t){[e,t]=mL(e,t,bn);let{hoverProps:r,isHovered:n}=go(e),{isFocused:o,isFocusVisible:a,focusProps:i}=h7({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mI({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cu().createElement("input",{...mj((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var ba={};ba={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",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:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",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:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"mě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č\xe1tečn\xed datum",timeZoneName:"č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:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",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:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"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:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",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:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završ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četka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező 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ő d\xe1tum",timeZoneName:"idő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:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",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:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",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:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mē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ākuma datums",timeZoneName:"laika josla",weekday:"nedēļ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ń",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesią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ątkowa",timeZoneName:"strefa czasowa",weekday:"dzień 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ă final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",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ă \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",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:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopoč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čatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždň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četka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",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četka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"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ş Tarihi",era:"\xe7ağ",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şlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",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:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",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:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",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:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let bi=cu().createContext(null),bs="react-aria-focus-scope-restore",bl=null;function bu(e){var t,r,n,o,a,i,s,l,u,c;let d,f,p,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cl.useRef)(null),w=(0,cl.useRef)(null),E=(0,cl.useRef)([]),{parentNode:x}=(0,cl.useContext)(bi)||{},D=(0,cl.useMemo)(()=>new b_({scopeRef:E}),[E]);my(()=>{let e=x||bS.root;if(bS.getTreeNode(e.scopeRef)&&bl&&!bm(bl,e.scopeRef)){let t=bS.getTreeNode(bl);t&&(e=t)}e.addChild(D),bS.addNode(D)},[D,x]),my(()=>{let e=bS.getTreeNode(E);e&&(e.contain=!!g)},[g]),my(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(bs,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bs,n)}},[h]),my(()=>{if(r||n)return;let e=t.current,o=m1(e?e[0]:void 0),a=e=>{let r=hS(e);bf(r,t.current)?bl=t:bp(r)||(bl=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cl.useRef)(void 0),f=(0,cl.useRef)(void 0),my(()=>{let e=o.current;if(!a){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=m1(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bd(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bf(r,n))return;let a=bw(bc(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bh(i,!0)},n=e=>{(!bl||bm(bl,o))&&bf(hS(e),o.current)?(bl=o,d.current=hS(e)):bd(o)&&!bp(hS(e),o)?d.current?d.current.focus():bl&&bl.current&&by(bl.current):bd(o)&&(d.current=hS(e))},i=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=hB,n=("virtual"===r||null===r)&&hl()&&hs(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bd(o)&&!bp(a,o)){bl=o;let t=hS(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bl.current&&by(bl.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),my(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),i=E,s=y,l=g,p=(0,cl.useRef)("u">typeof document?((e=document)=>e.activeElement)(m1(i.current?i.current[0]:void 0)):null),my(()=>{let e=i.current,t=m1(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bl||bm(bl,i))&&bf(((e=document)=>e.activeElement)(t),i.current)&&(bl=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),my(()=>{let e=m1(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bd(i)||t.isComposing)return;let r=e.activeElement;if(!bp(r,i)||!bv(i))return;let n=bS.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bw(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bp(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bp(s,i));(t.preventDefault(),t.stopPropagation(),s)?bh(s,!0):bp(o)?bh(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),my(()=>{var e;let t=m1(i.current?i.current[0]:void 0);if(!s)return;let r=bS.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=bS.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bp(n,i)||n===t.body&&bv(i))){let e=bS.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bb(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bS.getTreeNode(t.scopeRef))return void bb(bg(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cu().useRef(c),(0,cl.useEffect)(()=>{m.current&&(bl=u,!bf(((e=document)=>e.activeElement)(m1(u.current?u.current[0]:void 0)),bl.current)&&u.current&&by(u.current)),m.current=!1},[u]),(0,cl.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m1(E.current?E.current[0]:void 0)),t=null;if(bf(e,E.current)){for(let r of bS.traverse())r.scopeRef&&bf(e,r.scopeRef.current)&&(t=r);t===bS.getTreeNode(E)&&(bl=t.scopeRef)}},[E]),my(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bS.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bl||bm(E,bl))&&(!n||bS.getTreeNode(n))&&(bl=n),bS.removeTreeNode(E)},[E]);let _=(0,cl.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bh(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bh(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bh(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bh(i,!0),i}}},[]),S=(0,cl.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cu().createElement(bi.Provider,{value:S},cu().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cu().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bc(e){return e[0].parentElement}function bd(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bf(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bp(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bS.traverse(bS.getTreeNode(t)))if(r&&bf(e,r.current))return!0;return!1}function bm(e,t){var r;let n=null==(r=bS.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bh(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h2(e)}catch{}}function bg(e,t=!0){let r=e[0].previousElementSibling,n=bc(e),o=bw(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bw(n=bc(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function by(e,t=!0){bh(bg(e,t))}function bv(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bb(e){e.dispatchEvent(new CustomEvent(bs,{bubbles:!0,cancelable:!0}))&&bh(e)}function bw(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m0:mQ,s=m1((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m2(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bf(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bE(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bh(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bx(u);return e&&bh(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bx(u);if(!e)return null;c=e}return c&&bh(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bw(n,{tabbable:o,accept:a}).nextNode();return i&&bh(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bx(bw(n,{tabbable:o,accept:a}));return i&&bh(i,!0),null!=i?i:null}}}function bx(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bD{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new b_({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bf(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.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 r=new bD;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new b_({scopeRef:null}),this.fastMap.set(null,this.root)}}class b_{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 bS=new bD;function bC(e,t,r){let{direction:n}=g_(),o=(0,cl.useMemo)(()=>bE(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bw(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hj({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mj(i,{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)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bk(e,t,r){let n=bw(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bP(e,t,r){let n=(0,cl.useRef)(t),o=mv(()=>{r&&r(n.current)});(0,cl.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bO(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mR(t);let i=mR(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yq({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mT([!!t,!!r,n,o]),l=mT([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mj(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bR(e,t,r){let{validationBehavior:n,focus:o}=e;my(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mv(()=>{t.resetValidation()}),i=mv(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hB="keyboard",hK("keyboard",null)),e.preventDefault()}),s=mv(()=>{t.commitValidation()});(0,cl.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bT=new WeakMap,bN="__role_"+Date.now(),bj="__focusManager_"+Date.now();function bA(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=bO({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),p=(0,cl.useRef)(null),{focusWithinProps:m}=h8({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=yA((o=ba)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y4(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bN]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bj],E=(0,cl.useMemo)(()=>w||bE(r),[w,r]),x=bC(t,r,"presentation"===e[bN]);bT.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cl.useRef)(e.autoFocus);a="presentation"===e[bN]?{role:"presentation"}:mj(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cl.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bP(e.inputRef,t.value,t.setValue),bR({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mY(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mj(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:f,isInvalid:i,validationErrors:s,validationDetails:l}}var b$={};b$={"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:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",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:"البيانات المحددة غير متاحة."},"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:"Началната дата трябва да е преди крайната.",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:"Избраната дата не е налична."},"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ředch\xe1zet datu ukonč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 Anfangsdatum 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:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",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:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"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’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:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",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:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završ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ő d\xe1tumnak a befejező 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ő 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:"開始日は終了日より前にする必要があります。",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:"選択した日付は使用できません。"},"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:"시작일은 종료일 이전이어야 합니다.",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:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė 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ākuma datumam ir jābū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ī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ęcia musi być wcześniejsza niż data zakoń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ę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ă fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"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:"Дата начала должна предшествовать дате окончания.",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:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\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četni datum mora biti pred konč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četka mora biti pre datuma završ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şlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdı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ılamı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:"Дата початку має передувати даті завершення.",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:"Вибрана дата недоступна."},"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:"开始日期必须早于结束日期。",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:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let bI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bM={...bI,customError:!0,valid:!1},bL={isInvalid:!1,validationDetails:bI,validationErrors:[]},bF=(0,cl.createContext)({}),bB="__formValidationState"+Date.now();function bU(e){if(e[bB]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bB];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bM}:null,u=(0,cl.useMemo)(()=>i&&null!=o?bW(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bV(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cl.useContext)(bF),d=(0,cl.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bV(c[e])):bV(c[n]):[],[c,n]),[f,p]=(0,cl.useState)(c),[m,h]=(0,cl.useState)(!1);c!==f&&(p(c),h(!1));let g=(0,cl.useMemo)(()=>bW(m?[]:d),[m,d]),y=(0,cl.useRef)(bL),[v,b]=(0,cl.useState)(bL),w=(0,cl.useRef)(bL),[E,x]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bH(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bL,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bH(v,e)?y.current=e:b(e)},resetValidation(){bH(bL,w.current)||(w.current=bL,b(bL)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bV(e){return e?Array.isArray(e)?e:[e]:[]}function bW(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bM}:null}function bH(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bz(...e){let t=new Set,r=!1,n={...bI};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bK=new yP((eo=b$)&&eo.__esModule?eo.default:eo);function bG(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bZ(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bG(),n=new yT(e,yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK),l=new yI(e,bJ({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bY={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bq={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bJ(e,t){var r;e={...t.shouldForceLeadingZeros?bq:bY,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function bX(e){return e&&"hour"in e?e:new g2}function bQ(e,t){return null===e?null:e?ys(e,t):void 0}function b0(e,t,r,n){if(e)return bQ(e,r);let o=ys(ym(null!=n?n:yb()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?ya(o):n?o:yi(o)}function b1(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cl.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b2=new yP({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"},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"),b4={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b3={year:5,month:2,day:7,hour:2,minute:15,second:15},b6={dayperiod:"dayPeriod"};function b5(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,m]=b1(f,e.granularity),h=m||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let g=(0,cl.useMemo)(()=>new yI(n),[n]),y=(0,cl.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cl.useMemo)(()=>{var e;return null!=(e=bQ(v,y))?e:null},[v,y]),[E,x]=(0,cl.useState)(()=>b0(e.placeholderValue,p,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cl.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cl.useMemo)(()=>bJ({},_),[_]),C=(0,cl.useMemo)(()=>new yI(n,S),[n,S]),k=(0,cl.useMemo)(()=>C.resolvedOptions(),[C]),P=(0,cl.useMemo)(()=>C.formatToParts(new Date).filter(e=>b4[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[C]),[O,R]=(0,cl.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cl.useRef)(null),N=(0,cl.useRef)(y);(0,cl.useEffect)(()=>{yd(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?ys(t,y):b0(e.placeholderValue,p,y,m)))},[y,p,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(b0(e.placeholderValue,p,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(b0(e.placeholderValue,p,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=ys(t,(null==f?void 0:f.calendar)||new gN)):x(t),T.current=null},$=(0,cl.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cl.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=b4[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b4[e.type]&&!t[e.type],p=b4[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?b2.getStringForLocale(d,i):"––"):null,m={type:b6[e.type]||e.type,text:u?p:e.value,...b9(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"⁦",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"⁩",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"⁩",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,C,k,j,y,n,p),[$,O,C,k,j,y,n,p]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{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,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,k));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cl.useMemo)(()=>bZ(v,u,c,d,_),[v,u,c,d,_]),B=bU({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:C,validationState:V,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b3[e]||1)},decrementPage(e){L(e,-(b3[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=b0(e.placeholderValue,p,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yI(n,bJ(e,_)).format($):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{..._,...t}))}}function b9(e,t,r){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:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,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(r.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 b8=(0,cl.createContext)(null),b7=(0,cl.createContext)(null),we=(0,cl.createContext)(null),wt=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(b7),n=(0,cl.useContext)(we);return r||n?cu().createElement(wn,{...e,ref:t}):cu().createElement(wr,{...e,ref:t})}),wr=(0,cl.forwardRef)((e,t)=>{let[r,n]=mL({slot:e.slot},t,b8),{locale:o}=g_(),a=b5({...r,locale:o,createCalendar:vF}),i=(0,cl.useRef)(null),{fieldProps:s,inputProps:l}=bA({...r,inputRef:i},a,n);return cu().createElement(m$,{values:[[b7,a],[bn,{...l,ref:i}],[bt,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cu().createElement(wn,e))}),wn=(0,cl.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cl.useContext)(b7),a=(0,cl.useContext)(we),i=null!=o?o:a;return cu().createElement(cu().Fragment,null,cu().createElement(br,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cl.cloneElement)(n(e),{key:t}))),cu().createElement(bo,null))}),wo=(0,cl.createContext)({});function wa(){var e;return null!=(e=(0,cl.useContext)(wo))?e:{}}function wi({children:e}){let t=(0,cl.useMemo)(()=>({register:()=>{}}),[]);return cu().createElement(hv.Provider,{value:t},e)}cu().forwardRef(({children:e,...t},r)=>{let n=(0,cl.useRef)(!1),o=(0,cl.useContext)(hv);r=mh(r||(null==o?void 0:o.ref));let a=mj(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hx(o,r),(0,cl.useEffect)(()=>{n.current||(n.current=!0)},[]),cu().createElement(hv.Provider,{value:a},e)});let ws=cu().createContext(null);function wl(e){let t=mk(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,a]=(0,cl.useState)(!1),i=(0,cl.useMemo)(()=>({contain:o,setContain:a}),[o,a]),{getContainer:s}=wa();if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cu().createElement(bu,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cu().createElement(ws.Provider,{value:i},cu().createElement(wi,null,l)),hO().createPortal(l,r)}let wu=(0,cl.createContext)(null),wc=(0,cl.createContext)(null),wd=(0,cl.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mL(e,t,wu);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mT();a=e["aria-label"]?void 0:a;let i=(0,cl.useRef)(!1);return(0,cl.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h2(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h2(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),my(()=>{null==n||n(!0)},[n=null==(r=(0,cl.useContext)(ws))?void 0:r.setContain]),{dialogProps:{...mY(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cl.useContext)(wc);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mI({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cu().createElement("section",{...mY(e),...n,...i,ref:t,slot:e.slot||void 0},cu().createElement(m$,{values:[[gc,{slots:{[mA]:{},title:{...o,level:2}}}],[gl,{slots:{[mA]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wf=(0,cl.createContext)(null),wp=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(wf);return(null==r?void 0:r.isInvalid)?cu().createElement(wm,{...e,ref:t}):null}),wm=(0,cl.forwardRef)((e,t)=>{let r=(0,cl.useContext)(wf),n=mY(e),o=mI({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cu().createElement(gf,{slot:"errorMessage",...n,...o,ref:t})}),wh=(0,cl.createContext)(null),wg=(0,cl.createContext)({}),wy=gi(function(e,t){[e,t]=mL(e,t,wg);let{elementType:r="label",...n}=e;return cu().createElement(r,{className:"react-aria-Label",...n,ref:t})}),wv=(0,cl.createContext)({placement:"bottom"}),wb=new WeakMap,ww=[];function wE(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wx(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function wD(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wx(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(wx(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wx((r-t)/n,n))*n),a=wx(a,n)}let w_={top:"top",bottom:"top",left:"left",right:"left"},wS={top:"bottom",bottom:"top",left:"right",right:"left"},wC={top:"left",left:"top"},wk={top:"height",left:"width"},wP={width:"totalWidth",height:"totalHeight"},wO={},wR="u">typeof document?window.visualViewport:null;function wT(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==wR?void 0:wR.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wR?void 0:wR.width)?r:l,s=null!=(n=null==wR?void 0:wR.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,wR&&(c=wR.offsetTop,d=wR.offsetLeft)}else({width:i,height:s,top:c,left:d}=wI(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=i,u=s;return hi()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==wR?void 0:wR.pageTop)?o:0,d=null!=(a=null==wR?void 0:wR.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function wN(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wk[e]],c=n.scroll[w_[e]]+a,d=u+n.scroll[w_[e]]-a,f=t-l+i[e]-n[w_[e]],p=t-l+r+i[e]-n[w_[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function wj(e){if(wO[e])return wO[e];let[t,r]=e.split(" "),n=w_[t]||"right",o=wC[n];w_[r]||(r="center");let a=wk[n],i=wk[o];return wO[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wO[e]}function wA(e,t,r,n,o,a,i,s,l,u){var c,d,f,p,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:g!==v&&(E[v]+=(null!=(p=e[w])?p:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wE(E[v],x,D),h===y){let r=s?i[b]:t[wP[b]];E[wS[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function w$(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wS[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wS[c]]-o)}function wI(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wM(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wI(e);let n=wI(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function wL(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 wF=new WeakMap;function wB(e){let{ref:t,box:r,onResize:n}=e;(0,cl.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wU="u">typeof document?window.visualViewport:null;function wV(e){var t,r,n;let{direction:o}=g_(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cl.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,f,p,m,g,o,v,b,a],D=(0,cl.useRef)(null==wU?void 0:wU.scale);(0,cl.useEffect)(()=>{g&&(D.current=null==wU?void 0:wU.scale)},[g]);let _=(0,cl.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!f||(null==wU?void 0:wU.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wL(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wL(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wI(s):wM(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wI(l),D={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};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wT(f),C=wT(v),k="BODY"===f.tagName?wI(v):wM(v,f);return"HTML"===v.tagName&&"BODY"===f.tagName&&(C.scroll.top=0,C.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,f,p,m,h){var g,y,v,b,w,E,x,D,_,S,C,k,P,O;let R,T,N,j=wj(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wA(t,s,r,j,c,d,u,f,m,h),B=c,U=w$(s,u,t,o,a+c,j);if(i&&n[A]>U){let e=wj(`${wS[M]} ${L}`),n=wA(t,s,r,e,c,d,u,f,m,h);w$(s,u,t,o,a+c,e)>U&&(j=e,F=n,B=c)}let V="bottom";"top"===j.axis?"top"===j.placement?V="top":"bottom"===j.placement&&(V="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?V="bottom":"bottom"===j.crossPlacement&&(V="top"));let W=wN($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=V,R=f?u.height:s[wP.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(C=o.bottom)?C:0)+a)):Math.max(0,T+E-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));p&&p<H&&(H=p),r.height=Math.min(r.height,H),W=wN($,(F=wA(t,s,r,j,B,d,u,f,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[w_[$]],G=m/2+h,Z="left"===w_[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wE(K,t[$]+m/2-(F[$]+o[w_[$]]),t[$]+t[I]-m/2-(F[$]+o[w_[$]]));return z[$]=wE(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,C,k,p,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);my(_,x),my(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wB({ref:s,onResize:_}),wB({ref:i,onResize:_});let S=(0,cl.useRef)(!1);my(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wU||wU.addEventListener("resize",t),null==wU||wU.addEventListener("scroll",r),()=>{null==wU||wU.removeEventListener("resize",t),null==wU||wU.removeEventListener("scroll",r)}},[_]);let C=(0,cl.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cl.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wF.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&C}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}function wW(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 wH=[],wz="u">typeof document&&window.visualViewport,wK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wG=0;function wZ(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wY(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wq(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=y9(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wJ={};function wX(e){var t;let{onDismiss:r,...n}=e,o=yq(n,yA((t=wJ)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cu().createElement(yQ,null,cu().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wQ(e,t=!0){let[r,n]=(0,cl.useState)(!0),o=r&&t;return my(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w1(e,o,(0,cl.useCallback)(()=>n(!1),[])),o}function w0(e,t){let[r,n]=(0,cl.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w1(e,o,(0,cl.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}function w1(e,t,r){my(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hP.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w2(e){let[t,r]=vG(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cl.useCallback)(()=>{r(!0)},[r]),o=(0,cl.useCallback)(()=>{r(!1)},[r]),a=(0,cl.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wJ={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"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:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādī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:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let w4=(0,cl.createContext)(null),w3=(0,cl.createContext)(null),w6=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,w4);let r=(0,cl.useContext)(wc),n=w2(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=w0(t,o.isOpen)||e.isExiting||!1,i=(0,cl.useContext)(ga),{direction:s}=g_();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cu().createElement(cu().Fragment,null,t)}return!o||o.isOpen||a?cu().createElement(w5,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w5({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(0),u=(0,cl.useRef)(null),d=(0,cl.useContext)(w3),f=d&&"SubmenuTrigger"===n.trigger;my(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cl.useEffect)(()=>{if(o&&!wH.includes(t))return wH.push(t),()=>{let e=wH.indexOf(t);e>=0&&wH.splice(e,1)}},[o,t]);let l=()=>{wH[wH.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cl.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mv(e=>{r&&wW(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mv(e=>{r&&r(e)});(0,cl.useEffect)(()=>{let e=a.current;if(n)return;let r=m1(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wW(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=h8({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bp(e.relatedTarget,bl))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:p,arrowProps:m,placement:h}=wV({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;my(()=>{if(!t){let e,t,r,n;return 1==++wG&&(c=ha()?(r=null,n=mg(wY(document,"touchstart",r=>{((e=y9(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wZ(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wY(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}),wY(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wY(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wK.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=mg(wY(window,"scroll",()=>{window.scrollTo(0,0)}),wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"),wZ(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wz&&(wz.height<window.innerHeight?requestAnimationFrame(()=>{wq(n)}):wz.addEventListener("resize",()=>wq(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):mg(wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"))),()=>{0==--wG&&c()}}},[t])}({isDisabled:a||!t.isOpen}),my(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=wb.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wb.set(e,r+1))};ww.length&&ww[ww.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return ww.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wb.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wb.delete(e)):wb.set(e,t-1))}s===ww[ww.length-1]?(ww.pop(),ww.length&&ww[ww.length-1].observe()):ww.splice(ww.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=ww[ww.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mj(d,p),arrowProps:m,underlayProps:f,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:u},e),y=n.popoverRef,v=wQ(y,!!g)||n.isEntering||!1,b=mI({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cl.useState)(!1);my(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cl.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h2(y.current)},[E,y]);let D={...p.style,...b.style},_=cu().createElement("div",{...mj(mY(n),p),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cu().createElement(wX,{onDismiss:e.close}),cu().createElement(wv.Provider,{value:{...h,placement:g,ref:i}},b.children),cu().createElement(wX,{onDismiss:e.close}));return f?cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cu().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cu().createElement("div",{ref:u,style:{display:"contents"}},cu().createElement(w3.Provider,{value:u},_)))}function w9(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w8=(0,cl.createContext)(null),w7=(0,cl.createContext)(null),Ee=(0,cl.createContext)(null),Et=(0,cl.createContext)(null),Er=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w8);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w2(e),[n,o]=vG(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b1(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,cl.useState)(null),[p,m]=(0,cl.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cl.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,cl.useMemo)(()=>bZ(n,y,v,b,g),[n,y,v,b,g]),E=bU({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(ya(e)):yi(e,t)),f(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?_(t,p||bX(e.defaultValue||e.placeholderValue)):f(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,p||bX(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yI(e,bJ(t,g)).format(l):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mR(),a=mR(),i=mR(),s=yA((n=ba)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:m}=bO({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bC(t,r),g=f["aria-labelledby"]||f.id,{locale:y}=g_(),v=t.formatValue(y,{month:"long"}),b=y4(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mY(e),x=(0,cl.useMemo)(()=>bE(r),[r]),D=(0,cl.useRef)(!1),{focusWithinProps:_}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mj(E,h,f,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...f,id:i,[bN]:"presentation","aria-describedby":w,value:t.value,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,[bB]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${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(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mB(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cl.useState)(null),E=(0,cl.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=h7({within:!0}),S=mI({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mY(e);return delete C.id,cu().createElement(m$,{values:[[Ee,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[b8,f],[gl,{...p,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[vQ,h],[wc,i],[w4,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wu,m],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().createElement("div",{...x,...C,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),En=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w7);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w2(e),[a,i]=vG(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cl.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w9(e)?i(e):i(null)},[d,f]=b1((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cl.useState)(null),[y,v]=(0,cl.useState)(null);u&&w9(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(ya(e.start)):yi(e.start,t.start),end:"timeZone"in t.end?t.end.set(ya(e.end)):yi(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;p?w9(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}):g(t):w9(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w9(h)&&w9(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cl.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:C}=e,k=(0,cl.useMemo)(()=>{var e,t;let r;return r=bz(bZ(null!=(e=null==u?void 0:u.start)?e:null,_,S,C,D),bZ(null!=(t=null==u?void 0:u.end)?t:null,_,S,C,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bz(r,{isInvalid:!0,validationErrors:[(yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK).getStringForLocale("rangeReversed",bG())],validationDetails:{...bI,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,C,D]),P=bU({...e,value:a,name:(0,cl.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w9(h)&&p&&b(h,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bJ(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),f=new yI(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yI(t,bJ(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yI(e,bJ({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=yA((l=ba)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bO({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=g_(),b=t.formatValue(v,{month:"long"}),w=y4(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mR(),_=mR(),S=bC(t,r),C=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,cl.useMemo)(()=>bE(r,{accept:e=>e.id!==D}),[r,D]),P={[bj]:k,[bN]:"presentation","aria-describedby":C,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},O=mY(e),R=(0,cl.useRef)(!1),{focusWithinProps:T}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cl.useRef)(bL),j=(0,cl.useRef)(bL);return{groupProps:mj(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":C,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bz(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bz(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.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(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...mB(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cl.useState)(null),x=(0,cl.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=h7({within:!0}),C=mI({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mY(e);return delete k.id,cu().createElement(m$,{values:[[Et,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[gl,{...m,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[v0,g],[wc,i],[w4,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wu,h],[b8,{slots:{start:f,end:p}}],[gd,{slots:{description:y,errorMessage:v}}],[wf,b]]},cu().createElement("div",{...D,...k,...C,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function Eo(e){return cu().createElement(gD,e)}function Ea(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof g0||e instanceof g3||e instanceof g5)return t?ys(e,t):e;{let r=d0()(e).toDate(),n=new g0(r.getFullYear(),r.getMonth()+1,r.getDate());return t?ys(n,t):n}}function Ei(e){if(e)return e.toDate(yb())}function Es(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function El(e){let t=e??"",r=Es(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Eu(){let e=window.i18next.language,t=Es(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Ec=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ei||"en-US"),Ed=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ef={};for(let e=1;e<100;e++)Ef[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Ep={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},Em="[1234567890一二三四五六七八九〇\\d]",Eh={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},Eg={},Ey={"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},Ev={zone:Ey,year:Ef,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:{}},Eb={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(Ey).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,}"},Ew={...Eb,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}"},EE={},Ex=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Ec){return EE[t.toLowerCase()]||(EE[t.toLowerCase()]=new e(t)),EE[t.toLowerCase()]}constructor(e=Ec){this.locale=e,this.lookups={...Ev},this.vars={...Eb};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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);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 r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Eh: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(Eg[e])return Eg[e];if("fullwide"===e||"hanidec"===e)return{group:Em,lookup:{...Eh}};let t=Ep[e];if(!t)return{group:"\\d",lookup:{...Eh}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Eg[e]={group:`[${r}-${n}]`,lookup:o},Eg[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Ew)Ew.hasOwnProperty(r)&&(this.vars[r]=Ew[r].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((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=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 r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}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")}},ED=["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"],E_={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},ES=()=>new Date;function EC(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var Ek=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},EP=["year","month","day","hour","minute","second","millisecond","offset"],EO={};function ER(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 ET=[[/([^\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"]],EN={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," "],...ET],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:ET,id:ET,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ej(e,t=Ec){let r=function(e){if(!EO[e]){var t,r;let n,o,a=Ex.factory(e);EO[e]=new Ek({doneChecker:ER,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:EC(["","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:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Em}{2,4})\\s*\u5E74\\s*(${Em}{1,2})\\s*\u6708\\s*(${Em}{1,2})\\s*\u65E5$`),handler:EC(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:EC(["","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:EC(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=ES(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{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,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?E_[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=ES();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.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:EC(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:EC(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:EC(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:EC(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:EC(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:EC(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:EC(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:EC(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:EC(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:EC(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:EC(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:EC(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:EC(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:EC(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:EC(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:EC(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:EC(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:EC(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:EC(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:EC(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:EC(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:EC(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:EC(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:EC(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:EC(["offset"])}],o=a.baseName.slice(0,5),ED.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(EP.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ef[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return EO[e]}(t),n=function(e,t){let r=EN[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function EA(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ed(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 Ed(t.valueOf()-60*e.offset*1e3):t}function E$(e,t=Ec){let r=Ej(e,t),n=r.invalid?new Ed(NaN):EA(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function EI(e,t=Ec){return e instanceof Date?new Ed(e.valueOf()):"number"==typeof e?new Ed(e):E$(e,t)}Date.fromString=Ed.fromString=E$,Date.fromAny=Ed.fromAny=EI,"u">typeof window&&(window.anyDateParser={fromString:E$,fromAny:EI,fromObject:EA,attempt:Ej});var EM=r(5238),EL=r(3826);let EF=function(e){return null==e};function EB(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}dQ.extend(d1),dQ.extend(EL),dQ.extend(EM);let EU="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EV(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&dQ(e,EU).isValid()}function EW(e){return dQ(e).isToday()}function EH(e){return EV(e)?dQ(e,EU).toDate():null}function Ez(e,t=!1){let r=dQ(e);return t&&(r=r.utc()),r.format(EU)}function EK(e){return dQ(e).toDate()}var EG=new WeakMap;let EZ=new class{register(e,t){EB(this,EG).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EB(this,EG).has(t))return EB(this,EG).get(t)}if(e.language&&EB(this,EG).has(e.language))return EB(this,EG).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EB(this,EG).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EG,{writable:!0,value:new Map})}};function EY(e,t){EZ.register(e,t)}function Eq(e){let t=e??Eu();return EZ.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EJ={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EX(e,t={}){let r=Ej(e,Eu());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EF(r.day)&&EF(r.month)&&(r=Object.assign({},nn(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nn(r,"day"),{date:r.day}));let n=dQ().set(r).toDate();return EF(r.year)&&(t.year=!1),EF(r.month)&&(t.month=!1),EF(r.date)&&(t.day=!1),EQ(n,t)}function EQ(e,t){let r,n=t?.locale??Eu(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...EJ,...{noToday:"am"===o.language},...t},p={calendar:a??Eq(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},m=dQ(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(E0("-"))),"wide"==i&&(t=t.map(E0(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${E1(e)}`),r}let E0=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E1(e){return e.toLocaleTimeString(Eu(),{hour:"2-digit",minute:"2-digit"})}function E2(e,t){return EQ(e,{...t,time:!0})}function E4(e,t){let r=Eq("string"==typeof t?new Intl.Locale(t):t);return r?ys(e,vF(r)):e}function E3(e,t){return new Intl.DurationFormat(Eu(),t).format(e)}function E6(e,t){if(null==e)return null;if("string"==typeof e){let r=Ej(e,Eu());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nn(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nn(r,"day"),...{date:r.day}}),dQ(t).set(r))}return dQ(e)}let E5=["years","months","days","hours","minutes","seconds"],E9={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E8={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function E7(e,t=dQ(),r){let n,o=dQ(t),a=E6(e,o);if(null==a)return null;if("string"==typeof r){let e=E9[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E9[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E5.indexOf(r);for(let o=0;o<E5.length;o++){let a=E5[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E9[s]??s,function(e,t,r,n){let o=E5.indexOf(r),a=E5.indexOf(n),i=E5.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E8};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E9[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let xe={style:"short",localeMatcher:"lookup"};function xt(e,t=dQ(),r){let n=E7(e,t,r);return null==n?null:E3(n,"object"==typeof r&&r.formatOptions?{...xe,...r.formatOptions}:xe)}let xr=(0,cl.createContext)(null);function xn(){let e=du({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cl.useMemo)(()=>{let t=Eu();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cl.useMemo)(()=>{let e=Eq(t);return void 0!==e?vF(e):void 0},[t]),n=(0,cl.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cl.useMemo)(()=>r?ys(yh(yb()),r):yh(yb()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xo=new g0(1793,1,1);var xa={};function xi(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xa={"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:"حقل رقمي"},"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:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\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:"Πεδίο αριθμού"},"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:"שדה מספר"},"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ő"},"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:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"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 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:"Числовое поле"},"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:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številč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ı alanı"},"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:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xs=r(137);function xl(e={}){let{locale:t}=g_();return(0,cl.useMemo)(()=>new(0,xs.K)(t,e),[t,e])}var xu={};function xc(e){var t;let r=(0,cl.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=yA((t=xu)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cl.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cl.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cl.useEffect)(()=>{y.current&&(mV&&mV.clear("assertive"),mW(w,"assertive"))},[w]);let E=mv(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=mv(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=hD();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xu={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"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:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukš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:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};var xd=r(7120);function xf(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xp=(0,cl.createContext)(null),xm=(0,cl.createContext)(null),xh=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,xp);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=g_(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wE(a,t,r):wD(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wE(i,t,r):wD(i,t,r,n));let[d,f]=vG(a,isNaN(i)?NaN:i,s),[p,m]=(0,cl.useState)(()=>isNaN(d)?"":new(0,xs.K)(l,o).format(d)),h=(0,cl.useMemo)(()=>new(0,xd.d)(l,o),[l,o]),g=(0,cl.useMemo)(()=>h.getNumberingSystem(p),[h,p]),y=(0,cl.useMemo)(()=>new(0,xs.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cl.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cl.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bU({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cl.useState)(d),[_,S]=(0,cl.useState)(l),[C,k]=(0,cl.useState)(o);Object.is(d,x)&&l===_&&o===C||(m(b(d)),D(d),S(l),k(o));let P=(0,cl.useMemo)(()=>h.parse(p),[h,p]),O=(e,n=0)=>{if(isNaN(P))return wD(isNaN(n)?0:n,t,r,E);{let n=wD(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:wD(xf(e,P,E),t,r,E)}},R=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||wD(P,t,r,E)>P||xf("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||wD(P,t,r,E)<P||xf("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(wD(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:f,setInputValue:m,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wE(P,t,r):wD(P,t,r,n),f(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cl.useRef)(null),[u,c]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:C,incrementToMax:k,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=yA((o=xa)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mR(i),{focusProps:I}=h4({onBlur(){N()}}),M=xl(g),L=(0,cl.useMemo)(()=>M.resolvedOptions(),[M]),F=xl({...g,currencySign:void 0}),B=(0,cl.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=xc({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:C,onIncrementToMax:k,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cl.useState)(!1),{focusWithinProps:K}=h8({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cl.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y0(t,"wheel",n?void 0:o)}({onScroll:(0,cl.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?C():e.deltaY<0&&P())},[P,C]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";hn()?Z?Y="text":G&&(Y="decimal"):hl()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mY(e),J=(0,cl.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=mv(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cl.useEffect)(()=>{if(!xi()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xi()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vG(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=h9(e,t),d=bU({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bO({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=mY(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bP(t,l,u),bR(e,d,t),(0,cl.useEffect)(()=>{if(t.current instanceof m2(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mj(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||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:l,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cu().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,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:f,validationErrors:p,validationDetails:m}}(e,r),c=(0,cl.useRef)(null);return{inputProps:mj(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bB]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cl.useMemo)(()=>mg(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bP(r,t.numberValue,t.setNumberValue);let ea=mj(U,I,er,{role:null,"aria-roledescription":ha()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mR(),eu=mR(),ec=mj(V,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mj(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mB(e),label:c,validationBehavior:a},s,l),b=mI({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mY(e);return delete w.id,cu().createElement(m$,{values:[[xm,s],[bt,f],[bn,{...p,ref:l}],[wg,{...d,ref:u}],[gl,{slots:{increment:m,decrement:h}}],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&cu().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xg(e,t){return Number.parseInt(EQ(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xy=(0,cl.forwardRef)(function(e,t){let{className:r}=e,n=(0,cl.useContext)(v1),o=(0,cl.useContext)(v2),a=n??o,i=(0,cl.useContext)(xr),s=yb(),l=EQ(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xg(a.visibleRange.start.toDate(s),i),c=a.maxValue?xg(a.maxValue.toDate(s),i):void 0,d=a.minValue?xg(a.minValue.toDate(s),i):void 0,f=(0,cl.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,fd.jsxs)("span",{ref:t,className:r,children:[(0,fd.jsx)("span",{children:l}),(0,fd.jsxs)(xh,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,fd.jsx)(bo,{}),(0,fd.jsxs)(br,{children:[(0,fd.jsx)(gu,{slot:"increment",children:(0,fd.jsx)(f0,{size:8})}),(0,fd.jsx)(gu,{slot:"decrement",children:(0,fd.jsx)(fJ,{size:8})})]})]})]})}),xv="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xb="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xw="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xE="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xx="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xD="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",x_="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xS="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xC({children:e}){let t=(0,cl.useContext)(Ee),r=(0,cl.useContext)(Et),n=t??r,o=dV(()=>n?.close());return(0,fd.jsx)(wd,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xk=(0,cl.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,fd.jsx)(w6,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,fd.jsx)(xC,{children:(0,fd.jsxs)(a?v3:v4,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,fd.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"previous",children:(0,fd.jsx)(f9,{size:16})}),(0,fd.jsx)(xy,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"next",children:(0,fd.jsx)(f8,{size:16})})]}),(0,fd.jsx)(v5,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,fd.jsx)(be,{className:fp()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xP=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),[n,o]=mL({slot:e.slot},t,b8),{locale:a}=g_(),i=b5({...n,locale:a,createCalendar:vF}),s=(0,cl.useRef)(null),{fieldProps:l,inputProps:u}=bA({...n,inputRef:s},i,o),c=(0,cl.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,fd.jsxs)(m$,{values:[[b7,i],[bn,{...u,ref:s}],[bt,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fd.jsx)(br,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,r)=>(0,cl.cloneElement)(e.children(t),{key:r}))}),(0,fd.jsx)(bo,{})]})}),xO=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),n=(0,cl.useContext)(Et);return(r??n).isInvalid?(0,fd.jsx)(ma,{ref:t,size:16,...e}):(0,fd.jsx)(fq,{ref:t,size:16,...e})});class xR{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xT=new Map,xN=(0,cl.forwardRef)(function({segment:e,...t},r){let n=(0,cl.useContext)(b7),o=mh(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cl.useRef)(""),{locale:l,direction:u}=g_(),c=function(){var e;let{locale:t}=g_(),r=yj((e=ba)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cl.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xR(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:m}=bT.get(t),h=e.isPlaceholder?"":e.text,g=(0,cl.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yV({month:"long",timeZone:g.timeZone}),v=yV({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=xc({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,cl.useMemo)(()=>new(0,xd.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=g_(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xT.has(r))return xT.get(r);let n=new Intl.Collator(t,e);return xT.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cl.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cl.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yV({hour:"numeric",hour12:!0}),_=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=yV({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,cl.useMemo)(()=>{if("era"!==e.type)return[];let r=ys(new g0(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:C.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[C,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=k.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};y0((0,cl.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cl.useRef)("");y0(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),y0(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),my(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=ha()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cl.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=mR(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yq({"aria-label":`${j}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mj(b,A,{id:T,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(cu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(hr()?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(),E()}},onFocus:()=>{s.current="",r.current&&y5(r.current,{containingElement:y9(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=h7(),{hoverProps:u,isHovered:c}=go({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cl.useCallback)(e=>{e.stopPropagation()},[]);return(0,fd.jsx)("span",{...mj(mY(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),xj={short:!1,size:"md"},xA=(0,cl.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:m,short:h,size:g,value:y,...v}={...xj,...e},{calendar:b,intlLocale:w,today_:E}=xn(),x=(0,cl.useId)(),D=!!(u??l),_=(0,cl.useMemo)(()=>Ea(n,b),[n,b]),S=(0,cl.useMemo)(()=>Ea(y,b,!0),[y,b]),C=(0,cl.useMemo)(()=>Ea(d,b),[d,b]),k=(0,cl.useMemo)(()=>Ea(f??xo,b),[f,b]),P=(0,cl.useMemo)(()=>a||s,[a,s]),O=(0,cl.useMemo)(()=>(m&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>p?.(Ei(e)))),[m,p]);return(0,fd.jsx)(Eo,{locale:w.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",r),children:(0,fd.jsx)(m$,{values:[[xr,w]],children:(0,fd.jsxs)(Er,{className:fp()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsx)(xP,{id:D?x:void 0,ref:t,className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,fd.jsx)(xN,{className:xb,segment:e}):(0,fd.jsx)(cu().Fragment,{})}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===g,[xD]:"md"===g||!g||0===g.length,[xS]:"lg"===g}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:i})]}),(0,fd.jsx)(xk,{variant:"single",today_:E})]})})})})}),x$=(0,cl.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=xn(),w=(0,cl.useId)(),E=!!(s??i),x=(0,cl.useMemo)(()=>{if(m)return{start:Ea(m[0],y,!1),end:Ea(m[1],y,!1)}},[m,y]),D=(0,cl.useMemo)(()=>{if(t)return{start:Ea(t[0],y,!1),end:Ea(t[1],y,!1)}},[t,y]),_=(0,cl.useMemo)(()=>Ea(c??xo,y,!0),[c,y]),S=(0,cl.useMemo)(()=>Ea(u,y,!0),[u,y]),C=(0,cl.useMemo)(()=>r||a,[r,a]),k=(0,cl.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([Ei(e.start),Ei(e.end)]))),[f,d]);return(0,fd.jsx)(Eo,{locale:v.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",e),children:(0,fd.jsx)(m$,{values:[[xr,v]],children:(0,fd.jsx)(En,{id:E?w:void 0,className:fp()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:k,children:(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xw),slot:"start",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,fd.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xw),slot:"end",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})})]}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===p,[xD]:"md"===p||!p||0===p.length,[xS]:"lg"===p}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:n}),(0,fd.jsx)(xk,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xI=cu().createContext(null);function xM(e){let{children:t}=e,r=(0,cl.useContext)(xI),[n,o]=(0,cl.useState)(0),a=(0,cl.useMemo)(()=>({parent:r,modalCount:n,addModal(){o(e=>e+1),r&&r.addModal()},removeModal(){o(e=>e-1),r&&r.removeModal()}}),[r,n]);return cu().createElement(xI.Provider,{value:a},t)}function xL(e){let t,{modalProviderProps:r}={modalProviderProps:{"aria-hidden":!!(t=(0,cl.useContext)(xI))&&t.modalCount>0||void 0}};return cu().createElement("div",{"data-overlay-container":!0,...e,...r})}function xF(e){return cu().createElement(xM,null,cu().createElement(xL,e))}function xB(e){let t=mk(),{portalContainer:r=t?null:document.body,...n}=e,{getContainer:o}=wa();if(!e.portalContainer&&o&&(r=o()),cu().useEffect(()=>{if(null==r?void 0:r.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let a=cu().createElement(xF,n);return hO().createPortal(a,r)}let xU={},xV=0,xW=!1,xH=null,xz=null;function xK(e={}){let{delay:t=1500,closeDelay:r=500}=e,{isOpen:n,open:o,close:a}=w2(e),i=(0,cl.useMemo)(()=>`${++xV}`,[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(a),u=()=>{xU[i]=f},c=()=>{for(let e in xU)e!==i&&(xU[e](!0),delete xU[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xW=!0,o(),xH&&(clearTimeout(xH),xH=null),xz&&(clearTimeout(xz),xz=null)},f=e=>{e||r<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},r)),xH&&(clearTimeout(xH),xH=null),xW&&(xz&&clearTimeout(xz),xz=setTimeout(()=>{delete xU[i],xz=null,xW=!1},Math.max(500,r)))};return(0,cl.useEffect)(()=>{l.current=a},[a]),(0,cl.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xU[i]&&delete xU[i]},[i]),{isOpen:n,open:e=>{e||!(t>0)||s.current?d():(c(),u(),n||xH||xW?n||d():xH=setTimeout(()=>{xH=null,xW=!0,d()},t))},close:f}}let xG=(0,cl.createContext)(null),xZ=(0,cl.createContext)(null);function xY(e){let t=xK(e),r=(0,cl.useRef)(null),{triggerProps:n,tooltipProps:o}=function(e,t,r){let{isDisabled:n,trigger:o}=e,a=mR(),i=(0,cl.useRef)(!1),s=(0,cl.useRef)(!1),l=()=>{(i.current||s.current)&&t.open(s.current)},u=e=>{i.current||s.current||t.close(e)};(0,cl.useEffect)(()=>{let e=e=>{r&&r.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[r,t]);let c=()=>{s.current=!1,i.current=!1,u(!0)},{hoverProps:d}=go({isDisabled:n,onHoverStart:()=>{"focus"!==o&&("pointer"===hB?i.current=!0:i.current=!1,l())},onHoverEnd:()=>{"focus"!==o&&(s.current=!1,i.current=!1,u())}}),{focusableProps:f}=h9({isDisabled:n,onFocus:()=>{h0()&&(s.current=!0,l())},onBlur:()=>{s.current=!1,i.current=!1,u(!0)}},r);return{triggerProps:{"aria-describedby":t.isOpen?a:void 0,...mj(f,d,{onPointerDown:c,onKeyDown:c,tabIndex:void 0})},tooltipProps:{id:a}}}(e,t,r);return cu().createElement(m$,{values:[[xG,t],[xZ,{...o,triggerRef:r}]]},cu().createElement(h5,{...n,ref:r},e.children))}let xq=(0,cl.forwardRef)(function({UNSTABLE_portalContainer:e,...t},r){[t,r]=mL(t,r,xZ);let n=(0,cl.useContext)(xG),o=xK(t),a=null==t.isOpen&&null==t.defaultOpen&&n?n:o,i=w0(r,a.isOpen)||t.isExiting||!1;return a.isOpen||i?cu().createElement(xB,{portalContainer:e},cu().createElement(xJ,{...t,tooltipRef:r,isExiting:i})):null});function xJ(e){let t=(0,cl.useContext)(xG),r=(0,cl.useRef)(null),[n,o]=(0,cl.useState)(0);my(()=>{r.current&&t.isOpen&&o(r.current.getBoundingClientRect().width)},[t.isOpen,r]);let{overlayProps:a,arrowProps:i,placement:s}=wV({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:n,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=wQ(e.tooltipRef,!!s)||e.isEntering||!1,u=mI({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let r=mY(e,{labelable:!0}),{hoverProps:n}=go({onHoverStart:()=>null==t?void 0:t.open(!0),onHoverEnd:()=>null==t?void 0:t.close()});return{tooltipProps:mj(r,n,{role:"tooltip"})}}(e=mj(e,a),t);return cu().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...a.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},cu().createElement(wv.Provider,{value:{...i,placement:s,ref:r}},u.children))}let xX=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:r}=du({externalModuleName:"@openmrs/esm-styleguide"});return(0,fd.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let n=t&&"PROVISIONAL"===e.certainty,o=1===e.rank?r?.primaryColor??"blue":r?.secondaryColor??"gray";return(0,fd.jsx)(xQ,{color:o,isProvisional:n,name:e.display},e.uuid)})})};function xQ({color:e,isProvisional:t,name:r}){let[n,o]=(0,cl.useState)(!1),[a,i]=(0,cl.useState)(!1),[s,l]=(0,cl.useState)(!1),u=s||a,c=(0,cl.useRef)(null);(0,cl.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||o(!1)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[r,t,u]);let d=fp()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-cohort-builder__diagnosis-tags-module__diagnosisTag___ZEczs"),f=(0,fd.jsxs)(fd.Fragment,{children:[t&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{"aria-hidden":"true",className:"-esm-cohort-builder__diagnosis-tags-module__provisionalMark___nSkIq",children:"?"}),(0,fd.jsxs)("span",{className:"cds--visually-hidden",children:[iz("provisional","Provisional")," "]})]}),(0,fd.jsx)("span",{ref:c,className:"cds--tag__label",children:r})]});return u?(0,fd.jsxs)(xY,{delay:0,closeDelay:150,isOpen:n,onOpenChange:o,children:[(0,fd.jsx)(gu,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>o(!0),children:f}),(0,fd.jsx)(xq,{className:"-esm-cohort-builder__diagnosis-tags-module__tagTooltip___5ARni",placement:"bottom",offset:4,containerPadding:8,children:r})]}):(0,fd.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:f})}let x0={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},x1=({width:e="64",height:t="64"})=>(0,fd.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,fd.jsx)("use",{href:"#omrs-empty-data-illustration"})}),x2=e=>{let t="tablet"===dI(),r=e.launchForm;return(0,fd.jsx)(fv.Layer,{className:x0.layer,children:(0,fd.jsxs)(fv.Tile,{className:x0.tile,children:[(0,fd.jsx)("div",{className:t?x0.tabletHeading:x0.desktopHeading,children:(0,fd.jsx)("h4",{children:e.headerTitle})}),(0,fd.jsx)(x1,{}),(0,fd.jsx)("p",{className:x0.content,children:iz("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fd.jsx)("p",{className:x0.action,children:r&&(0,fd.jsx)(fv.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iz("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},x4=({error:e,headerTitle:t})=>{let r="tablet"===dI();return(0,fd.jsx)(fv.Layer,{children:(0,fd.jsxs)(fv.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,fd.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,fd.jsx)("h4",{children:t})}),(0,fd.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iz("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fd.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iz("errorCopy")})]})})},x3=x4,x6=cu().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dF(),i=window.location??{pathname:""},s=cD(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,fd.jsxs)(fv.SideNav,{"aria-label":iz("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,fd.jsx)(cC,{name:"global-nav-menu-slot"}),r?(0,fd.jsx)(c9,{value:o,fallback:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,fd.jsx)(cc.Provider,{value:o,children:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),x5=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cl.useState)(""),s=(0,cl.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dp()(t,i8,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cl.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:m}=function(e,t=0,r=""){let n=dd(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dP()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let a=`${i6}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},i8);return(0,cl.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cl.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cl.useCallback)(e=>{o(),i(e.trim())},[o]),y=dW((0,cl.useCallback)(()=>{!f&&d&&m(e=>e+1)},[f,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)(fv.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:iz("searchForLocation"),id:s,placeholder:iz("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,fd.jsx)(fv.InlineNotification,{kind:"error",subtitle:iz("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iz("error","Error")})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,fd.jsx)(fv.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,fd.jsx)(fv.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,fd.jsx)(fv.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,fd.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,fd.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iz("noResultsToDisplay")})})}),f&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,fd.jsx)(fv.InlineLoading,{description:iz("loading")})})]})})]})},x9=B("modalState",{modalContainer:null,modalStack:[]}),x8=0;async function x7(e,t,r={}){let n=u2(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=x8++;o=await co({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function De(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dt(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dr(e){return e.find(e=>!De(e))}function Dn(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Do=window.getComputedStyle(document.body).overflow;function Da({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Ds),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Dr(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",x7(r,e.modalName,e.props).then(n=>{De(e)?Dt(e.modalName,n):n?(e.parcel=n,t.prepend(r),Dn(e,Dr(x9.getState().modalStack)===e),n.mountPromise.then(()=>{De(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,Di(e)})):Di(e)},t=>{k(t),Di(e)});break}case"MOUNTING":case"MOUNTED":Dn(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dt(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=x9.getState();x9.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Do,removeEventListener("keydown",Ds)}function Di(e){if(De(e))return;e.state="TO_BE_DELETED";let t=x9.getState();x9.setState({...t,modalStack:[...t.modalStack]})}function Ds(e){"Escape"===e.key&&function(){let[e]=x9.getState().modalStack;e&&Di(e)}()}function Dl(e){x9.subscribe(Da),x9.setState({...x9.getState(),modalContainer:e})}function Du(e,t={},r=()=>{}){let n=()=>{let e=x9.getState().modalStack.find(e=>e.onClose===r);e&&Di(e)};if(u2(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=x9.getState()).modalStack],x9.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var Dc=Object.prototype.hasOwnProperty;let Dd=function(e){if(null==e)return!0;if(to(e)&&(tr(e)||"string"==typeof e||"function"==typeof e.splice||tl(e)||ty(e)||tt(e)))return!e.length;var t=rg(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e6(e))return!t5(e).length;for(var r in e)if(Dc.call(e,r))return!1;return!0},Df=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},Dp=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Df,{notification:e},e.id))})},Dm=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cl.useState)(t);return(0,fd.jsx)(fv.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iz("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iz("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},Dh=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Dm,{notification:e},e.id))})};class Dg{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let Dy=new Dg,Dv=0,Db=new Dg,Dw=0;function DE(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dp,{subject:Dy}))}function Dx(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Dd(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Dy.next({...e,id:Dv++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DD(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dh,{subject:Db}))}function D_(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{Db.next({...e,id:Dw++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DS=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DC=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Dk={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},DP=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cl.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i3}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i3}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dp()(r,i8),i=n?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,f=(0,cl.useMemo)(()=>{if(n)return n?"--"===n?"normal":DS.includes(n)?n.toLowerCase():DC.includes(n)?n:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,m="normal"!==f,h=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:iz("notAvailable","Not available"),w=fp()({[Dk["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[Dk["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[Dk.low]:"low"===f,[Dk.high]:"high"===f,[Dk["off-scale-low"]]:"off_scale_low"===f,[Dk["off-scale-high"]]:"off_scale_high"===f}),E=fp()({[Dk.container]:!0,[Dk.card]:!0,[Dk["critical-value"]]:p,[Dk["abnormal-value"]]:m&&!p}),x=fp()({[Dk.cell]:!0,[w]:!0});return"cell"===i?(0,fd.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,fd.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,fd.jsxs)("div",{className:Dk["label-container"],children:[(0,fd.jsx)("span",{id:h,className:Dk.label,children:r}),m&&(0,fd.jsx)("span",{className:Dk[f.replace("_","-")],title:iz("abnormalValue","Abnormal value")})]}),(0,fd.jsxs)("div",{className:Dk["value-container"],children:[(0,fd.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Dk.value,children:b}),v&&t&&(0,fd.jsx)("span",{id:y,className:Dk.units,children:t})]})]})},DO="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",DR=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,fd.jsx)("div",{className:fp()(DO,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,fd.jsx)("div",{className:fp()(DO,n),...o,children:(0,fd.jsx)(DT,{title:t,illustration:r})})}},DT=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cl.useState)(null);return(0,cl.useEffect)(()=>{nY("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,fd.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,fd.jsx)("p",{children:iz(n.implementationName)}),(0,fd.jsx)("h1",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},DN=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dK(t,e,n,a),u="tablet"===dI(),c=iz("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fd.jsx)(fd.Fragment,{children:e>0&&(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,fd.jsxs)("div",{children:[c,o&&(0,fd.jsx)(cd,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iz("seeAll","See all")})]}),(0,fd.jsx)(fv.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iz("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dj(e){return D$(DM(e,"usual","official"))}function DA(e){return Dj(e)}function D$(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function DI(e){return D$(e)}function DM(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function DL(e,t=dQ()){let r=dQ(t),n=E6(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DF(e,t=dQ()){let r=DL(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E3(r,n)}let DB={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function DU({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsx)("span",{className:DB.primaryIdentifier,children:(0,fd.jsxs)(fv.Tag,{className:DB.tag,type:"gray",children:[e&&t?.text&&(0,fd.jsxs)("span",{className:DB.label,children:[t.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})})}function DV({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsxs)(fv.FormLabel,{className:DB.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,fd.jsxs)("span",{className:DB.label,children:[t?.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})}function DW({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=du(),{primaryIdentifierCode:n}=dY(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,fd.jsx)(fd.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,fd.jsxs)(cu().Fragment,{children:[(0,fd.jsx)("span",{className:DB.identifier,children:r?.coding?.[0]?.code===n?(0,fd.jsx)(DU,{showIdentifierLabel:t,type:r,value:e}):(0,fd.jsx)(DV,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]},e)):""})}let DH={Female:pc,Male:pd,Other:pf,Unknown:pp},Dz=({gender:e})=>{let t=DH[e];return t?(0,fd.jsx)(t,{fill:"#525252"}):null},DK={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function DG({patient:e,renderedFrom:t}){var r;let n,o,a=Dj(e),i=e?.gender&&(o=DK[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iz(n,r),iconKey:o}),s=(0,cl.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,fd.jsxs)("div",{className:DB.patientInfo,children:[(0,fd.jsx)("div",{className:fp()(DB.row,DB.patientNameRow),children:(0,fd.jsxs)("div",{className:DB.flexRow,children:[(0,fd.jsx)("span",{className:DB.patientName,children:a}),i&&(0,fd.jsxs)("div",{className:DB.gender,children:[(0,fd.jsx)(Dz,{gender:i.iconKey}),(0,fd.jsx)("span",{children:i.displayText})]}),(0,fd.jsx)(cC,{className:DB.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fd.jsxs)("div",{className:DB.demographics,children:[e.birthDate&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{children:DF(e.birthDate)}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"}),(0,fd.jsx)("span",{children:EX(e.birthDate,{time:!1})}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]}),(0,fd.jsx)(DW,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fd.jsx)(cC,{className:DB.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DZ=r(1673);function DY({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cl.useState)(!1),{extensions:i}=c_(r),s="tablet"===dI(),l=dV(()=>a(!1),o),u=(0,cl.useRef)(null),c=(0,cl.useRef)(null),d=(0,cl.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,cl.useCallback)(()=>a(e=>!e),[]),h=(0,cl.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cl.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cl.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cl.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,fd.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:l,children:[(0,fd.jsxs)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},f_),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:g,ref:u,children:[(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iz("actions","Actions")})," ",(0,fd.jsx)(DZ.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fd.jsx)(cC,{name:r,state:y},r)}),(0,fd.jsx)("span",{})]})]})})}var Dq=r(6767),DJ=r.n(Dq);function DX(e){let{patientPhotoConceptUuid:t}=du({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i3}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cW()(e?r:null,i8),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let DQ=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cU.useTranslation)();return(0,fd.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fd.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fd.jsx)("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"})]})},D0="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function D1({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DX(e),[a,i]=(0,cl.useState)(null),[s,l]=(0,cl.useState)(!1),u=(0,cl.useMemo)(()=>DJ().generate(e),[e]);(0,cl.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cl.useMemo)(()=>r||(a?iz("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iz("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,fd.jsx)(fv.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,fd.jsx)(DQ,{"aria-label":iz("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("img",{className:D0,src:a,alt:c,title:t})}):(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("div",{className:D0,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let D2=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-cohorts","omrs-pict-concept-dictionary","omrs-pict-ct-scan","omrs-pict-data-entry","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-documents","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-reports","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-system-administration","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],D4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),D3=D4,D6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),D5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),D9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),D8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),D7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),_e=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),_t=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),_r=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),_n=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),_o=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),_a=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),_i=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),_s=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),_l=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),_u=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),_c=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),_d=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),_f=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),_p=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),_m=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),_h=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),_g=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_y=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_v=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_b=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_w=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_E=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),_x=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_D=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),__=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),_S=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_C=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_k=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_P=_i,_O=_g,_R=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cl.useRef)(document.getElementById(e));return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(_T,{ref:n,pictogram:e,pictogramProps:r})})})),_T=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fd.jsx)("svg",{ref:r,className:fp()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,fd.jsx)("use",{href:`#${e}`})})})),_N=({children:e})=>"tablet"===dI()?(0,fd.jsx)(fv.Layer,{children:e}):(0,fd.jsx)(fd.Fragment,{children:e}),_j=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,cl.useState)(r),[h,g]=(0,cl.useState)(!0),[y,v]=(0,cl.useState)(!1),b=(0,cl.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cl.useCallback)(()=>{v(!0),b()},[b]);return(0,cl.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cl.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:p,"aria-label":iz("closeSnackbar","Close snackbar"),className:fp()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iz("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},_A=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_j,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_$=new Dg,_I=0;function _M(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_A,{subject:_$}))}function _L(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_$.next({...e,id:_I++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _F=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cl.useCallback)(()=>{s(),t()},[t,s]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_B=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_F,{toast:e,closeToast:()=>n(e)},e.id))})},_U=new Dg,_V=0;function _W(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_B,{subject:_U}))}function _H(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{_U.next({...e,id:_V++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let _z="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_K=new Uint8Array(16),_G=[];for(let e=0;e<256;++e)_G.push((e+256).toString(16).slice(1));let _Z=function(e,t,r){if(_z&&!t&&!e)return _z();let n=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(_K)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(_G[e[t+0]]+_G[e[t+1]]+_G[e[t+2]]+_G[e[t+3]]+"-"+_G[e[t+4]]+_G[e[t+5]]+"-"+_G[e[t+6]]+_G[e[t+7]]+"-"+_G[e[t+8]]+_G[e[t+9]]+"-"+_G[e[t+10]]+_G[e[t+11]]+_G[e[t+12]]+_G[e[t+13]]+_G[e[t+14]]+_G[e[t+15]]).toLowerCase()}(n)};async function _Y(e,t){let{openedGroup:r}=u4.getState();if(r){if(r.groupName===e&&_X(r.props,t))return!0;else if(!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u4.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function _q(e){let{openedGroup:t,openedWindows:r}=u4.getState();if(t){if(r.length>0&&!(e||await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u4.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function _J(e,t=null,r=null,n=null){let o=u4.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u3(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=u6(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=u5(e);if(i&&(i.groupName!==l.name||!_X(i.props,n)))return!!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(_X(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&_X(d.props,t)?((i||u!==o.openedWindows.length-1)&&u4.setState(_9.restoreWindow(o,s)),!0):!!await _1({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await _1({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await _1({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function _X(e,t){return null==e||null==t||R(e,t)}function _Q(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}function _0(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let r=Du("workspace2-close-prompt",{size:"sm",onConfirm:()=>{r(),t(!0)},onCancel:()=>{r(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function _1(e){let{openedWindows:t}=u4.getState(),r=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":r=t.flatMap(e=>_Q(e));break;case"CLOSE_WINDOW":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n);break}case"CLOSE_WORKSPACE":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":r=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>_Q(e))}return _0(r)}function _2(e,t){return _0(_Q(e,t))}function _4(e,t){let r=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return r<0?e:0===r?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,r)}}function _3(e,t,r,n){let{registeredWorkspacesByName:o}=u4.getState(),a=o[r];if(!a)throw Error(`No workspace named "${r}" registered`);let i=o[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==a.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);if(a.window!==e.windowName)throw Error(`Cannot open child workspace ${r} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e,l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{...e,openedWorkspaces:[...u,Sr(r,n)]}}function _6(e,t,r){let n=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(n<0)return e;let o=e.openedWorkspaces[n];if(Object.keys(r).every(e=>o[e]===r[e]))return e;let a=[...e.openedWorkspaces];return a[n]={...o,...r},{...e,openedWorkspaces:a}}function _5(e,t,r){let n=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(n<0)return e;let o=e.openedWindows[n],a=_6(o,t,r);if(a===o)return e;let i=[...e.openedWindows];return i[n]=a,{...e,openedWindows:i}}let _9={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(r<0)return e;let n=_4(e.openedWindows[r],t),o=[...e.openedWindows],a=e.isMostRecentlyOpenedWindowHidden;if(null===n){let t=r===e.openedWindows.length-1;o.splice(r,1),t&&o.length>0&&(a=!1)}else o[r]=n;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let i=[...e.openedWindows];return i[a]=_3(e.openedWindows[a],t,r,n),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,r)=>_5(e,t,{hasUnsavedChanges:r}),setWorkspaceTitle:(e,t,r)=>_5(e,t,{title:r})};function _8(){return cy(u4,_9)}let _7=()=>(0,cl.useContext)(cj),Se=()=>Object.keys(u4.getState().registeredWorkspacesByName);function St(e,t,r){let n=e.openedWorkspaces[e.openedWorkspaces.length-1];return(n?t[n.workspaceName]?.width:void 0)??r[e.windowName]?.width??"narrow"}function Sr(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:_Z()}}function Sn(e,t,r){let n=u4.getState().registeredWorkspacesByName[e];return n?{windowName:n.window,openedWorkspaces:[Sr(e,t)],props:r??null,maximized:!1}:null}let So=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let{setHasUnsavedChanges:n,setWorkspaceTitle:o}=_7();return(0,cl.useEffect)(()=>{n(r??!1)},[r,n]),(0,cl.useEffect)(()=>{o(e)},[e,o]),(0,fd.jsx)(fd.Fragment,{children:t})};function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(t){Sl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ss(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Su(e){return(Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sc(e,t){return(Sc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sf=function(e){var t=cl.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&Sc(i,t);var r,n,o,a=(r=function(){if("u"<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=Su(i);e=r?Reflect.construct(t,arguments,Su(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 Sd(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),Sl(Sd(t=a.call(this,e)),"handleRef",function(e){t.el=e}),Sl(Sd(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Sl(Sd(t),"getParcelProps",function(){var e=Si(Si({},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 n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Si({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 cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cl.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ss(i.prototype,n),o&&Ss(i,o),i}();Sl(Sf,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Sp=r(4535),Sm=r(771);let Sh={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sg=e=>e.registeredWorkspacesByName,Sy=({lifeCycle:e,openedWorkspace:t,openedWindow:r,groupProps:n,actions:o,renderChrome:a,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,cl.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:a=!1}=e;return n?!!(a||await o.promptForClosingWorkspaces())&&(o.closeWorkspace(r.openedWorkspaces[0].workspaceName),!0):!!(a||await o.promptForClosingWorkspaces(t.workspaceName))&&(o.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let a=t.workspaceName,{openedWorkspaces:i}=r,s=i.findIndex(e=>e.workspaceName===a);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await o.promptForClosingWorkspaces(i[s+1].workspaceName)||o.openChildWorkspace(a,e,n||{})},setWorkspaceTitle:e=>o.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>o.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:n,workspaceMeta:u4.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:r.windowName,showActionMenu:l},[t,r,n,o,i,s,l]),c=!a&&!s,d=(0,cl.useMemo)(()=>e?(0,fd.jsx)(Sf,{config:e,mountParcel:ci,wrapWith:"div",wrapClassName:fp()(Sh.workspaceContent,{[Sh.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null,[e,t.workspaceName,u,c]);return a?(0,fd.jsx)(Sv,{openedWorkspace:t,openedWindow:r,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d}):d??(0,fd.jsx)(fv.InlineLoading,{className:fp()(Sh.loader,{[Sh.hiddenExtraWorkspace]:c}),description:`${iz("loading")}`})},Sv=({openedWorkspace:e,openedWindow:t,isRootWorkspace:r,showActionMenu:n,closeWindow:o,children:a})=>{let i=dI(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:f,setWindowMaximized:p,hideWindow:m}=_8(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=St(t,c,u),w=v?.icon,E=v?.canMaximize,x=!!s&&d[s.groupName]?.persistence==="closable",D=!!w&&!x,_=l.findIndex(e=>e.windowName===h)<l.length-1||f,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,fd.jsxs)("div",{className:fp()(Sh.workspaceOuterContainer,{[Sh.narrowWorkspace]:"narrow"===b,[Sh.widerWorkspace]:"wider"===b,[Sh.extraWideWorkspace]:"extra-wide"===b,[Sh.isActionMenuOpened]:S}),children:[(0,fd.jsx)("div",{className:fp()(Sh.workspaceSpacer,{[Sh.hidden]:_})}),(0,fd.jsx)("div",{className:fp()(Sh.workspaceMiddleContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r,[Sh.showActionMenu]:n}),children:(0,fd.jsx)("div",{className:fp()(Sh.workspaceInnerContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r}),children:a?(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)(fv.Header,{"aria-label":iz("workspaceHeader"),className:Sh.header,children:[(0,fd.jsx)(fv.HeaderName,{prefix:"",children:y}),(0,fd.jsx)("div",{className:Sh.overlayHeaderSpacer}),(0,fd.jsx)(fv.HeaderGlobalBar,{className:Sh.headerButtons,children:dM(i)?(0,fd.jsxs)(fd.Fragment,{children:[(E||g)&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":g?iz("minimize"):iz("maximize"),onClick:()=>p(h,!g),children:g?(0,fd.jsx)(Sp.Xj,{}):(0,fd.jsx)(Sp.hz,{})}),D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(fK,{})}),!x&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:o,children:(0,fd.jsx)(pe,{})})]}):(0,fd.jsxs)(fd.Fragment,{children:[D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(Sm.d3,{})}),(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:()=>{x?_q():o()},children:(0,fd.jsx)(pe,{})})]})})]}),a]}):(0,fd.jsx)(fv.InlineLoading,{className:Sh.loader,description:`${iz("loading")} ...`})})})]})},Sb=({openedWindow:e,groupProps:t,actions:r,renderChrome:n,showActionMenu:o})=>{let{openedWorkspaces:a}=e,[i,s]=(0,cl.useState)({}),l=cg(u4,Sg);return(0,cl.useEffect)(()=>{let e=!1;return Promise.all(a.map(async e=>{let t=l[e.workspaceName];if(!t)return null;let{moduleName:r,component:n}=t;return[e.uuid,await fe(r,n)]})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))}),()=>{e=!0}},[a,l]),(0,fd.jsx)(fd.Fragment,{children:a.map((s,l)=>(0,fd.jsx)(Sy,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:r,renderChrome:n,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===a.length-1,showActionMenu:o},s.uuid))})},Sw=e=>e.registeredWorkspacesByName,SE=({name:e,workspaceProps:t,windowProps:r,groupProps:n,onWindowChanged:o})=>{let a=cg(u4,Sw),i=cg(u4,t=>{let r=t.registeredWorkspacesByName[e]?.window;return r?t.registeredWindowsByName[r]:void 0}),s={name:e,workspaceProps:t,windowProps:r,groupProps:n},l=(0,cl.useRef)(),u=(0,cl.useRef)(null);if(!l.current){let o=Sn(e,t,r);l.current=U({openedWindow:o,groupProps:n??null}),o&&(u.current=s)}let c=l.current;(0,cl.useEffect)(()=>{let o=u.current;if(o&&o.name===e&&R(o.workspaceProps,t)&&R(o.windowProps,r)&&R(o.groupProps,n))return;let a=Sn(e,t,r);c.setState({openedWindow:a,groupProps:n??null},!0),u.current=a?s:null},[e,t,r,n,a,c]);let d=(0,cl.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let r=t(e.openedWindow);return r===e.openedWindow?e:{...e,openedWindow:r}})}return{closeWorkspace(e){t(t=>_4(t,e))},openChildWorkspace(e,r,n){t(t=>_3(t,e,r,n))},setWorkspaceTitle(e,r){t(t=>_6(t,e,{title:r}))},setHasUnsavedChanges(e,r){t(t=>_6(t,e,{hasUnsavedChanges:r}))},promptForClosingWorkspaces(t){let{openedWindow:r}=e.getState();return r?_2(r,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:f,groupProps:p}=cg(c),m=f?.openedWorkspaces[f.openedWorkspaces.length-1],h=m?.workspaceName??null,g=m?.title??"",y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{b.current=o}),(0,cl.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,fd.jsx)("div",{className:"-esm-cohort-builder__exported-workspace-module__exportedWorkspace___FZHbG",children:f?(0,fd.jsx)(Sb,{openedWindow:f,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},Sx="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",SD="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",S_="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",SS="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function SC({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,fd.jsxs)(fd.Fragment,{children:[e({size:16}),t?(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let Sk=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dI(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=_8(),{extension:c}=(0,cl.useContext)(cc),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],p=null!=f,m=p&&(d<i.length-1||u),h=p&&!m,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)m?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;_J(e,t,r)}};return"tablet"===a||"phone"===a?(0,fd.jsxs)(fv.Button,{className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fd.jsx)("span",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,fd.jsx)("span",{children:t})]}):(0,fd.jsx)(fv.IconButton,{align:"left","aria-label":t,className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,fd.jsx)("div",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SP({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,fd.jsx)(fv.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?f7:f5,children:e?iz("showLess","Show less"):iz("showMore","Show more")})}let SO={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},SR=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i3}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cW()(t,i8),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cl.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)("p",{className:SO.heading,children:[iz("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EK(e?.startDate).getTime()-EK(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fd.jsx)("li",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fd.jsx)("li",{children:"--"})})(),t.length>3&&(0,fd.jsx)("li",{className:SO.link,children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists`,children:iz("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},ST=({patientId:e})=>{let{patient:t,isLoading:r}=dZ(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("address","Address")}),(0,fd.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,fd.jsxs)("li",{children:[iz(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,fd.jsxs)("li",{children:[iz(e,e),": ",t]},`address-${e}`)):(0,fd.jsx)("li",{children:"--"})})]})},SN=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=du({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dp()(`${i3}/patient/${e}?v=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)))`,i8);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cl.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cl.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iz(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("contactDetails","Contact Details")}),t?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,fd.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,fd.jsx)("li",{children:"--"})})]})},Sj=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i3}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cW()(e?t:null,i8),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("relationships","Relationships")}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:t&&t.length>0?(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsxs)("li",{className:SO.relationship,children:[(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fd.jsx)("div",{children:e.relationshipType}),(0,fd.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iz("yearAbbreviation","yr"):iz("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fd.jsx)("li",{children:"--"})})]})};function SA({patientId:e,deceased:t}){return(0,fd.jsxs)("div",{className:fp()(SO.contactDetails,{[SO.deceased]:t}),children:[(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(ST,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SN,{patientUuid:e})})]}),(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(Sj,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SR,{patientUuid:e})})]})]})}function S$(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let SI="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SM({workspaceGroup:e,groupProps:t}){let r=dI(),{persistence:n}=e;return(0,fd.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,fd.jsxs)("div",{className:SI,children:["closable"==n&&dM(r)&&(0,fd.jsx)(fv.IconButton,{align:"left",onClick:()=>_q(),label:iz("close"),kind:"ghost",children:(0,fd.jsx)(pe,{})}),(0,fd.jsx)(cc.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fd.jsx)(cC,{className:SI,name:e.name,state:{groupProps:t}})})]})})}function SL(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}function SF(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(SB,{}))}function SB(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=_8();if((0,cl.useEffect)(()=>lm("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(_q().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SL(t),a=SL(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,a,i)&&o(_q().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(t=>(0,fd.jsx)(SU,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,fd.jsx)(SM,{workspaceGroup:o,groupProps:e.props})]})}function SU({openedWindow:e,groupProps:t,showActionMenu:r}){let{windowName:n}=e,o=(0,cl.useMemo)(()=>({closeWorkspace(e){u4.setState(t=>_9.closeWorkspace(t,e))},openChildWorkspace(e,t,r){u4.setState(n=>_9.openChildWorkspace(n,e,t,r))},setWorkspaceTitle(e,t){u4.setState(r=>_9.setWorkspaceTitle(r,e,t))},setHasUnsavedChanges(e,t){u4.setState(r=>_9.setHasUnsavedChanges(r,e,t))},promptForClosingWorkspaces(e){let t=u4.getState().openedWindows.find(e=>e.windowName===n);return t?_2(t,e):Promise.resolve(!0)}}),[n]);return(0,fd.jsx)(Sb,{openedWindow:e,groupProps:t,actions:o,renderChrome:!0,showActionMenu:r})}function SV(e,t,r){if(null==e)return r;let n=Es(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Es(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SW(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SH(e){return!!e&&e.constructor===Object}var Sz=r(7638);function SK(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function SG(e,t){return Sz(function(e){let t=e.indexOf("-");if(t>=0){let r=SK(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SK(e)}(t),e,{includePrerelease:!0})}async function SZ(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await SY(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SY(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function Sq(e,t,r,n){}function SJ(e){}function SX(e){return Promise.resolve([])}function SQ(e){return Promise.resolve([])}function S0(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function S1(e){return()=>{}}function S2(){return!0}}}]);
28
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let fs={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function fl(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fs.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fs.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fs.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fs.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fs.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fs.SMALL_DESKTOP_MAX)}let fu=!1;function fc(){fu||(window.addEventListener("resize",fl),fl(),fu=!0)}var fd=r(4848),ff=r(6942),fp=r.n(ff);function fm({title:e,children:t}){let r="tablet"===dI();return(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,fd.jsx)("h4",{children:e}),t]})}let fh=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fg={primaryColor:{_type:no.String,_description:"The color for displaying primary diagnoses tags",_default:"blue",_validators:[od.oneOf(fh)]},secondaryColor:{_type:no.String,_description:"The color for displaying secondary diagnoses tags",_default:"gray",_validators:[od.oneOf(fh)]}},fy={"Brand color #1":{_default:"#005d5d",_type:no.String},"Brand color #2":{_default:"#004144",_type:no.String},"Brand color #3":{_default:"#007d79",_type:no.String},excludePatientIdentifierCodeTypes:{uuids:{_type:no.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:no.UUID}}},implementationName:{_type:no.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:no.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[od.isUrl]},alt:{_type:no.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:no.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:no.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[od.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:no.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:no.String}},diagnosisTags:fg};var fv=r(9536);let fb={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fw=e=>(0,fd.jsx)(fv.TableBatchActions,{translateWithId:(e,t)=>{let r=fb[e];return r?iz(r,e,t):e},...e}),fE="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",fx="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",fD="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",f_="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fS=(0,cl.createContext)(null);function fC(){let e=(0,cl.useContext)(fS);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fk({menuTitle:e,children:t}){let[r,n]=cu().useState(!1),o=dV(()=>n(!1),r),a="tablet"===dI(),i=(0,cl.useCallback)(()=>n(e=>!e),[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(null),u=(0,cl.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cl.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cl.useMemo)(()=>({closeMenu:f}),[f]),m=(0,cl.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),h=cl.Children.toArray(t);(0,cl.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cl.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cl.isValidElement)(e)?(0,cl.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:g,index:t}):e);return(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:o,children:[(0,fd.jsx)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},f_),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,fd.jsx)(fS.Provider,{value:p,children:y})}),(0,fd.jsx)("span",{})]})]})}function fP(e){let t=(0,cl.useContext)(fS);return(0,fd.jsx)(fv.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var fO=r(8168);(en=ea||(ea={})).Pop="POP",en.Push="PUSH",en.Replace="REPLACE";var fR=function(e){return e},fT="beforeunload";function fN(e){e.preventDefault(),e.returnValue=""}function fj(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function fA(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let f$=(0,cl.createContext)(null),fI=(0,cl.createContext)(null);function fM(e,t){if(!e)throw Error(t)}function fL(){return null!=(0,cl.useContext)(fI)}function fF(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ea.Pop,navigator:a,static:i=!1}=e;fL()&&fM(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cl.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=fA(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=(0,cl.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:f,key:p}},[s,u,c,d,f,p]);return null==m?null:(0,cl.createElement)(f$.Provider,{value:l},(0,cl.createElement)(fI.Provider,{children:r,value:{location:m,navigationType:o}}))}function fB(e){let{basename:t,children:r,window:n}=e,o=(0,cl.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,fR({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=ea.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=ea.Pop,s=o(),l=s[0],u=s[1],c=fj(),d=fj();function f(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function p(e,t){return void 0===t&&(t=null),fR((0,fO.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?fA(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,fO.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:f,push:function e(t,o){var a=ea.Push,i=p(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=ea.Replace,a=p(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(fT,fN),function(){t(),d.length||r.removeEventListener(fT,fN)}}}}({window:n}));let a=o.current,[i,s]=(0,cl.useState)({action:a.action,location:a.location});return(0,cl.useLayoutEffect)(()=>a.listen(s),[a]),(0,cl.createElement)(fF,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let fU=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],fV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),fK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),fG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),fZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),fY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),fq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),fJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),fX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),fQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),f2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),f4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),f3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),f6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),f5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),f9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),f8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),f7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pe=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document",iconProps:e})})),po=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pa=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-download",iconProps:e})})),pi=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),ps=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),pl=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pu=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pc=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pd=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),pf=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pp=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),pm=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),ph=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group",iconProps:e})})),pg=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),py=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pv=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pb=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pw=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),pE=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),px=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),pD=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),p_=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pS=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pC=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pk=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pP=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),pO=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pR=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pT=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pN=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pj=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),pA=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),p$=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pI=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pM=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pL=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pF=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pB=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-report",iconProps:e})})),pK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),pG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-save",iconProps:e})})),pZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-search",iconProps:e})})),pY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),pq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),pJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),pX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),pQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),p2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-table",iconProps:e})})),p4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-time",iconProps:e})})),p3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),p6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),p5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),p9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),p8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),p7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),me=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mo=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-view",iconProps:e})})),ma=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(mf,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mi=ma,ms=po,ml=p_,mu=pv,mc=pX,md=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cl.useRef)(e?document.getElementById(e):void 0);return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(mf,{ref:n,icon:e,iconProps:r})})})),mf=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cl.useRef)(null);return(0,cl.useImperativeHandle)(r,()=>i.current),(0,cl.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fd.jsx)("svg",{ref:i,className:fp()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,fd.jsx)("use",{href:`#${e}`})})})),mp=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cU.useTranslation)(),a=(fL()||fM(!1),(0,cl.useContext)(fI).location),i=(0,cl.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{className:fp()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,fd.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,fd.jsx)(md,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,fd.jsx)("span",{children:o(t)})]})})},e)};function mm(e){return function({basePath:t}){return(0,fd.jsx)(fB,{children:(0,fd.jsx)(mp,{basePath:t,...e})})}}function mh(e){let t=(0,cl.useRef)(null);return(0,cl.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mg(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let my="u">typeof document?cu().useLayoutEffect:()=>{};function mv(e){let t=(0,cl.useRef)(null);return my(()=>{t.current=e},[e]),(0,cl.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mb={prefix:String(Math.round(1e10*Math.random())),current:0},mw=cu().createContext(mb),mE=cu().createContext(!1),mx=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mD="function"==typeof cu().useId?function(e){let t=cu().useId(),[r]=(0,cl.useState)(mk()),n=r?"react-aria":`react-aria${mb.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cl.useContext)(mw),r=function(e=!1){let t=(0,cl.useContext)(mw),r=(0,cl.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cu().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mx.get(e);null==r?mx.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mx.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function m_(){return!1}function mS(){return!0}function mC(e){return()=>{}}function mk(){return"function"==typeof cu().useSyncExternalStore?cu().useSyncExternalStore(mC,m_,mS):(0,cl.useContext)(mE)}let mP=!!("u">typeof window&&window.document&&window.document.createElement),mO=new Map;function mR(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mD(t),a=(0,cl.useRef)(null);if(s&&s.register(a,o),mP){let e=mO.get(o);e&&!e.includes(n)?e.push(n):mO.set(o,[n])}return my(()=>()=>{s&&s.unregister(a),mO.delete(o)},[o]),(0,cl.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mT(e=[]){let t=mR(),[r,n]=function(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mv(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});my(()=>{n.current&&o()});let a=mv(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cl.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return my(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mO.delete(e)}));let mN=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mj(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mg(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mN(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mO.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mO.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mA=Symbol("default");function m$({values:e,children:t}){for(let[r,n]of e)t=cu().createElement(r.Provider,{value:n},t);return t}function mI(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mM(e,t){let r=(0,cl.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mA;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mL(e,t,r){let{ref:n,...o}=mM(r,e.slot)||{},a=mh((0,cl.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mj(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mF(e=!0){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(!1),o=(0,cl.useCallback)(e=>{n.current=!0,r(!!e)},[]);return my(()=>{n.current||r(!1)},[]),[o,t]}function mB(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mU=(0,cl.createContext)(null),mV=null;function mW(e,t="assertive",r=7e3){mV?mV.announce(e,t,r):(mV=new mH,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mV.announce(e,t,r):setTimeout(()=>{(null==mV?void 0:mV.isAttached())&&(null==mV||mV.announce(e,t,r))},100))}class mH{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{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"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mz=new Set(["id"]),mK=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mG=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mZ=/^(data-.*)$/;function mY(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mz.has(t)||r&&mK.has(t)||n&&mG.has(t)||(null==o?void 0:o.has(t))||mZ.test(t))&&(a[t]=e[t]);return a}let mq=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],mJ=mq.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mq.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mX=mq.join(':not([hidden]):not([tabindex="-1"]),');function mQ(e){return e.matches(mJ)}function m0(e){return e.matches(mX)}let m1=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m2=e=>e&&"window"in e&&e.window===e?e:m1(e).defaultView||window;function m4(e){if(function(){if(null==m3){m3=!1;try{document.createElement("div").focus({get preventScroll(){return m3=!0,!0}})}catch{}}return m3}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m3=null;function m6(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m5(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m9(e){let t=(0,cl.useRef)({isFocused:!1,observer:null});my(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mv(t=>{null==e||e(t)});return(0,cl.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m6(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let m8=!1;function m7(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function he(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ht(e){let t=null;return()=>(null==t&&(t=e()),t)}let hr=ht(function(){return he(/^Mac/i)}),hn=ht(function(){return he(/^iPhone/i)}),ho=ht(function(){return he(/^iPad/i)||hr()&&navigator.maxTouchPoints>1}),ha=ht(function(){return hn()||ho()});ht(function(){return hr()||ha()});let hi=ht(function(){return m7(/AppleWebKit/i)&&!hs()}),hs=ht(function(){return m7(/Chrome/i)}),hl=ht(function(){return m7(/Android/i)}),hu=ht(function(){return m7(/Firefox/i)}),hc=new Map,hd=new Set;function hf(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hc.delete(r.target)),0===hc.size)){for(let e of hd)e();hd.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hc.get(r.target);n||(n=new Set,hc.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hp(e){requestAnimationFrame(()=>{0===hc.size?e():hd.add(e)})}"u">typeof document&&("loading"!==document.readyState?hf():document.addEventListener("DOMContentLoaded",hf));let hm="default",hh="",hg=new WeakMap;function hy(e){if(ha())"disabled"===hm&&(hm="restoring",setTimeout(()=>{hp(()=>{if("restoring"===hm){let t=m1(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hh||""),hh="",hm="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hg.has(e)){let t=hg.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hg.delete(e)}}let hv=cu().createContext({register:()=>{}});function hb(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hw(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hE(e,t,r){var n=hb(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hx(e,t){my(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hD(){let e=(0,cl.useRef)(new Map),t=(0,cl.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cl.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cl.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cl.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hv.displayName="PressResponderContext";function h_(e,t){return!!t&&!!e&&e.contains(t)}function hS(e){return e.target}function hC(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hu()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hr()?a=!0:i=!0);let u=hi()&&hr()&&!ho()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hC.isOpening=r,m4(e),e.dispatchEvent(u),hC.isOpening=!1}function hk(e){return 0===e.mozInputSource&&!!e.isTrusted||(hl()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hC.isOpening=!1;var hP=r(1779),hO=r.n(hP),hR=new WeakMap;class hT{continuePropagation(){hE(this,hR,!1)}get shouldStopPropagation(){var e;return e=hb(this,hR,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hw(this,hR,{writable:!0,value:void 0}),hE(this,hR,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hN=Symbol("linkClicked");function hj(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cl.useContext)(hv);if(t){let{register:r,...n}=t;e=mj(n,e),r()}return hx(t,e.ref),e}(e),[m,h]=(0,cl.useState)(!1),g=(0,cl.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hD(),b=mv((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hT("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mv((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new hT("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hT("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mv((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hT("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mv(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hI(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hy(t.target),t.disposables))r();t.disposables=[]}}),D=mv(e=>{c&&x(e)}),_=mv(e=>{null==i||i(e)}),S=mv((e,t)=>{if(i){let r=new MouseEvent("click",e);m5(r,t),i(m6(r))}}),C=(0,cl.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(h$(t.nativeEvent,t.currentTarget)&&h_(t.currentTarget,hS(t.nativeEvent))){var n;hM(hS(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m1(t.currentTarget),"keyup",mg(t=>{h$(t,n)&&!t.repeat&&h_(n,hS(t))&&e.target&&E(hI(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hr()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||h_(t.currentTarget,hS(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hC.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hk(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(hI(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&h$(t,e.target)){hM(hS(t),t.key)&&t.preventDefault();let r=hS(t),o=h_(e.target,hS(t));w(hI(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hA(e.target)&&h_(e.target,r)&&!t[hN]&&(t[hN]=!0,hC(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!h_(t.currentTarget,hS(t.nativeEvent)))return;if(o=t.nativeEvent,!hl()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(ha()){if("default"===hm){let t=m1(e);hh=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hm="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hg.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hS(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m1(t.currentTarget),"pointerup",r,!1),y(m1(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(h_(t.currentTarget,hS(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!mQ(e);)e=e.parentElement;let t=m2(e),r=t.document.activeElement;if(!r||r===e)return;m8=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m4(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m4(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m8=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{h_(t.currentTarget,hS(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hI(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hI(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(h_(e.target,hS(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m4(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{h_(e.currentTarget,hS(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cl.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof m2(e).Element&&"auto"===m2(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,cl.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hy(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mj(p,C)}}function hA(e){return"A"===e.tagName&&e.hasAttribute("href")}function h$(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m2(t).HTMLInputElement&&!hF(t,r)||t instanceof m2(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hA(t))&&"Enter"!==r)}function hI(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hM(e,t){return e instanceof HTMLInputElement?!hF(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hA(e))}let hL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hF(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hL.has(e.type)}let hB=null,hU=new Set,hV=new Map,hW=!1,hH=!1,hz={Tab:!0,Escape:!0};function hK(e,t){for(let r of hU)r(e,t)}function hG(e){hW=!0,e.metaKey||!hr()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hB="keyboard",hK("keyboard",e))}function hZ(e){hB="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hW=!0,hK("pointer",e))}function hY(e){hk(e)&&(hW=!0,hB="virtual")}function hq(e){e.target!==window&&e.target!==document&&!m8&&e.isTrusted&&(hW||hH||(hB="virtual",hK("virtual",e)),hW=!1,hH=!1)}function hJ(){m8||(hW=!1,hH=!0)}function hX(e){if("u"<typeof window||hV.get(m2(e)))return;let t=m2(e),r=m1(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hW=!0,n.apply(this,arguments)},r.addEventListener("keydown",hG,!0),r.addEventListener("keyup",hG,!0),r.addEventListener("click",hY,!0),t.addEventListener("focus",hq,!0),t.addEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hZ,!0),r.addEventListener("pointermove",hZ,!0),r.addEventListener("pointerup",hZ,!0)),t.addEventListener("beforeunload",()=>{hQ(e)},{once:!0}),hV.set(t,{focus:n})}let hQ=(e,t)=>{let r=m2(e),n=m1(e);t&&n.removeEventListener("DOMContentLoaded",t),hV.has(r)&&(r.HTMLElement.prototype.focus=hV.get(r).focus,n.removeEventListener("keydown",hG,!0),n.removeEventListener("keyup",hG,!0),n.removeEventListener("click",hY,!0),r.removeEventListener("focus",hq,!0),r.removeEventListener("blur",hJ,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hZ,!0),n.removeEventListener("pointermove",hZ,!0),n.removeEventListener("pointerup",hZ,!0)),hV.delete(r))};function h0(){return"pointer"!==hB}"u">typeof document&&("loading"!==(f=m1(void 0)).readyState?hX(void 0):f.addEventListener("DOMContentLoaded",()=>{hX(void 0)}));let h1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h2(e){let t=m1(e),r=((e=document)=>e.activeElement)(t);"virtual"===hB?hp(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m4(e)}):m4(e)}function h4(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cl.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=m9(a),s=(0,cl.useCallback)(e=>{let t=m1(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hS(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h3(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h6=cu().createContext(null),h5=cu().forwardRef(function(e,t){let{children:r,...n}=e,o=mh(t),a={...n,ref:o};return cu().createElement(h6.Provider,{value:a},r)});function h9(e,t){let{focusProps:r}=h4(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h3(e.onKeyDown),onKeyUp:h3(e.onKeyUp)}},o=mj(r,n),a=function(e){let t=(0,cl.useContext)(h6)||{};hx(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cl.useRef)(e.autoFocus);(0,cl.useEffect)(()=>{s.current&&t.current&&h2(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mj({...o,tabIndex:l},i)}}function h8(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cl.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hD(),l=(0,cl.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=m9(l),c=(0,cl.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m1(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hS(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!h_(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});m5(n,r),l(m6(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function h7(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cl.useRef)({isFocused:!1,isFocusVisible:r||h0()}),[i,s]=(0,cl.useState)(!1),[l,u]=(0,cl.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cl.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cl.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},hX(),(0,cl.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m1(null==r?void 0:r.target),i="u">typeof window?m2(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m2(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m2(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m2(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h1.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hz[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h0())};return hU.add(e),()=>{hU.delete(e)}},[]);let{focusProps:f}=h4({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=h8({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?p:f}}let ge=!1,gt=0;function gr(e){"touch"===e.pointerType&&(ge=!0,setTimeout(()=>{ge=!1},50))}function gn(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",gr),gt++,()=>{!(--gt>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",gr)}}function go(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cl.useState)(!1),s=(0,cl.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cl.useEffect)(gn,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hD(),{hoverProps:c,triggerHoverEnd:d}=(0,cl.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{ge&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m1(n.target),"pointerover",t=>{s.isHovered&&s.target&&!h_(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cl.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}if("u">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 ga=(0,cl.createContext)(!1);function gi(e){let t=(t,r)=>(0,cl.useContext)(ga)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cl.forwardRef)(t)}let gs=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gl=(0,cl.createContext)({}),gu=gi(function(e,t){var r;[e,t]=mL(e,t,gl);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hj({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=h9(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mj(b,y,mY(e,{labelable:!0}));return{isPressed:v,buttonProps:mj(r,w,{"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"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=h7(e),{hoverProps:c,isHovered:d}=go({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=mI({...e,values:f,defaultClassName:"react-aria-Button"}),m=mR(a.id),h=mR(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mW(e,"assertive"):y.current&&l&&!o&&mW(e,"assertive"),y.current=o},[o,l,g,m]),cu().createElement("button",{...mY(e,{propNames:gs}),...mj(a,s,c),...p,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cu().createElement(mU.Provider,{value:{id:h}},p.children))});(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null);let gc=(0,cl.createContext)({}),gd=(0,cl.createContext)({}),gf=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,gd);let{elementType:r="span",...n}=e;return cu().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gp=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gh(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gp.has(t.script)}let t=e.split("-")[0];return gm.has(t)}let gg=Symbol.for("react-aria.i18n.locale");function gy(){let e="u">typeof window&&window[gg]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gh(e)?"rtl":"ltr"}}let gv=gy(),gb=new Set;function gw(){for(let e of(gv=gy(),gb))e(gv)}function gE(){let e=mk(),[t,r]=(0,cl.useState)(gv);return((0,cl.useEffect)(()=>(0===gb.size&&window.addEventListener("languagechange",gw),gb.add(r),()=>{gb.delete(r),0===gb.size&&window.removeEventListener("languagechange",gw)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gx=cu().createContext(null);function gD(e){let{locale:t,children:r}=e,n=gE(),o=cu().useMemo(()=>t?{locale:t,direction:gh(t)?"rtl":"ltr"}:n,[n,t]);return cu().createElement(gx.Provider,{value:o},r)}function g_(){let e=gE();return(0,cl.useContext)(gx)||e}var gS={};function gC(e,t){return e-t*Math.floor(e/t)}function gk(e,t,r,n){let o=(t=gO(e,t))-1,a=-2;return r<=2?a=0:gP(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gP(e){return e%4==0&&(e%100!=0||e%400==0)}function gO(e,t){return"BC"===e?1-t:t}function gR(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gS={"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:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",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:"انقر لبدء عملية تحديد نطاق التاريخ",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:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",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:"Натиснете, за да пристъпите към избора на времеви интервал",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č\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Př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ě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:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",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:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",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:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",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:"לחץ כדי להתחיל בבחירת טווח התאריכים",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šite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započ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ő d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",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’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’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:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",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:"クリックして日付範囲の選択を開始",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:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",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:"날짜 범위 선택을 시작하려면 클릭하십시오.",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ėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",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šķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sā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ńczyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć 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ăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",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:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",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:"Щелкните, чтобы начать выбор диапазона дат",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č\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čanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpolož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č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šite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započ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ığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İ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ığı se\xe7imini başlatmak i\xe7in tıklayı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:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",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:"Натисніть, щоб почати вибір діапазону дат",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:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",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:"单击以开始选择日期范围",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:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",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:"按一下以開始選取日期範圍",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 gT={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 gN{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gC(t,146097),o=Math.floor(n/36524),a=gC(n,36524),i=Math.floor(a/1461),s=Math.floor(gC(a,1461)/365),[l,u]=gR(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gk(l,u,1,1),d=2;e<gk(l,u,3,1)?d=0:gP(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gk(l,u,f,1)+1;return new g0(l,u,f,p)}toJulianDay(e){return gk(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gT[gP(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gP(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"}}function gj(e,t){let r=e.copy(),n="hour"in r?gW(r,t):0;gA(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,g$(r),gI(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,g$(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,g$(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gA(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function g$(e){for(;e.month<1;)gA(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gA(e,1)}function gI(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 gM(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gI(e)}function gL(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gF(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gM(r),r}function gB(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gU(r),r}function gU(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 gV(e,t){let r=e%t;return r<0&&(r+=t),r}function gW(e,t){let r;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=gV(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gV(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gV(e.minute,60),r=Math.floor(e.hour/24),e.hour=gV(e.hour,24),r}function gH(e,t){let r=e.copy();return gW(r,t),r}function gz(e,t,r,n){let o=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=gG(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gM(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gG(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gG(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gG(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gM(o),o}function gK(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gG(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gG(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gG(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gG(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gG(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gZ(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?yr(gj(yi(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):g9(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),ys(yo(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gY(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 gq(e){let t,r=ys(e,new gN);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gJ(e){return`${gq(e)}T${gY(e)}`}function gX(e){let t,r="object"==typeof e[0]?e.shift():new gN;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var gQ=new WeakMap;class g0{copy(){return this.era?new g0(this.calendar,this.era,this.year,this.month,this.day):new g0(this.calendar,this.year,this.month,this.day)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(this,e)}cycle(e,t,r){return gz(this,e,t,r)}toDate(e){return yn(this,e)}toString(){return gq(this)}compare(e){return yg(this,e)}constructor(...e){hw(this,gQ,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gM(this)}}var g1=new WeakMap;class g2{copy(){return new g2(this.hour,this.minute,this.second,this.millisecond)}add(e){return gH(this,e)}subtract(e){return gH(this,gL(e))}set(e){return gB(this,e)}cycle(e,t,r){return gK(this,e,t,r)}toString(){return gY(this)}compare(e){var t,r;return t=this,r=e,yy(t)-yy(r)}constructor(e=0,t=0,r=0,n=0){hw(this,g1,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gU(this)}}var g4=new WeakMap;class g3{copy(){return this.era?new g3(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g3(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gj(this,e)}subtract(e){return gj(this,gL(e))}set(e){return gF(gB(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gz(this,e,t,r);default:return gK(this,e,t,r)}}toDate(e,t){return yn(this,e,t)}toString(){return gJ(this)}compare(e){var t,r;let n=yg(this,e);return 0===n?(t=this,r=yi(e),yy(t)-yy(r)):n}constructor(...e){hw(this,g4,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gM(this)}}var g6=new WeakMap;class g5{copy(){return this.era?new g5(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g5(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gZ(this,e)}subtract(e){return gZ(this,gL(e))}set(e,t){let r,n;return 0===(n=gB(gF(r=yi(this),e),e)).compare(r)?this:ys(yo(yr(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=yi(e),i=ys(gB(a,{hour:t}),new gN),s=[yr(i,e.timeZone,"earlier"),yr(i,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===i.day)[0],l=ys(gB(a,{hour:o}),new gN),u=[yr(l,e.timeZone,"earlier"),yr(l,e.timeZone,"later")].filter(t=>yo(t,e.timeZone).day===l.day).pop(),c=g9(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return ys(yo(c=36e5*gG(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gK(e,t,r,n);case"era":case"year":case"month":case"day":return ys(yo(yr(gz(yi(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(g9(e)-e.offset)}toString(){var e;let t,r,n;return`${gJ(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g5){var r,n;return e.timeZone===t?e:(r=e,n=t,ys(yo(g9(r)-r.offset,n),r.calendar))}return yo(yr(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hw(this,g6,{writable:!0,value:void 0});let[t,r,n,o,a]=gX(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gM(this)}}function g9(e){return g8(gO((e=ys(e,new gN)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g8(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function g7(e,t){if("UTC"===t)return 0;if(e>0&&t===yb())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yt(e,t);return g8(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let ye=new Map;function yt(e,t){let r=ye.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ye.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function yr(e,t,r="compatible"){var n,o,a;let i=yi(e);if("UTC"===t)return g9(i);if(t===yb()&&"compatible"===r){i=ys(i,new gN);let e=new Date,t=gO(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=g9(i),l=g7(s-864e5,t),u=g7(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=yt(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function yn(e,t,r="compatible"){return new Date(yr(e,t,r))}function yo(e,t){let r=g7(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g5(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function ya(e){return new g0(e.calendar,e.era,e.year,e.month,e.day)}function yi(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g3(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function ys(e,t){if(yd(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gM(n),n}let yl={"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 yu(e,t){return t=ys(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yc(e,t){return yd(e.calendar,t.calendar)&&yu(e,t)}function yd(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yf={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yp(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yf[r]:(n=function(e){if(Intl.Locale){let t=yD.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yD.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yl[n]||0))%7;return o<0&&(o+=7),o}function ym(e){return yo(Date.now(),e)}function yh(e){return ya(ym(e))}function yg(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yy(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yv=null;function yb(){return null==yv&&(yv=new Intl.DateTimeFormat().resolvedOptions().timeZone),yv}function yw(e){return e.subtract({days:e.day-1})}function yE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yx(e,t,r){let n=yp(e,t,r);return e.subtract({days:n})}let yD=new Map;function y_(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yS(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yC=Symbol.for("react-aria.i18n.locale"),yk=Symbol.for("react-aria.i18n.strings");class yP{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yC];if(void 0===p){let e=window[yk];if(!e)return null;for(let r in p={},e)p[r]=new yP({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yO=new Map,yR=new Map;class yT{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yO.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yO.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yR.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yR.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let yN=new WeakMap;function yj(e,t){let r;return t&&yP.getGlobalDictionaryForPackage(t)||((r=yN.get(e))||(r=new yP(e),yN.set(e,r)),r)}function yA(e,t){let{locale:r}=g_(),n=yj(e,t);return(0,cl.useMemo)(()=>new yT(r,n),[r,n])}let y$=new Map;class yI{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 r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yB&&(yB="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yB&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yL(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)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=yL(e,t),this.options=t}}let yM={true:{ja:"h11"},false:{}};function yL(e,t={}){if("boolean"==typeof t.hour12&&(null==yF&&(yF="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yF)){let r=yM[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(y$.has(r))return y$.get(r);let n=new Intl.DateTimeFormat(e,t);return y$.set(r,n),n}let yF=null,yB=null;function yU(e,t){let r=(0,cl.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yV(e){e=yU(null!=e?e:{},yW);let{locale:t}=g_();return(0,cl.useMemo)(()=>new yI(t,e),[t,e])}function yW(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yH(e){return e&&e.__esModule?e.default:e}let yz=new WeakMap;function yK(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yG(e,t,r,n){let o=yA(yH(gS),"@react-aria/calendar"),a=yK(e)||yK(t),i=yV({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yV({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cl.useMemo)(()=>{if(yu(e,yw(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yu(t,yE(e)))return i.format(a.toDate(r));if(yu(t,yE(t)))return n?yZ(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yZ(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yZ(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yY(e,t){let r=(0,cl.useRef)(!0),n=(0,cl.useRef)(null);(0,cl.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cl.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yq(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mR(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function yJ(e,t){var r,n;let o,a,i,s,l,u=yA((r=gS)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mY(e),d=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=yG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yY(()=>{t.isFocused||mW(f)},[f]);let p=(i=yA(yH(gS),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yV({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yK(o)||yK(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cl.useMemo)(()=>{if(!l&&o&&a)if(yu(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yZ(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yY(()=>{p&&mW(p,"polite",4e3)},[p]);let m=mT([!!e.errorMessage,e.isInvalid,e.validationState]);yz.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:p});let[h,g]=(0,cl.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cl.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mj(c,yq({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let yX={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 yQ(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cl.useState)(!1),{focusWithinProps:a}=h8({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cl.useMemo)(()=>n?t:t?{...yX,...t}:yX,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cu().createElement(r,mj(a,i),t)}function y0(e,t,r,n){let o=mv(r),a=null==r;(0,cl.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let y1=0,y2=new Map;function y4(e){let[t,r]=(0,cl.useState)();return my(()=>{if(!e)return;let t=y2.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y1++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y2.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y2.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y3(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y6(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y5(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y3(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y6(e,t,"left"),n=y6(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,E=parseInt(p,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function y9(e,t){let r=e;for(y3(r,t)&&(r=r.parentElement);r&&!y3(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class y8 extends gN{fromJulianDay(e){let t=super.fromJulianDay(e);return new g0(this,gO(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(y7(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(y7(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function y7(e){let[t,r]=gR(e.year+-543);return new g0(t,r,e.month,e.day)}function ve(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vt(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-ve(e,r,1,1))/30),o=t+1-ve(e,r,n,1);return[r,n,o]}function vr(e){return Math.floor(e%4/3)}function vn(e,t){return t%13!=0?30:vr(e)+5}class vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),ve(1723856,t,e.month,e.day)}getDaysInMonth(e){return vn(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vr(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class va extends vo{fromJulianDay(e){let[t,r,n]=vt(1723856,e);return new g0(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vi extends vo{fromJulianDay(e){let[t,r,n]=vt(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g0(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ve(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vn(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"}}let vs=765433;function vl(e){return 7>gC(7*e+1,19)}function vu(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gC(3*(r+1),7)&&(r+=1),r}function vc(e){let t,r;return vu(e)+(t=vu(e-1),r=vu(e),vu(e+1)-r==356?2:+(r-t==382))}function vd(e){return vc(e+1)-vc(e)}function vf(e,t){if(t>=6&&!vl(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vd(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vl(e):30}class vp{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vs*19+234)/235)+1,n=vc(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vc(--r)));let a=1,i=0;for(;i<o;)i+=vf(r,a),a++;let s=o-(i-=vf(r,--a));return new g0(this,r,a,s)}toJulianDay(e){let t=vc(e.year);for(let r=1;r<e.month;r++)t+=vf(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vf(e.year,e.month)}getMonthsInYear(e){return vl(e.year)?13:12}getDaysInYear(e){return vd(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vl(t.year)&&!vl(e.year)&&t.month>6?e.month--:!vl(t.year)&&vl(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vm extends gN{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gk(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gP(o.year-1)?31:30)+155+90+10):(t=gP(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new g0(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gR(e.year+78);return(gP(o)?(t=31,r=gk(n,o,3,21)):(t=30,r=gk(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gP(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 vh(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vg(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vh(t,n,1,1)))/29.5)+1),a=r-vh(t,n,o,1)+1;return new g0(e,n,o,a)}function vy(e){return(14+11*e)%30<11}class vv{fromJulianDay(e){return vg(this,1948440,e)}toJulianDay(e){return vh(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vy(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vy(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vb extends vv{fromJulianDay(e){return vg(this,1948439,e)}toJulianDay(e){return vh(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vw(e){return 460322+u[e-1300]}function vE(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vx(e,t){let r=vw(e);for(let n=1;n<t;n++)r+=vE(e,n);return r}function vD(e){return u[e+1-1300]-u[e-1300]}class v_ extends vv{fromJulianDay(e){let t=e-1948440,r=vw(1300),n=vw(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vw(++e)+1;let o=vD(e);if(n===o){r=12;break}if(n<o){let t=vE(e,r);for(r=1;n>t;)n-=t,t=vE(e,++r);break}}return new g0(this,e,r,t-vx(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vx(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vE(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vD(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let r=1;r<=12;r++)e+=vE(t,r)}}}}let vS=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vC=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vk=[1867,1911,1925,1988,2018],vP=["meiji","taisho","showa","heisei","reiwa"];function vO(e){let t=vS.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vS.length-1:0===t?0:t-1}function vR(e){let t=vk[vP.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g0(e.year+t,e.month,e.day)}class vT extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),r=vO(t);return new g0(this,vP[r],t.year-vk[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vR(e))}balanceDate(e){let t=vR(e),r=vO(t);vP[r]!==e.era&&(e.era=vP[r],e.year=t.year-vk[r]),this.constrainDate(e)}constrainDate(e){let t=vP.indexOf(e.era),r=vC[t];if(null!=r){let[n,o,a]=r,i=n-vk[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vS[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vP}getYearsInEra(e){let t=vP.indexOf(e.era),r=vS[t],n=vS[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vR(e))}getMinimumMonthInYear(e){let t=vN(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vN(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vN(e){if(1===e.year)return vS[vP.indexOf(e.era)]}let vj=[0,31,62,93,124,155,186,216,246,276,306,336];class vA{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vj[o]+1;return new g0(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vj[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gC(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function v$(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vI(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vM extends gN{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vI(gO(t.era,t.year));return new g0(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vL(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vI(v$(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vL(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vL(e){let[t,r]=gR(v$(e));return new g0(t,r,e.month,e.day)}function vF(e){switch(e){case"buddhist":return new y8;case"ethiopic":return new vo;case"ethioaa":return new va;case"coptic":return new vi;case"hebrew":return new vp;case"indian":return new vm;case"islamic-civil":return new vv;case"islamic-tbla":return new vb;case"islamic-umalqura":return new v_;case"japanese":return new vT;case"persian":return new vA;case"roc":return new vM;default:return new gN}}function vB(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vU(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vV(e,t,r,n,o){let a=e;if(t.years)a=yw(e.subtract({months:e.month-1}));else t.months?a=yw(e):t.weeks&&(a=yx(e,r));return vH(e,a,t,r,n,o)}function vW(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vV(e,t,r).subtract(a);return vH(e,i,t,r,n,o)}function vH(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yS(t,vV(ya(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=y_(t,vW(ya(a),r,n));e&&(t=e)}return t}function vz(e,t,r){if(t){let r=yS(e,ya(t));r&&(e=r)}if(r){let t=y_(e,ya(r));t&&(e=t)}return e}function vK(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vG(e,t,r){let[n,o]=(0,cl.useState)(e||t),a=(0,cl.useRef)(void 0!==e),i=void 0!==e;(0,cl.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cl.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vZ(e){var t,r,n;let o=(0,cl.useMemo)(()=>new yI(e.locale),[e.locale]),a=(0,cl.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:m}=e,h=(0,cl.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cl.useMemo)(()=>g?ys(ya(g),h):null,[g,h]),b=(0,cl.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vG((0,cl.useMemo)(()=>e.focusedValue?vz(ys(ya(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cl.useMemo)(()=>vz(e.defaultFocusedValue?ys(ya(e.defaultFocusedValue),h):v||ys(yh(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cl.useState)(()=>{switch(d){case"start":return vV(w,l,i,u,c);case"end":return vW(w,l,i,u,c);default:return vU(w,l,i,u,c)}}),[_,S]=(0,cl.useState)(e.autoFocus||!1),C=(0,cl.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[k,P]=(0,cl.useState)(h);if(!yd(h,k)){let e=ys(w,h);D(vU(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vz(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vK(e=vz(e,u,c),x,f))&&(e=ys(e,(null==g?void 0:g.calendar)||new gN),g&&"hour"in g?y(g.set(e)):y(e))}}vB(w,u,c)?E(vz(w,u,c)):0>w.compare(x)?D(vW(w,l,i,u,c)):w.compare(C)>0&&D(vV(w,l,i,u,c));let T=(0,cl.useMemo)(()=>!!v&&(!!(f&&f(v))||vB(v,u,c)),[v,f,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cl.useMemo)(()=>"visible"===p?l:vY(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:C},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vz(w.add(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vz(w.subtract(j),u,c)),D(vV(vH(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yx(w,i)):(l.months||l.years)&&O(yw(w))},focusSectionEnd(){l.days?O(C):l.weeks?O(yx(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yE(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vY(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vY(l)))},selectFocusedDate(){f&&f(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vB(e,u,c),isSelected(e){return null!=v&&yu(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yu(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return yu(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return yu(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yp(r=yx(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(yu(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vY(e){let t={...e};for(let r in e)t[r]=1;return t}function vq(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:ya(e),end:ya(t)}):null}function vJ(e,t){return(e=ys(e,(null==t?void 0:t.calendar)||new gN),t&&"hour"in t)?t.set(e):e}function vX(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vQ=(0,cl.createContext)(null),v0=(0,cl.createContext)(null),v1=(0,cl.createContext)(null),v2=(0,cl.createContext)(null),v4=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,vQ);let{locale:r}=g_(),n=vZ({...e,locale:r,createCalendar:e.createCalendar||vF}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=yJ(e,n),u=mI({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cu().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:a,next:i}}],[gc,{"aria-hidden":!0,level:2,children:l}],[v1,n],[vQ,e],[gd,{slots:{errorMessage:s}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,o["aria-label"])),u.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v3=(0,cl.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mL(e,t,v0);let{locale:s}=g_(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vG(t,r||null,n),[f,p]=(0,cl.useState)(null),m="center";if(c&&c.start&&c.end){let e=vU(ya(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cl.useRef)(null),[g,y]=(0,cl.useState)(null),v=(0,cl.useMemo)(()=>yS(s,null==g?void 0:g.start),[s,g]),b=(0,cl.useMemo)(()=>y_(l,null==g?void 0:g.end),[l,g]),w=vZ({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vX(t,w,-1),end:vX(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cl.useState)(w.visibleRange);yc(w.visibleRange.start,x.start)&&yc(w.visibleRange.end,x.end)||(E(f),D(w.visibleRange));let _=e=>{e?(p(e),E(e)):(p(null),E(null))},S=f?vq(f,w.focusedDate):c&&vq(c.start,c.end),C=t=>{if(e.isReadOnly)return;let r=vK(vz(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vq(f,r);e&&d({start:vJ(e.start,null==c?void 0:c.start),end:vJ(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[k,P]=(0,cl.useState)(!1),{isDateUnavailable:O}=e,R=(0,cl.useMemo)(()=>!!c&&!f&&(!!(O&&(O(c.start)||O(c.end)))||vB(c.start,s,l)||vB(c.end,s,l)),[O,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){C(w.focusedDate)},selectDate:C,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vB(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:k,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vF}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=yJ(r,l),a=(0,cl.useRef)(!1),y0(i=(0,cl.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y0(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},y0(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mI({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cu().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cu().createElement(m$,{values:[[gl,{slots:{previous:c,next:d}}],[gc,{"aria-hidden":!0,level:2,children:p}],[v2,l],[v0,e],[gd,{slots:{errorMessage:f}}]]},cu().createElement(yQ,null,cu().createElement("h2",null,u["aria-label"])),m.children,cu().createElement(yQ,null,cu().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v6=(0,cl.createContext)(null),v5=(0,cl.forwardRef)(function(e,t){var r,n;let o=(0,cl.useContext)(v1),a=(0,cl.useContext)(v2),i=mM(vQ),s=mM(v0),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=g_(),s=yG(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yz.get(t),c=yq({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yV({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=g_(),p=(0,cl.useMemo)(()=>{let e=yx(yh(t.timeZone),f,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((yp(yw(n),f,a)+r)/7));return{gridProps:mj(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"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?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:p,weeksInMonth:m}}({startDate:u,endDate:yE(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cu().createElement(v6.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:m}},cu().createElement("table",{...mY(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cu().createElement(cu().Fragment,null,cu().createElement(v9,null,e=>cu().createElement(v8,null,e)),cu().createElement(v7,null,e.children))))}),v9=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cl.useContext)(v6);return cu().createElement("thead",{...mY(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cu().createElement("tr",null,i.map((e,t)=>cu().cloneElement(r(e),{key:t}))))}),v8=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cu().createElement("th",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),v7=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cl.useContext)(v1),i=(0,cl.useContext)(v2),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cl.useContext)(v6);return cu().createElement("tbody",{...mY(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cu().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cu().cloneElement(r(e),{key:t}):cu().createElement("td",{key:t})))))}),be=(0,cl.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cl.useContext)(v1),s=(0,cl.useContext)(v2),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cl.useContext)(v6))?n:{startDate:l.visibleRange.start},c=(0,cl.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yz.get(t),u=yA((n=gS)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yV({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yK(a),timeZone:t.timeZone}),d=t.isSelected(a),f=t.isCellFocused(a);i=i||t.isCellDisabled(a);let p=t.isCellUnavailable(a),m=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&yu(t.value,a));h&&(d=!0),a=yU(a,yc);let g=(0,cl.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yu(a,yh(t.timeZone)),v=(0,cl.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yu(a,t.value.start)||yu(a,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&yu(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yu(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y4(b),E=(0,cl.useRef)(!1),x=(0,cl.useRef)(!1),D=(0,cl.useRef)(void 0),{pressProps:_,isPressed:S}=hj({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(yu(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yu(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.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)}}});i||(o=yu(a,t.focusedDate)?0:-1),(0,cl.useEffect)(()=>{f&&r.current&&(m4(r.current),"pointer"!==hB&&document.activeElement===r.current&&y5(r.current,{containingElement:y9(r.current)}))},[f,r]);let C=yV({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),k=(0,cl.useMemo)(()=>C.formatToParts(g).find(e=>"day"===e.type).value,[C,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mj(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":v,"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:S,isFocused:f,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:k}}({date:e},l,c),{hoverProps:m,isHovered:h}=go({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=h7();y&&(y=p.isFocused);let v=(o=u,a=ys(a=e,o.calendar),o=yw(o),a=yw(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yu(e,l.highlightedRange.start),w=yu(e,l.highlightedRange.end));let E=mI({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),x={"data-focused":p.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return cu().createElement("td",{...d,ref:r},cu().createElement("div",{...mj(mY(t),f,g,m,x,E),ref:c}))}),bt=(0,cl.createContext)({}),br=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,bt);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=go({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:m}=h7({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mI({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cu().createElement("div",{...mj(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bn=(0,cl.createContext)({}),bo=gi(function(e,t){[e,t]=mL(e,t,bn);let{hoverProps:r,isHovered:n}=go(e),{isFocused:o,isFocusVisible:a,focusProps:i}=h7({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mI({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cu().createElement("input",{...mj((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var ba={};ba={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",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:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",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:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"mě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č\xe1tečn\xed datum",timeZoneName:"č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:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",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:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"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:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",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:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završ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četka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező 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ő d\xe1tum",timeZoneName:"idő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:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",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:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",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:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mē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ākuma datums",timeZoneName:"laika josla",weekday:"nedēļ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ń",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesią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ątkowa",timeZoneName:"strefa czasowa",weekday:"dzień 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ă final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",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ă \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",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:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopoč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čatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždň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četka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",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četka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"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ş Tarihi",era:"\xe7ağ",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şlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",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:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",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:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",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:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let bi=cu().createContext(null),bs="react-aria-focus-scope-restore",bl=null;function bu(e){var t,r,n,o,a,i,s,l,u,c;let d,f,p,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cl.useRef)(null),w=(0,cl.useRef)(null),E=(0,cl.useRef)([]),{parentNode:x}=(0,cl.useContext)(bi)||{},D=(0,cl.useMemo)(()=>new b_({scopeRef:E}),[E]);my(()=>{let e=x||bS.root;if(bS.getTreeNode(e.scopeRef)&&bl&&!bm(bl,e.scopeRef)){let t=bS.getTreeNode(bl);t&&(e=t)}e.addChild(D),bS.addNode(D)},[D,x]),my(()=>{let e=bS.getTreeNode(E);e&&(e.contain=!!g)},[g]),my(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(bs,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bs,n)}},[h]),my(()=>{if(r||n)return;let e=t.current,o=m1(e?e[0]:void 0),a=e=>{let r=hS(e);bf(r,t.current)?bl=t:bp(r)||(bl=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cl.useRef)(void 0),f=(0,cl.useRef)(void 0),my(()=>{let e=o.current;if(!a){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=m1(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bd(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bf(r,n))return;let a=bw(bc(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bh(i,!0)},n=e=>{(!bl||bm(bl,o))&&bf(hS(e),o.current)?(bl=o,d.current=hS(e)):bd(o)&&!bp(hS(e),o)?d.current?d.current.focus():bl&&bl.current&&by(bl.current):bd(o)&&(d.current=hS(e))},i=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=hB,n=("virtual"===r||null===r)&&hl()&&hs(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bd(o)&&!bp(a,o)){bl=o;let t=hS(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bl.current&&by(bl.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),my(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),i=E,s=y,l=g,p=(0,cl.useRef)("u">typeof document?((e=document)=>e.activeElement)(m1(i.current?i.current[0]:void 0)):null),my(()=>{let e=i.current,t=m1(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bl||bm(bl,i))&&bf(((e=document)=>e.activeElement)(t),i.current)&&(bl=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),my(()=>{let e=m1(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bd(i)||t.isComposing)return;let r=e.activeElement;if(!bp(r,i)||!bv(i))return;let n=bS.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bw(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bp(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bp(s,i));(t.preventDefault(),t.stopPropagation(),s)?bh(s,!0):bp(o)?bh(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),my(()=>{var e;let t=m1(i.current?i.current[0]:void 0);if(!s)return;let r=bS.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=bS.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bp(n,i)||n===t.body&&bv(i))){let e=bS.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bb(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bS.getTreeNode(t.scopeRef))return void bb(bg(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cu().useRef(c),(0,cl.useEffect)(()=>{m.current&&(bl=u,!bf(((e=document)=>e.activeElement)(m1(u.current?u.current[0]:void 0)),bl.current)&&u.current&&by(u.current)),m.current=!1},[u]),(0,cl.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m1(E.current?E.current[0]:void 0)),t=null;if(bf(e,E.current)){for(let r of bS.traverse())r.scopeRef&&bf(e,r.scopeRef.current)&&(t=r);t===bS.getTreeNode(E)&&(bl=t.scopeRef)}},[E]),my(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bS.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bl||bm(E,bl))&&(!n||bS.getTreeNode(n))&&(bl=n),bS.removeTreeNode(E)},[E]);let _=(0,cl.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bh(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m1(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bw(bc(n),{tabbable:a,accept:s},n);c.currentNode=bf(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bh(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bh(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bw(bc(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bh(i,!0),i}}},[]),S=(0,cl.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cu().createElement(bi.Provider,{value:S},cu().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cu().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bc(e){return e[0].parentElement}function bd(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bf(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bp(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bS.traverse(bS.getTreeNode(t)))if(r&&bf(e,r.current))return!0;return!1}function bm(e,t){var r;let n=null==(r=bS.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bh(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h2(e)}catch{}}function bg(e,t=!0){let r=e[0].previousElementSibling,n=bc(e),o=bw(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bw(n=bc(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function by(e,t=!0){bh(bg(e,t))}function bv(e){let t=bS.getTreeNode(bl);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bb(e){e.dispatchEvent(new CustomEvent(bs,{bubbles:!0,cancelable:!0}))&&bh(e)}function bw(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m0:mQ,s=m1((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m2(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bf(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bE(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bh(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m1(n)),u=bw(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bx(u);return e&&bh(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bx(u);if(!e)return null;c=e}return c&&bh(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bw(n,{tabbable:o,accept:a}).nextNode();return i&&bh(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bx(bw(n,{tabbable:o,accept:a}));return i&&bh(i,!0),null!=i?i:null}}}function bx(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bD{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new b_({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bf(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.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 r=new bD;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new b_({scopeRef:null}),this.fastMap.set(null,this.root)}}class b_{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 bS=new bD;function bC(e,t,r){let{direction:n}=g_(),o=(0,cl.useMemo)(()=>bE(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bw(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hj({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mj(i,{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)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bk(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bk(e,t,r){let n=bw(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bP(e,t,r){let n=(0,cl.useRef)(t),o=mv(()=>{r&&r(n.current)});(0,cl.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bO(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mR(t);let i=mR(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yq({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mT([!!t,!!r,n,o]),l=mT([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mj(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bR(e,t,r){let{validationBehavior:n,focus:o}=e;my(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mv(()=>{t.resetValidation()}),i=mv(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hB="keyboard",hK("keyboard",null)),e.preventDefault()}),s=mv(()=>{t.commitValidation()});(0,cl.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bT=new WeakMap,bN="__role_"+Date.now(),bj="__focusManager_"+Date.now();function bA(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=bO({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),p=(0,cl.useRef)(null),{focusWithinProps:m}=h8({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=yA((o=ba)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y4(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bN]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bj],E=(0,cl.useMemo)(()=>w||bE(r),[w,r]),x=bC(t,r,"presentation"===e[bN]);bT.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cl.useRef)(e.autoFocus);a="presentation"===e[bN]?{role:"presentation"}:mj(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cl.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bP(e.inputRef,t.value,t.setValue),bR({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mY(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mj(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:f,isInvalid:i,validationErrors:s,validationDetails:l}}var b$={};b$={"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:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",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:"البيانات المحددة غير متاحة."},"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:"Началната дата трябва да е преди крайната.",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:"Избраната дата не е налична."},"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ředch\xe1zet datu ukonč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 Anfangsdatum 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:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",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:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"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’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:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",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:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završ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ő d\xe1tumnak a befejező 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ő 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:"開始日は終了日より前にする必要があります。",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:"選択した日付は使用できません。"},"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:"시작일은 종료일 이전이어야 합니다.",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:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė 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ākuma datumam ir jābū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ī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ęcia musi być wcześniejsza niż data zakoń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ę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ă fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"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:"Дата начала должна предшествовать дате окончания.",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:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\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četni datum mora biti pred konč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četka mora biti pre datuma završ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şlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdı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ılamı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:"Дата початку має передувати даті завершення.",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:"Вибрана дата недоступна."},"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:"开始日期必须早于结束日期。",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:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let bI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bM={...bI,customError:!0,valid:!1},bL={isInvalid:!1,validationDetails:bI,validationErrors:[]},bF=(0,cl.createContext)({}),bB="__formValidationState"+Date.now();function bU(e){if(e[bB]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bB];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bM}:null,u=(0,cl.useMemo)(()=>i&&null!=o?bW(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bV(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cl.useContext)(bF),d=(0,cl.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bV(c[e])):bV(c[n]):[],[c,n]),[f,p]=(0,cl.useState)(c),[m,h]=(0,cl.useState)(!1);c!==f&&(p(c),h(!1));let g=(0,cl.useMemo)(()=>bW(m?[]:d),[m,d]),y=(0,cl.useRef)(bL),[v,b]=(0,cl.useState)(bL),w=(0,cl.useRef)(bL),[E,x]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bH(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bL,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bH(v,e)?y.current=e:b(e)},resetValidation(){bH(bL,w.current)||(w.current=bL,b(bL)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bV(e){return e?Array.isArray(e)?e:[e]:[]}function bW(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bM}:null}function bH(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bz(...e){let t=new Set,r=!1,n={...bI};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bK=new yP((eo=b$)&&eo.__esModule?eo.default:eo);function bG(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bZ(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bG(),n=new yT(e,yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK),l=new yI(e,bJ({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bY={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bq={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bJ(e,t){var r;e={...t.shouldForceLeadingZeros?bq:bY,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function bX(e){return e&&"hour"in e?e:new g2}function bQ(e,t){return null===e?null:e?ys(e,t):void 0}function b0(e,t,r,n){if(e)return bQ(e,r);let o=ys(ym(null!=n?n:yb()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?ya(o):n?o:yi(o)}function b1(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cl.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b2=new yP({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"},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"),b4={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b3={year:5,month:2,day:7,hour:2,minute:15,second:15},b6={dayperiod:"dayPeriod"};function b5(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,m]=b1(f,e.granularity),h=m||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let g=(0,cl.useMemo)(()=>new yI(n),[n]),y=(0,cl.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vG(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cl.useMemo)(()=>{var e;return null!=(e=bQ(v,y))?e:null},[v,y]),[E,x]=(0,cl.useState)(()=>b0(e.placeholderValue,p,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cl.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cl.useMemo)(()=>bJ({},_),[_]),C=(0,cl.useMemo)(()=>new yI(n,S),[n,S]),k=(0,cl.useMemo)(()=>C.resolvedOptions(),[C]),P=(0,cl.useMemo)(()=>C.formatToParts(new Date).filter(e=>b4[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[C]),[O,R]=(0,cl.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cl.useRef)(null),N=(0,cl.useRef)(y);(0,cl.useEffect)(()=>{yd(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?ys(t,y):b0(e.placeholderValue,p,y,m)))},[y,p,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(b0(e.placeholderValue,p,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(b0(e.placeholderValue,p,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=ys(t,(null==f?void 0:f.calendar)||new gN)):x(t),T.current=null},$=(0,cl.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cl.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=b4[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b4[e.type]&&!t[e.type],p=b4[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?b2.getStringForLocale(d,i):"––"):null,m={type:b6[e.type]||e.type,text:u?p:e.value,...b9(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"⁦",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"⁩",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"⁩",...b9(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,C,k,j,y,n,p),[$,O,C,k,j,y,n,p]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{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,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,k));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cl.useMemo)(()=>bZ(v,u,c,d,_),[v,u,c,d,_]),B=bU({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:C,validationState:V,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b3[e]||1)},decrementPage(e){L(e,-(b3[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,k))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=b0(e.placeholderValue,p,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yI(n,bJ(e,_)).format($):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{..._,...t}))}}function b9(e,t,r){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:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,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(r.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 b8=(0,cl.createContext)(null),b7=(0,cl.createContext)(null),we=(0,cl.createContext)(null),wt=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(b7),n=(0,cl.useContext)(we);return r||n?cu().createElement(wn,{...e,ref:t}):cu().createElement(wr,{...e,ref:t})}),wr=(0,cl.forwardRef)((e,t)=>{let[r,n]=mL({slot:e.slot},t,b8),{locale:o}=g_(),a=b5({...r,locale:o,createCalendar:vF}),i=(0,cl.useRef)(null),{fieldProps:s,inputProps:l}=bA({...r,inputRef:i},a,n);return cu().createElement(m$,{values:[[b7,a],[bn,{...l,ref:i}],[bt,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cu().createElement(wn,e))}),wn=(0,cl.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cl.useContext)(b7),a=(0,cl.useContext)(we),i=null!=o?o:a;return cu().createElement(cu().Fragment,null,cu().createElement(br,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cl.cloneElement)(n(e),{key:t}))),cu().createElement(bo,null))}),wo=(0,cl.createContext)({});function wa(){var e;return null!=(e=(0,cl.useContext)(wo))?e:{}}function wi({children:e}){let t=(0,cl.useMemo)(()=>({register:()=>{}}),[]);return cu().createElement(hv.Provider,{value:t},e)}cu().forwardRef(({children:e,...t},r)=>{let n=(0,cl.useRef)(!1),o=(0,cl.useContext)(hv);r=mh(r||(null==o?void 0:o.ref));let a=mj(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hx(o,r),(0,cl.useEffect)(()=>{n.current||(n.current=!0)},[]),cu().createElement(hv.Provider,{value:a},e)});let ws=cu().createContext(null);function wl(e){let t=mk(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,a]=(0,cl.useState)(!1),i=(0,cl.useMemo)(()=>({contain:o,setContain:a}),[o,a]),{getContainer:s}=wa();if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cu().createElement(bu,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cu().createElement(ws.Provider,{value:i},cu().createElement(wi,null,l)),hO().createPortal(l,r)}let wu=(0,cl.createContext)(null),wc=(0,cl.createContext)(null),wd=(0,cl.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mL(e,t,wu);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mT();a=e["aria-label"]?void 0:a;let i=(0,cl.useRef)(!1);return(0,cl.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h2(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h2(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),my(()=>{null==n||n(!0)},[n=null==(r=(0,cl.useContext)(ws))?void 0:r.setContain]),{dialogProps:{...mY(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cl.useContext)(wc);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mI({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cu().createElement("section",{...mY(e),...n,...i,ref:t,slot:e.slot||void 0},cu().createElement(m$,{values:[[gc,{slots:{[mA]:{},title:{...o,level:2}}}],[gl,{slots:{[mA]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wf=(0,cl.createContext)(null),wp=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(wf);return(null==r?void 0:r.isInvalid)?cu().createElement(wm,{...e,ref:t}):null}),wm=(0,cl.forwardRef)((e,t)=>{let r=(0,cl.useContext)(wf),n=mY(e),o=mI({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cu().createElement(gf,{slot:"errorMessage",...n,...o,ref:t})}),wh=(0,cl.createContext)(null),wg=(0,cl.createContext)({}),wy=gi(function(e,t){[e,t]=mL(e,t,wg);let{elementType:r="label",...n}=e;return cu().createElement(r,{className:"react-aria-Label",...n,ref:t})}),wv=(0,cl.createContext)({placement:"bottom"}),wb=new WeakMap,ww=[];function wE(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wx(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function wD(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wx(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(wx(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wx((r-t)/n,n))*n),a=wx(a,n)}let w_={top:"top",bottom:"top",left:"left",right:"left"},wS={top:"bottom",bottom:"top",left:"right",right:"left"},wC={top:"left",left:"top"},wk={top:"height",left:"width"},wP={width:"totalWidth",height:"totalHeight"},wO={},wR="u">typeof document?window.visualViewport:null;function wT(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==wR?void 0:wR.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wR?void 0:wR.width)?r:l,s=null!=(n=null==wR?void 0:wR.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,wR&&(c=wR.offsetTop,d=wR.offsetLeft)}else({width:i,height:s,top:c,left:d}=wI(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=i,u=s;return hi()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==wR?void 0:wR.pageTop)?o:0,d=null!=(a=null==wR?void 0:wR.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function wN(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wk[e]],c=n.scroll[w_[e]]+a,d=u+n.scroll[w_[e]]-a,f=t-l+i[e]-n[w_[e]],p=t-l+r+i[e]-n[w_[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function wj(e){if(wO[e])return wO[e];let[t,r]=e.split(" "),n=w_[t]||"right",o=wC[n];w_[r]||(r="center");let a=wk[n],i=wk[o];return wO[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wO[e]}function wA(e,t,r,n,o,a,i,s,l,u){var c,d,f,p,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:g!==v&&(E[v]+=(null!=(p=e[w])?p:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wE(E[v],x,D),h===y){let r=s?i[b]:t[wP[b]];E[wS[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function w$(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wS[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wS[c]]-o)}function wI(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wM(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wI(e);let n=wI(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function wL(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 wF=new WeakMap;function wB(e){let{ref:t,box:r,onResize:n}=e;(0,cl.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wU="u">typeof document?window.visualViewport:null;function wV(e){var t,r,n;let{direction:o}=g_(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cl.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,f,p,m,g,o,v,b,a],D=(0,cl.useRef)(null==wU?void 0:wU.scale);(0,cl.useEffect)(()=>{g&&(D.current=null==wU?void 0:wU.scale)},[g]);let _=(0,cl.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!f||(null==wU?void 0:wU.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wL(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wL(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wI(s):wM(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wI(l),D={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};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wT(f),C=wT(v),k="BODY"===f.tagName?wI(v):wM(v,f);return"HTML"===v.tagName&&"BODY"===f.tagName&&(C.scroll.top=0,C.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,f,p,m,h){var g,y,v,b,w,E,x,D,_,S,C,k,P,O;let R,T,N,j=wj(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wA(t,s,r,j,c,d,u,f,m,h),B=c,U=w$(s,u,t,o,a+c,j);if(i&&n[A]>U){let e=wj(`${wS[M]} ${L}`),n=wA(t,s,r,e,c,d,u,f,m,h);w$(s,u,t,o,a+c,e)>U&&(j=e,F=n,B=c)}let V="bottom";"top"===j.axis?"top"===j.placement?V="top":"bottom"===j.placement&&(V="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?V="bottom":"bottom"===j.crossPlacement&&(V="top"));let W=wN($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=V,R=f?u.height:s[wP.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(C=o.bottom)?C:0)+a)):Math.max(0,T+E-(s.top+(null!=(k=s.scroll.top)?k:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));p&&p<H&&(H=p),r.height=Math.min(r.height,H),W=wN($,(F=wA(t,s,r,j,B,d,u,f,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[w_[$]],G=m/2+h,Z="left"===w_[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wE(K,t[$]+m/2-(F[$]+o[w_[$]]),t[$]+t[I]-m/2-(F[$]+o[w_[$]]));return z[$]=wE(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,C,k,p,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);my(_,x),my(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wB({ref:s,onResize:_}),wB({ref:i,onResize:_});let S=(0,cl.useRef)(!1);my(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wU||wU.addEventListener("resize",t),null==wU||wU.addEventListener("scroll",r),()=>{null==wU||wU.removeEventListener("resize",t),null==wU||wU.removeEventListener("scroll",r)}},[_]);let C=(0,cl.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cl.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wF.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&C}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}function wW(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 wH=[],wz="u">typeof document&&window.visualViewport,wK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wG=0;function wZ(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wY(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wq(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=y9(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wJ={};function wX(e){var t;let{onDismiss:r,...n}=e,o=yq(n,yA((t=wJ)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cu().createElement(yQ,null,cu().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wQ(e,t=!0){let[r,n]=(0,cl.useState)(!0),o=r&&t;return my(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w1(e,o,(0,cl.useCallback)(()=>n(!1),[])),o}function w0(e,t){let[r,n]=(0,cl.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w1(e,o,(0,cl.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}function w1(e,t,r){my(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hP.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w2(e){let[t,r]=vG(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cl.useCallback)(()=>{r(!0)},[r]),o=(0,cl.useCallback)(()=>{r(!1)},[r]),a=(0,cl.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wJ={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"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:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādī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:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let w4=(0,cl.createContext)(null),w3=(0,cl.createContext)(null),w6=(0,cl.forwardRef)(function(e,t){[e,t]=mL(e,t,w4);let r=(0,cl.useContext)(wc),n=w2(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=w0(t,o.isOpen)||e.isExiting||!1,i=(0,cl.useContext)(ga),{direction:s}=g_();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cu().createElement(cu().Fragment,null,t)}return!o||o.isOpen||a?cu().createElement(w5,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w5({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(0),u=(0,cl.useRef)(null),d=(0,cl.useContext)(w3),f=d&&"SubmenuTrigger"===n.trigger;my(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cl.useEffect)(()=>{if(o&&!wH.includes(t))return wH.push(t),()=>{let e=wH.indexOf(t);e>=0&&wH.splice(e,1)}},[o,t]);let l=()=>{wH[wH.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cl.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mv(e=>{r&&wW(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mv(e=>{r&&r(e)});(0,cl.useEffect)(()=>{let e=a.current;if(n)return;let r=m1(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wW(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wH[wH.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=h8({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bp(e.relatedTarget,bl))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:p,arrowProps:m,placement:h}=wV({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;my(()=>{if(!t){let e,t,r,n;return 1==++wG&&(c=ha()?(r=null,n=mg(wY(document,"touchstart",r=>{((e=y9(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wZ(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wY(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}),wY(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wY(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wK.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=mg(wY(window,"scroll",()=>{window.scrollTo(0,0)}),wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"),wZ(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wz&&(wz.height<window.innerHeight?requestAnimationFrame(()=>{wq(n)}):wz.addEventListener("resize",()=>wq(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):mg(wZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wZ(document.documentElement,"overflow","hidden"))),()=>{0==--wG&&c()}}},[t])}({isDisabled:a||!t.isOpen}),my(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=wb.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wb.set(e,r+1))};ww.length&&ww[ww.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return ww.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wb.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wb.delete(e)):wb.set(e,t-1))}s===ww[ww.length-1]?(ww.pop(),ww.length&&ww[ww.length-1].observe()):ww.splice(ww.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=ww[ww.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mj(d,p),arrowProps:m,underlayProps:f,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:u},e),y=n.popoverRef,v=wQ(y,!!g)||n.isEntering||!1,b=mI({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cl.useState)(!1);my(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cl.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h2(y.current)},[E,y]);let D={...p.style,...b.style},_=cu().createElement("div",{...mj(mY(n),p),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cu().createElement(wX,{onDismiss:e.close}),cu().createElement(wv.Provider,{value:{...h,placement:g,ref:i}},b.children),cu().createElement(wX,{onDismiss:e.close}));return f?cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cu().createElement(wl,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cu().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cu().createElement("div",{ref:u,style:{display:"contents"}},cu().createElement(w3.Provider,{value:u},_)))}function w9(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w8=(0,cl.createContext)(null),w7=(0,cl.createContext)(null),Ee=(0,cl.createContext)(null),Et=(0,cl.createContext)(null),Er=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w8);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w2(e),[n,o]=vG(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b1(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,cl.useState)(null),[p,m]=(0,cl.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cl.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,cl.useMemo)(()=>bZ(n,y,v,b,g),[n,y,v,b,g]),E=bU({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(ya(e)):yi(e,t)),f(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?_(t,p||bX(e.defaultValue||e.placeholderValue)):f(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,p||bX(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yI(e,bJ(t,g)).format(l):"",getDateFormatter:(e,t)=>new yI(e,bJ({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mR(),a=mR(),i=mR(),s=yA((n=ba)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:m}=bO({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bC(t,r),g=f["aria-labelledby"]||f.id,{locale:y}=g_(),v=t.formatValue(y,{month:"long"}),b=y4(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mY(e),x=(0,cl.useMemo)(()=>bE(r),[r]),D=(0,cl.useRef)(!1),{focusWithinProps:_}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mj(E,h,f,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...f,id:i,[bN]:"presentation","aria-describedby":w,value:t.value,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,[bB]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${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(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mB(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cl.useState)(null),E=(0,cl.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=h7({within:!0}),S=mI({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),C=mY(e);return delete C.id,cu().createElement(m$,{values:[[Ee,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[b8,f],[gl,{...p,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[vQ,h],[wc,i],[w4,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wu,m],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().createElement("div",{...x,...C,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),En=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,w7);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w2(e),[a,i]=vG(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cl.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w9(e)?i(e):i(null)},[d,f]=b1((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cl.useState)(null),[y,v]=(0,cl.useState)(null);u&&w9(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(ya(e.start)):yi(e.start,t.start),end:"timeZone"in t.end?t.end.set(ya(e.end)):yi(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;p?w9(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}):g(t):w9(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w9(h)&&w9(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cl.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:C}=e,k=(0,cl.useMemo)(()=>{var e,t;let r;return r=bz(bZ(null!=(e=null==u?void 0:u.start)?e:null,_,S,C,D),bZ(null!=(t=null==u?void 0:u.end)?t:null,_,S,C,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bz(r,{isInvalid:!0,validationErrors:[(yP.getGlobalDictionaryForPackage("@react-stately/datepicker")||bK).getStringForLocale("rangeReversed",bG())],validationDetails:{...bI,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,C,D]),P=bU({...e,value:a,name:(0,cl.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:k}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w9(h)&&p&&b(h,{start:(null==y?void 0:y.start)||bX(e.placeholderValue),end:(null==y?void 0:y.end)||bX(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bJ(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),f=new yI(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yI(t,bJ(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yI(e,bJ({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=yA((l=ba)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bO({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=g_(),b=t.formatValue(v,{month:"long"}),w=y4(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mR(),_=mR(),S=bC(t,r),C=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,k=(0,cl.useMemo)(()=>bE(r,{accept:e=>e.id!==D}),[r,D]),P={[bj]:k,[bN]:"presentation","aria-describedby":C,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},O=mY(e),R=(0,cl.useRef)(!1),{focusWithinProps:T}=h8({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cl.useRef)(bL),j=(0,cl.useRef)(bL);return{groupProps:mj(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":C,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{k.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bz(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bB]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bz(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.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(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...mB(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cl.useState)(null),x=(0,cl.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wB({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=h7({within:!0}),C=mI({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=mY(e);return delete k.id,cu().createElement(m$,{values:[[Et,i],[bt,{...c,ref:s,isInvalid:i.isInvalid}],[gl,{...m,isPressed:i.isOpen}],[wg,{...d,ref:l,elementType:"span"}],[v0,g],[wc,i],[w4,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wu,h],[b8,{slots:{start:f,end:p}}],[gd,{slots:{description:y,errorMessage:v}}],[wf,b]]},cu().createElement("div",{...D,...k,...C,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function Eo(e){return cu().createElement(gD,e)}function Ea(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof g0||e instanceof g3||e instanceof g5)return t?ys(e,t):e;{let r=d0()(e).toDate(),n=new g0(r.getFullYear(),r.getMonth()+1,r.getDate());return t?ys(n,t):n}}function Ei(e){if(e)return e.toDate(yb())}function Es(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function El(e){let t=e??"",r=Es(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Eu(){let e=window.i18next.language,t=Es(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Ec=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ei||"en-US"),Ed=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ef={};for(let e=1;e<100;e++)Ef[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Ep={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},Em="[1234567890一二三四五六七八九〇\\d]",Eh={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},Eg={},Ey={"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},Ev={zone:Ey,year:Ef,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:{}},Eb={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(Ey).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,}"},Ew={...Eb,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}"},EE={},Ex=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Ec){return EE[t.toLowerCase()]||(EE[t.toLowerCase()]=new e(t)),EE[t.toLowerCase()]}constructor(e=Ec){this.locale=e,this.lookups={...Ev},this.vars={...Eb};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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);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 r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Eh: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(Eg[e])return Eg[e];if("fullwide"===e||"hanidec"===e)return{group:Em,lookup:{...Eh}};let t=Ep[e];if(!t)return{group:"\\d",lookup:{...Eh}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Eg[e]={group:`[${r}-${n}]`,lookup:o},Eg[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Ew)Ew.hasOwnProperty(r)&&(this.vars[r]=Ew[r].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((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=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 r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}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")}},ED=["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"],E_={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},ES=()=>new Date;function EC(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var Ek=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},EP=["year","month","day","hour","minute","second","millisecond","offset"],EO={};function ER(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 ET=[[/([^\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"]],EN={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," "],...ET],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:ET,id:ET,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ej(e,t=Ec){let r=function(e){if(!EO[e]){var t,r;let n,o,a=Ex.factory(e);EO[e]=new Ek({doneChecker:ER,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:EC(["","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:EC(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Em}{2,4})\\s*\u5E74\\s*(${Em}{1,2})\\s*\u6708\\s*(${Em}{1,2})\\s*\u65E5$`),handler:EC(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:EC(["","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:EC(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=ES(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{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,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?E_[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=ES();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.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:EC(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:EC(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:EC(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:EC(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:EC(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:EC(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:EC(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:EC(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:EC(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:EC(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:EC(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:EC(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:EC(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:EC(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:EC(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:EC(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:EC(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:EC(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:EC(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:EC(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:EC(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:EC(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:EC(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:EC(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:EC(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:EC(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:EC(["offset"])}],o=a.baseName.slice(0,5),ED.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(EP.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ef[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return EO[e]}(t),n=function(e,t){let r=EN[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function EA(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ed(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 Ed(t.valueOf()-60*e.offset*1e3):t}function E$(e,t=Ec){let r=Ej(e,t),n=r.invalid?new Ed(NaN):EA(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function EI(e,t=Ec){return e instanceof Date?new Ed(e.valueOf()):"number"==typeof e?new Ed(e):E$(e,t)}Date.fromString=Ed.fromString=E$,Date.fromAny=Ed.fromAny=EI,"u">typeof window&&(window.anyDateParser={fromString:E$,fromAny:EI,fromObject:EA,attempt:Ej});var EM=r(5238),EL=r(3826);let EF=function(e){return null==e};function EB(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}dQ.extend(d1),dQ.extend(EL),dQ.extend(EM);let EU="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EV(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&dQ(e,EU).isValid()}function EW(e){return dQ(e).isToday()}function EH(e){return EV(e)?dQ(e,EU).toDate():null}function Ez(e,t=!1){let r=dQ(e);return t&&(r=r.utc()),r.format(EU)}function EK(e){return dQ(e).toDate()}var EG=new WeakMap;let EZ=new class{register(e,t){EB(this,EG).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EB(this,EG).has(t))return EB(this,EG).get(t)}if(e.language&&EB(this,EG).has(e.language))return EB(this,EG).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EB(this,EG).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EG,{writable:!0,value:new Map})}};function EY(e,t){EZ.register(e,t)}function Eq(e){let t=e??Eu();return EZ.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EJ={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EX(e,t={}){let r=Ej(e,Eu());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EF(r.day)&&EF(r.month)&&(r=Object.assign({},nn(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nn(r,"day"),{date:r.day}));let n=dQ().set(r).toDate();return EF(r.year)&&(t.year=!1),EF(r.month)&&(t.month=!1),EF(r.date)&&(t.day=!1),EQ(n,t)}function EQ(e,t){let r,n=t?.locale??Eu(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...EJ,...{noToday:"am"===o.language},...t},p={calendar:a??Eq(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},m=dQ(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(E0("-"))),"wide"==i&&(t=t.map(E0(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${E1(e)}`),r}let E0=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E1(e){return e.toLocaleTimeString(Eu(),{hour:"2-digit",minute:"2-digit"})}function E2(e,t){return EQ(e,{...t,time:!0})}function E4(e,t){let r=Eq("string"==typeof t?new Intl.Locale(t):t);return r?ys(e,vF(r)):e}function E3(e,t){return new Intl.DurationFormat(Eu(),t).format(e)}function E6(e,t){if(null==e)return null;if("string"==typeof e){let r=Ej(e,Eu());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nn(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nn(r,"day"),...{date:r.day}}),dQ(t).set(r))}return dQ(e)}let E5=["years","months","days","hours","minutes","seconds"],E9={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E8={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function E7(e,t=dQ(),r){let n,o=dQ(t),a=E6(e,o);if(null==a)return null;if("string"==typeof r){let e=E9[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E9[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E5.indexOf(r);for(let o=0;o<E5.length;o++){let a=E5[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E9[s]??s,function(e,t,r,n){let o=E5.indexOf(r),a=E5.indexOf(n),i=E5.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E8};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E9[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let xe={style:"short",localeMatcher:"lookup"};function xt(e,t=dQ(),r){let n=E7(e,t,r);return null==n?null:E3(n,"object"==typeof r&&r.formatOptions?{...xe,...r.formatOptions}:xe)}let xr=(0,cl.createContext)(null);function xn(){let e=du({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cl.useMemo)(()=>{let t=Eu();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cl.useMemo)(()=>{let e=Eq(t);return void 0!==e?vF(e):void 0},[t]),n=(0,cl.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cl.useMemo)(()=>r?ys(yh(yb()),r):yh(yb()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xo=new g0(1793,1,1);var xa={};function xi(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xa={"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:"حقل رقمي"},"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:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\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:"Πεδίο αριθμού"},"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:"שדה מספר"},"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ő"},"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:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"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 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:"Числовое поле"},"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:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številč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ı alanı"},"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:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xs=r(137);function xl(e={}){let{locale:t}=g_();return(0,cl.useMemo)(()=>new(0,xs.K)(t,e),[t,e])}var xu={};function xc(e){var t;let r=(0,cl.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=yA((t=xu)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cl.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cl.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cl.useEffect)(()=>{y.current&&(mV&&mV.clear("assertive"),mW(w,"assertive"))},[w]);let E=mv(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=mv(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=hD();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xu={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"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:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukš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:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};var xd=r(7120);function xf(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xp=(0,cl.createContext)(null),xm=(0,cl.createContext)(null),xh=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mL(e,t,xp);let{validationBehavior:o}=mM(wh)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=g_(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wE(a,t,r):wD(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wE(i,t,r):wD(i,t,r,n));let[d,f]=vG(a,isNaN(i)?NaN:i,s),[p,m]=(0,cl.useState)(()=>isNaN(d)?"":new(0,xs.K)(l,o).format(d)),h=(0,cl.useMemo)(()=>new(0,xd.d)(l,o),[l,o]),g=(0,cl.useMemo)(()=>h.getNumberingSystem(p),[h,p]),y=(0,cl.useMemo)(()=>new(0,xs.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cl.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cl.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bU({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cl.useState)(d),[_,S]=(0,cl.useState)(l),[C,k]=(0,cl.useState)(o);Object.is(d,x)&&l===_&&o===C||(m(b(d)),D(d),S(l),k(o));let P=(0,cl.useMemo)(()=>h.parse(p),[h,p]),O=(e,n=0)=>{if(isNaN(P))return wD(isNaN(n)?0:n,t,r,E);{let n=wD(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:wD(xf(e,P,E),t,r,E)}},R=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||wD(P,t,r,E)>P||xf("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||wD(P,t,r,E)<P||xf("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(wD(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:f,setInputValue:m,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wE(P,t,r):wD(P,t,r,n),f(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cl.useRef)(null),[u,c]=mF(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:C,incrementToMax:k,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=yA((o=xa)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mR(i),{focusProps:I}=h4({onBlur(){N()}}),M=xl(g),L=(0,cl.useMemo)(()=>M.resolvedOptions(),[M]),F=xl({...g,currencySign:void 0}),B=(0,cl.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=xc({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:C,onIncrementToMax:k,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cl.useState)(!1),{focusWithinProps:K}=h8({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cl.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y0(t,"wheel",n?void 0:o)}({onScroll:(0,cl.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?C():e.deltaY<0&&P())},[P,C]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";hn()?Z?Y="text":G&&(Y="decimal"):hl()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mY(e),J=(0,cl.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=mv(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cl.useEffect)(()=>{if(!xi()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xi()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vG(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=h9(e,t),d=bU({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bO({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=mY(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bP(t,l,u),bR(e,d,t),(0,cl.useEffect)(()=>{if(t.current instanceof m2(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mj(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||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:l,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cu().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,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:f,validationErrors:p,validationDetails:m}}(e,r),c=(0,cl.useRef)(null);return{inputProps:mj(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bB]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cl.useMemo)(()=>mg(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bP(r,t.numberValue,t.setNumberValue);let ea=mj(U,I,er,{role:null,"aria-roledescription":ha()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mR(),eu=mR(),ec=mj(V,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mj(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mB(e),label:c,validationBehavior:a},s,l),b=mI({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mY(e);return delete w.id,cu().createElement(m$,{values:[[xm,s],[bt,f],[bn,{...p,ref:l}],[wg,{...d,ref:u}],[gl,{slots:{increment:m,decrement:h}}],[gd,{slots:{description:g,errorMessage:y}}],[wf,v]]},cu().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&cu().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xg(e,t){return Number.parseInt(EQ(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xy=(0,cl.forwardRef)(function(e,t){let{className:r}=e,n=(0,cl.useContext)(v1),o=(0,cl.useContext)(v2),a=n??o,i=(0,cl.useContext)(xr),s=yb(),l=EQ(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xg(a.visibleRange.start.toDate(s),i),c=a.maxValue?xg(a.maxValue.toDate(s),i):void 0,d=a.minValue?xg(a.minValue.toDate(s),i):void 0,f=(0,cl.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,fd.jsxs)("span",{ref:t,className:r,children:[(0,fd.jsx)("span",{children:l}),(0,fd.jsxs)(xh,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,fd.jsx)(bo,{}),(0,fd.jsxs)(br,{children:[(0,fd.jsx)(gu,{slot:"increment",children:(0,fd.jsx)(f0,{size:8})}),(0,fd.jsx)(gu,{slot:"decrement",children:(0,fd.jsx)(fJ,{size:8})})]})]})]})}),xv="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xb="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xw="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xE="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xx="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xD="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",x_="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xS="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xC({children:e}){let t=(0,cl.useContext)(Ee),r=(0,cl.useContext)(Et),n=t??r,o=dV(()=>n?.close());return(0,fd.jsx)(wd,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xk=(0,cl.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,fd.jsx)(w6,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,fd.jsx)(xC,{children:(0,fd.jsxs)(a?v3:v4,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,fd.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"previous",children:(0,fd.jsx)(f9,{size:16})}),(0,fd.jsx)(xy,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,fd.jsx)(gu,{className:fp()(xx,xD),slot:"next",children:(0,fd.jsx)(f8,{size:16})})]}),(0,fd.jsx)(v5,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,fd.jsx)(be,{className:fp()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xP=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),[n,o]=mL({slot:e.slot},t,b8),{locale:a}=g_(),i=b5({...n,locale:a,createCalendar:vF}),s=(0,cl.useRef)(null),{fieldProps:l,inputProps:u}=bA({...n,inputRef:s},i,o),c=(0,cl.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,fd.jsxs)(m$,{values:[[b7,i],[bn,{...u,ref:s}],[bt,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fd.jsx)(br,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,r)=>(0,cl.cloneElement)(e.children(t),{key:r}))}),(0,fd.jsx)(bo,{})]})}),xO=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(Ee),n=(0,cl.useContext)(Et);return(r??n).isInvalid?(0,fd.jsx)(ma,{ref:t,size:16,...e}):(0,fd.jsx)(fq,{ref:t,size:16,...e})});class xR{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xT=new Map,xN=(0,cl.forwardRef)(function({segment:e,...t},r){let n=(0,cl.useContext)(b7),o=mh(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cl.useRef)(""),{locale:l,direction:u}=g_(),c=function(){var e;let{locale:t}=g_(),r=yj((e=ba)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cl.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xR(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:m}=bT.get(t),h=e.isPlaceholder?"":e.text,g=(0,cl.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yV({month:"long",timeZone:g.timeZone}),v=yV({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=xc({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,cl.useMemo)(()=>new(0,xd.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=g_(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xT.has(r))return xT.get(r);let n=new Intl.Collator(t,e);return xT.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cl.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cl.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yV({hour:"numeric",hour12:!0}),_=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=yV({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,cl.useMemo)(()=>{if("era"!==e.type)return[];let r=ys(new g0(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:C.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[C,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=k.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};y0((0,cl.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cl.useRef)("");y0(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),y0(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),my(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=ha()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cl.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=mR(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yq({"aria-label":`${j}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mj(b,A,{id:T,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(cu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(hr()?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(),E()}},onFocus:()=>{s.current="",r.current&&y5(r.current,{containingElement:y9(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=h7(),{hoverProps:u,isHovered:c}=go({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cl.useCallback)(e=>{e.stopPropagation()},[]);return(0,fd.jsx)("span",{...mj(mY(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),xj={short:!1,size:"md"},xA=(0,cl.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:m,short:h,size:g,value:y,...v}={...xj,...e},{calendar:b,intlLocale:w,today_:E}=xn(),x=(0,cl.useId)(),D=!!(u??l),_=(0,cl.useMemo)(()=>Ea(n,b),[n,b]),S=(0,cl.useMemo)(()=>Ea(y,b,!0),[y,b]),C=(0,cl.useMemo)(()=>Ea(d,b),[d,b]),k=(0,cl.useMemo)(()=>Ea(f??xo,b),[f,b]),P=(0,cl.useMemo)(()=>a||s,[a,s]),O=(0,cl.useMemo)(()=>(m&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>p?.(Ei(e)))),[m,p]);return(0,fd.jsx)(Eo,{locale:w.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",r),children:(0,fd.jsx)(m$,{values:[[xr,w]],children:(0,fd.jsxs)(Er,{className:fp()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:C,minValue:k,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsx)(xP,{id:D?x:void 0,ref:t,className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,fd.jsx)(xN,{className:xb,segment:e}):(0,fd.jsx)(cu().Fragment,{})}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===g,[xD]:"md"===g||!g||0===g.length,[xS]:"lg"===g}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:i})]}),(0,fd.jsx)(xk,{variant:"single",today_:E})]})})})})}),x$=(0,cl.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=xn(),w=(0,cl.useId)(),E=!!(s??i),x=(0,cl.useMemo)(()=>{if(m)return{start:Ea(m[0],y,!1),end:Ea(m[1],y,!1)}},[m,y]),D=(0,cl.useMemo)(()=>{if(t)return{start:Ea(t[0],y,!1),end:Ea(t[1],y,!1)}},[t,y]),_=(0,cl.useMemo)(()=>Ea(c??xo,y,!0),[c,y]),S=(0,cl.useMemo)(()=>Ea(u,y,!0),[u,y]),C=(0,cl.useMemo)(()=>r||a,[r,a]),k=(0,cl.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([Ei(e.start),Ei(e.end)]))),[f,d]);return(0,fd.jsx)(Eo,{locale:v.toString(),children:(0,fd.jsx)("div",{className:fp()("cds--form-item",e),children:(0,fd.jsx)(m$,{values:[[xr,v]],children:(0,fd.jsx)(En,{id:E?w:void 0,className:fp()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:C,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:k,children:(0,fd.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,fd.jsx)(wy,{className:fp()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,fd.jsxs)(br,{className:xv,children:[(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xw),slot:"start",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,fd.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fd.jsx)(wt,{className:fp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xw),slot:"end",children:e=>(0,fd.jsx)(xN,{className:xb,segment:e})})]}),(0,fd.jsx)(gu,{className:fp()(xx,{[x_]:"sm"===p,[xD]:"md"===p||!p||0===p.length,[xS]:"lg"===p}),children:(0,fd.jsx)(xO,{})})]}),(0,fd.jsx)(wp,{className:xE,children:n}),(0,fd.jsx)(xk,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xI=cu().createContext(null);function xM(e){let{children:t}=e,r=(0,cl.useContext)(xI),[n,o]=(0,cl.useState)(0),a=(0,cl.useMemo)(()=>({parent:r,modalCount:n,addModal(){o(e=>e+1),r&&r.addModal()},removeModal(){o(e=>e-1),r&&r.removeModal()}}),[r,n]);return cu().createElement(xI.Provider,{value:a},t)}function xL(e){let t,{modalProviderProps:r}={modalProviderProps:{"aria-hidden":!!(t=(0,cl.useContext)(xI))&&t.modalCount>0||void 0}};return cu().createElement("div",{"data-overlay-container":!0,...e,...r})}function xF(e){return cu().createElement(xM,null,cu().createElement(xL,e))}function xB(e){let t=mk(),{portalContainer:r=t?null:document.body,...n}=e,{getContainer:o}=wa();if(!e.portalContainer&&o&&(r=o()),cu().useEffect(()=>{if(null==r?void 0:r.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let a=cu().createElement(xF,n);return hO().createPortal(a,r)}let xU={},xV=0,xW=!1,xH=null,xz=null;function xK(e={}){let{delay:t=1500,closeDelay:r=500}=e,{isOpen:n,open:o,close:a}=w2(e),i=(0,cl.useMemo)(()=>`${++xV}`,[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(a),u=()=>{xU[i]=f},c=()=>{for(let e in xU)e!==i&&(xU[e](!0),delete xU[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),xW=!0,o(),xH&&(clearTimeout(xH),xH=null),xz&&(clearTimeout(xz),xz=null)},f=e=>{e||r<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},r)),xH&&(clearTimeout(xH),xH=null),xW&&(xz&&clearTimeout(xz),xz=setTimeout(()=>{delete xU[i],xz=null,xW=!1},Math.max(500,r)))};return(0,cl.useEffect)(()=>{l.current=a},[a]),(0,cl.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),xU[i]&&delete xU[i]},[i]),{isOpen:n,open:e=>{e||!(t>0)||s.current?d():(c(),u(),n||xH||xW?n||d():xH=setTimeout(()=>{xH=null,xW=!0,d()},t))},close:f}}let xG=(0,cl.createContext)(null),xZ=(0,cl.createContext)(null);function xY(e){let t=xK(e),r=(0,cl.useRef)(null),{triggerProps:n,tooltipProps:o}=function(e,t,r){let{isDisabled:n,trigger:o}=e,a=mR(),i=(0,cl.useRef)(!1),s=(0,cl.useRef)(!1),l=()=>{(i.current||s.current)&&t.open(s.current)},u=e=>{i.current||s.current||t.close(e)};(0,cl.useEffect)(()=>{let e=e=>{r&&r.current&&"Escape"===e.key&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[r,t]);let c=()=>{s.current=!1,i.current=!1,u(!0)},{hoverProps:d}=go({isDisabled:n,onHoverStart:()=>{"focus"!==o&&("pointer"===hB?i.current=!0:i.current=!1,l())},onHoverEnd:()=>{"focus"!==o&&(s.current=!1,i.current=!1,u())}}),{focusableProps:f}=h9({isDisabled:n,onFocus:()=>{h0()&&(s.current=!0,l())},onBlur:()=>{s.current=!1,i.current=!1,u(!0)}},r);return{triggerProps:{"aria-describedby":t.isOpen?a:void 0,...mj(f,d,{onPointerDown:c,onKeyDown:c,tabIndex:void 0})},tooltipProps:{id:a}}}(e,t,r);return cu().createElement(m$,{values:[[xG,t],[xZ,{...o,triggerRef:r}]]},cu().createElement(h5,{...n,ref:r},e.children))}let xq=(0,cl.forwardRef)(function({UNSTABLE_portalContainer:e,...t},r){[t,r]=mL(t,r,xZ);let n=(0,cl.useContext)(xG),o=xK(t),a=null==t.isOpen&&null==t.defaultOpen&&n?n:o,i=w0(r,a.isOpen)||t.isExiting||!1;return a.isOpen||i?cu().createElement(xB,{portalContainer:e},cu().createElement(xJ,{...t,tooltipRef:r,isExiting:i})):null});function xJ(e){let t=(0,cl.useContext)(xG),r=(0,cl.useRef)(null),[n,o]=(0,cl.useState)(0);my(()=>{r.current&&t.isOpen&&o(r.current.getBoundingClientRect().width)},[t.isOpen,r]);let{overlayProps:a,arrowProps:i,placement:s}=wV({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:n,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=wQ(e.tooltipRef,!!s)||e.isEntering||!1,u=mI({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}}),{tooltipProps:c}=function(e,t){let r=mY(e,{labelable:!0}),{hoverProps:n}=go({onHoverStart:()=>null==t?void 0:t.open(!0),onHoverEnd:()=>null==t?void 0:t.close()});return{tooltipProps:mj(r,n,{role:"tooltip"})}}(e=mj(e,a),t);return cu().createElement("div",{...c,ref:e.tooltipRef,...u,style:{...a.style,...u.style},"data-placement":null!=s?s:void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},cu().createElement(wv.Provider,{value:{...i,placement:s,ref:r}},u.children))}let xX=({diagnoses:e,showCertainty:t=!1})=>{let{diagnosisTags:r}=du({externalModuleName:"@openmrs/esm-styleguide"});return(0,fd.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let n=t&&"PROVISIONAL"===e.certainty,o=1===e.rank?r?.primaryColor??"blue":r?.secondaryColor??"gray";return(0,fd.jsx)(xQ,{color:o,isProvisional:n,name:e.display},e.uuid)})})};function xQ({color:e,isProvisional:t,name:r}){let[n,o]=(0,cl.useState)(!1),[a,i]=(0,cl.useState)(!1),[s,l]=(0,cl.useState)(!1),u=s||a,c=(0,cl.useRef)(null);(0,cl.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth;l(t),t||o(!1)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[r,t,u]);let d=fp()("cds--tag","cds--tag--md","cds--layout--size-md",`cds--tag--${e}`,"-esm-cohort-builder__diagnosis-tags-module__diagnosisTag___ZEczs"),f=(0,fd.jsxs)(fd.Fragment,{children:[t&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{"aria-hidden":"true",className:"-esm-cohort-builder__diagnosis-tags-module__provisionalMark___nSkIq",children:"?"}),(0,fd.jsxs)("span",{className:"cds--visually-hidden",children:[iz("provisional","Provisional")," "]})]}),(0,fd.jsx)("span",{ref:c,className:"cds--tag__label",children:r})]});return u?(0,fd.jsxs)(xY,{delay:0,closeDelay:150,isOpen:n,onOpenChange:o,children:[(0,fd.jsx)(gu,{className:d,"data-testid":"diagnosis-tag",onFocusChange:i,onPress:()=>o(!0),children:f}),(0,fd.jsx)(xq,{className:"-esm-cohort-builder__diagnosis-tags-module__tagTooltip___5ARni",placement:"bottom",offset:4,containerPadding:8,children:r})]}):(0,fd.jsx)("span",{className:d,"data-testid":"diagnosis-tag",children:f})}let x0={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},x1=({width:e="64",height:t="64"})=>(0,fd.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,fd.jsx)("use",{href:"#omrs-empty-data-illustration"})}),x2=e=>{let t="tablet"===dI(),r=e.launchForm;return(0,fd.jsx)(fv.Layer,{className:x0.layer,children:(0,fd.jsxs)(fv.Tile,{className:x0.tile,children:[(0,fd.jsx)("div",{className:t?x0.tabletHeading:x0.desktopHeading,children:(0,fd.jsx)("h4",{children:e.headerTitle})}),(0,fd.jsx)(x1,{}),(0,fd.jsx)("p",{className:x0.content,children:iz("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fd.jsx)("p",{className:x0.action,children:r&&(0,fd.jsx)(fv.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iz("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},x4=({error:e,headerTitle:t})=>{let r="tablet"===dI();return(0,fd.jsx)(fv.Layer,{children:(0,fd.jsxs)(fv.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,fd.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,fd.jsx)("h4",{children:t})}),(0,fd.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iz("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fd.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iz("errorCopy")})]})})},x3=x4,x6=cu().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dF(),i=window.location??{pathname:""},s=cD(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,fd.jsxs)(fv.SideNav,{"aria-label":iz("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,fd.jsx)(cC,{name:"global-nav-menu-slot"}),r?(0,fd.jsx)(c9,{value:o,fallback:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,fd.jsx)(cc.Provider,{value:o,children:(0,fd.jsx)(cC,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),x5=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cl.useState)(""),s=(0,cl.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dp()(t,i8,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cl.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:m}=function(e,t=0,r=""){let n=dd(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dP()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let a=`${i6}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},i8);return(0,cl.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cl.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cl.useCallback)(e=>{o(),i(e.trim())},[o]),y=dW((0,cl.useCallback)(()=>{!f&&d&&m(e=>e+1)},[f,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)(fv.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:iz("searchForLocation"),id:s,placeholder:iz("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,fd.jsx)(fv.InlineNotification,{kind:"error",subtitle:iz("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iz("error","Error")})}),(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,fd.jsx)(fv.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,fd.jsx)(fv.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,fd.jsx)(fv.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,fd.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,fd.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iz("noResultsToDisplay")})})}),f&&(0,fd.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,fd.jsx)(fv.InlineLoading,{description:iz("loading")})})]})})]})},x9=B("modalState",{modalContainer:null,modalStack:[]}),x8=0;async function x7(e,t,r={}){let n=u2(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=x8++;o=await co({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function De(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dt(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dr(e){return e.find(e=>!De(e))}function Dn(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Do=window.getComputedStyle(document.body).overflow;function Da({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Ds),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Dr(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",x7(r,e.modalName,e.props).then(n=>{De(e)?Dt(e.modalName,n):n?(e.parcel=n,t.prepend(r),Dn(e,Dr(x9.getState().modalStack)===e),n.mountPromise.then(()=>{De(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,Di(e)})):Di(e)},t=>{k(t),Di(e)});break}case"MOUNTING":case"MOUNTED":Dn(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dt(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=x9.getState();x9.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Do,removeEventListener("keydown",Ds)}function Di(e){if(De(e))return;e.state="TO_BE_DELETED";let t=x9.getState();x9.setState({...t,modalStack:[...t.modalStack]})}function Ds(e){"Escape"===e.key&&function(){let[e]=x9.getState().modalStack;e&&Di(e)}()}function Dl(e){x9.subscribe(Da),x9.setState({...x9.getState(),modalContainer:e})}function Du(e,t={},r=()=>{}){let n=()=>{let e=x9.getState().modalStack.find(e=>e.onClose===r);e&&Di(e)};if(u2(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=x9.getState()).modalStack],x9.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var Dc=Object.prototype.hasOwnProperty;let Dd=function(e){if(null==e)return!0;if(to(e)&&(tr(e)||"string"==typeof e||"function"==typeof e.splice||tl(e)||ty(e)||tt(e)))return!e.length;var t=rg(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e6(e))return!t5(e).length;for(var r in e)if(Dc.call(e,r))return!1;return!0},Df=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},Dp=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Df,{notification:e},e.id))})},Dm=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cl.useState)(t);return(0,fd.jsx)(fv.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iz("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iz("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},Dh=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(Dm,{notification:e},e.id))})};class Dg{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let Dy=new Dg,Dv=0,Db=new Dg,Dw=0;function DE(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dp,{subject:Dy}))}function Dx(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!Dd(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Dy.next({...e,id:Dv++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DD(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(Dh,{subject:Db}))}function D_(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{Db.next({...e,id:Dw++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DS=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DC=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Dk={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},DP=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cl.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i3}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i3}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dp()(r,i8),i=n?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,f=(0,cl.useMemo)(()=>{if(n)return n?"--"===n?"normal":DS.includes(n)?n.toLowerCase():DC.includes(n)?n:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,m="normal"!==f,h=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:iz("notAvailable","Not available"),w=fp()({[Dk["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[Dk["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[Dk.low]:"low"===f,[Dk.high]:"high"===f,[Dk["off-scale-low"]]:"off_scale_low"===f,[Dk["off-scale-high"]]:"off_scale_high"===f}),E=fp()({[Dk.container]:!0,[Dk.card]:!0,[Dk["critical-value"]]:p,[Dk["abnormal-value"]]:m&&!p}),x=fp()({[Dk.cell]:!0,[w]:!0});return"cell"===i?(0,fd.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,fd.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,fd.jsxs)("div",{className:Dk["label-container"],children:[(0,fd.jsx)("span",{id:h,className:Dk.label,children:r}),m&&(0,fd.jsx)("span",{className:Dk[f.replace("_","-")],title:iz("abnormalValue","Abnormal value")})]}),(0,fd.jsxs)("div",{className:Dk["value-container"],children:[(0,fd.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Dk.value,children:b}),v&&t&&(0,fd.jsx)("span",{id:y,className:Dk.units,children:t})]})]})},DO="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",DR=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,fd.jsx)("div",{className:fp()(DO,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,fd.jsx)("div",{className:fp()(DO,n),...o,children:(0,fd.jsx)(DT,{title:t,illustration:r})})}},DT=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cl.useState)(null);return(0,cl.useEffect)(()=>{nY("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,fd.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,fd.jsx)("p",{children:iz(n.implementationName)}),(0,fd.jsx)("h1",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},DN=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dK(t,e,n,a),u="tablet"===dI(),c=iz("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fd.jsx)(fd.Fragment,{children:e>0&&(0,fd.jsxs)("div",{className:fp()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,fd.jsxs)("div",{children:[c,o&&(0,fd.jsx)(cd,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iz("seeAll","See all")})]}),(0,fd.jsx)(fv.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iz("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dj(e){return D$(DM(e,"usual","official"))}function DA(e){return Dj(e)}function D$(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function DI(e){return D$(e)}function DM(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function DL(e,t=dQ()){let r=dQ(t),n=E6(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DF(e,t=dQ()){let r=DL(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E3(r,n)}let DB={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function DU({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsx)("span",{className:DB.primaryIdentifier,children:(0,fd.jsxs)(fv.Tag,{className:DB.tag,type:"gray",children:[e&&t?.text&&(0,fd.jsxs)("span",{className:DB.label,children:[t.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})})}function DV({showIdentifierLabel:e,type:t,value:r}){return(0,fd.jsxs)(fv.FormLabel,{className:DB.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,fd.jsxs)("span",{className:DB.label,children:[t?.text,": "]}),(0,fd.jsx)("span",{className:DB.value,children:r})]})}function DW({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=du(),{primaryIdentifierCode:n}=dY(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,fd.jsx)(fd.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,fd.jsxs)(cu().Fragment,{children:[(0,fd.jsx)("span",{className:DB.identifier,children:r?.coding?.[0]?.code===n?(0,fd.jsx)(DU,{showIdentifierLabel:t,type:r,value:e}):(0,fd.jsx)(DV,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]},e)):""})}let DH={Female:pc,Male:pd,Other:pf,Unknown:pp},Dz=({gender:e})=>{let t=DH[e];return t?(0,fd.jsx)(t,{fill:"#525252"}):null},DK={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function DG({patient:e,renderedFrom:t}){var r;let n,o,a=Dj(e),i=e?.gender&&(o=DK[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iz(n,r),iconKey:o}),s=(0,cl.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,fd.jsxs)("div",{className:DB.patientInfo,children:[(0,fd.jsx)("div",{className:fp()(DB.row,DB.patientNameRow),children:(0,fd.jsxs)("div",{className:DB.flexRow,children:[(0,fd.jsx)("span",{className:DB.patientName,children:a}),i&&(0,fd.jsxs)("div",{className:DB.gender,children:[(0,fd.jsx)(Dz,{gender:i.iconKey}),(0,fd.jsx)("span",{children:i.displayText})]}),(0,fd.jsx)(cC,{className:DB.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fd.jsxs)("div",{className:DB.demographics,children:[e.birthDate&&(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("span",{children:DF(e.birthDate)}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"}),(0,fd.jsx)("span",{children:EX(e.birthDate,{time:!1})}),(0,fd.jsx)("span",{className:DB.separator,children:"\xb7"})]}),(0,fd.jsx)(DW,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fd.jsx)(cC,{className:DB.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DZ=r(1673);function DY({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cl.useState)(!1),{extensions:i}=c_(r),s="tablet"===dI(),l=dV(()=>a(!1),o),u=(0,cl.useRef)(null),c=(0,cl.useRef)(null),d=(0,cl.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,cl.useCallback)(()=>a(e=>!e),[]),h=(0,cl.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cl.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cl.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cl.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,fd.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,fd.jsxs)("div",{"data-overflow-menu":!0,className:fp()("cds--overflow-menu",fE),ref:l,children:[(0,fd.jsxs)("button",{className:fp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},f_),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:g,ref:u,children:[(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iz("actions","Actions")})," ",(0,fd.jsx)(DZ.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fd.jsxs)("div",{className:fp()("cds--overflow-menu-options","cds--overflow-menu--flip",fx,{[fD]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,fd.jsx)("ul",{className:fp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fd.jsx)(cC,{name:r,state:y},r)}),(0,fd.jsx)("span",{})]})]})})}var Dq=r(6767),DJ=r.n(Dq);function DX(e){let{patientPhotoConceptUuid:t}=du({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i3}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cW()(e?r:null,i8),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let DQ=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cU.useTranslation)();return(0,fd.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fd.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fd.jsx)("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"})]})},D0="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function D1({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DX(e),[a,i]=(0,cl.useState)(null),[s,l]=(0,cl.useState)(!1),u=(0,cl.useMemo)(()=>DJ().generate(e),[e]);(0,cl.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cl.useMemo)(()=>r||(a?iz("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iz("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,fd.jsx)(fv.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,fd.jsx)(DQ,{"aria-label":iz("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("img",{className:D0,src:a,alt:c,title:t})}):(0,fd.jsx)("div",{"aria-label":c,children:(0,fd.jsx)("div",{className:D0,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fd.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let D2=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-cohorts","omrs-pict-concept-dictionary","omrs-pict-ct-scan","omrs-pict-data-entry","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-documents","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-reports","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-system-administration","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],D4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),D3=D4,D6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),D5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),D9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),D8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),D7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-cohorts",pictogramProps:e})})),_e=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-concept-dictionary",pictogramProps:e})})),_t=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),_r=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-data-entry",pictogramProps:e})})),_n=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),_o=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),_a=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),_i=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),_s=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),_l=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),_u=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),_c=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),_d=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),_f=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),_p=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),_m=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),_h=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),_g=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_y=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_v=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_b=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_w=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_E=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-reports",pictogramProps:e})})),_x=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_D=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),__=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-system-administration",pictogramProps:e})})),_S=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_C=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_k=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,fd.jsx)(_T,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_P=_i,_O=_g,_R=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cl.useRef)(document.getElementById(e));return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fd.jsx)(c9,{value:o.current,fallback:t,children:(0,fd.jsx)(_T,{ref:n,pictogram:e,pictogramProps:r})})})),_T=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fd.jsx)("svg",{ref:r,className:fp()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,fd.jsx)("use",{href:`#${e}`})})})),_N=({children:e})=>"tablet"===dI()?(0,fd.jsx)(fv.Layer,{children:e}):(0,fd.jsx)(fd.Fragment,{children:e}),_j=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,cl.useState)(r),[h,g]=(0,cl.useState)(!0),[y,v]=(0,cl.useState)(!1),b=(0,cl.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cl.useCallback)(()=>{v(!0),b()},[b]);return(0,cl.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cl.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:p,"aria-label":iz("closeSnackbar","Close snackbar"),className:fp()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iz("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},_A=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_j,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_$=new Dg,_I=0;function _M(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_A,{subject:_$}))}function _L(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_$.next({...e,id:_I++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _F=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cl.useCallback)(()=>{s(),t()},[t,s]);return(0,fd.jsx)("div",{children:(0,fd.jsx)(fv.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_B=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsx)(_F,{toast:e,closeToast:()=>n(e)},e.id))})},_U=new Dg,_V=0;function _W(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(_B,{subject:_U}))}function _H(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Dd(t))?setTimeout(()=>{_U.next({...e,id:_V++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}let _z="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_K=new Uint8Array(16),_G=[];for(let e=0;e<256;++e)_G.push((e+256).toString(16).slice(1));let _Z=function(e,t,r){if(_z&&!t&&!e)return _z();let n=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(_K)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(_G[e[t+0]]+_G[e[t+1]]+_G[e[t+2]]+_G[e[t+3]]+"-"+_G[e[t+4]]+_G[e[t+5]]+"-"+_G[e[t+6]]+_G[e[t+7]]+"-"+_G[e[t+8]]+_G[e[t+9]]+"-"+_G[e[t+10]]+_G[e[t+11]]+_G[e[t+12]]+_G[e[t+13]]+_G[e[t+14]]+_G[e[t+15]]).toLowerCase()}(n)};async function _Y(e,t){let{openedGroup:r}=u4.getState();if(r){if(r.groupName===e&&_X(r.props,t))return!0;else if(!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u4.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function _q(e){let{openedGroup:t,openedWindows:r}=u4.getState();if(t){if(r.length>0&&!(e||await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u4.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function _J(e,t=null,r=null,n=null){let o=u4.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u3(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=u6(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=u5(e);if(i&&(i.groupName!==l.name||!_X(i.props,n)))return!!await _1({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(_X(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&_X(d.props,t)?((i||u!==o.openedWindows.length-1)&&u4.setState(_9.restoreWindow(o,s)),!0):!!await _1({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await _1({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await _1({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sr(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function _X(e,t){return null==e||null==t||R(e,t)}function _Q(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}function _0(e){return 0===e.length?Promise.resolve(!0):new Promise(t=>{let r=Du("workspace2-close-prompt",{size:"sm",onConfirm:()=>{r(),t(!0)},onCancel:()=>{r(),t(!1)},affectedWorkspaceTitles:e.map(e=>e.title??"")})})}function _1(e){let{openedWindows:t}=u4.getState(),r=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":r=t.flatMap(e=>_Q(e));break;case"CLOSE_WINDOW":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n);break}case"CLOSE_WORKSPACE":{let n=t.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);r=_Q(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":r=t.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>_Q(e))}return _0(r)}function _2(e,t){return _0(_Q(e,t))}function _4(e,t){let r=e.openedWorkspaces.findIndex(e=>e.workspaceName===t);return r<0?e:0===r?null:{...e,openedWorkspaces:e.openedWorkspaces.slice(0,r)}}function _3(e,t,r,n){let{registeredWorkspacesByName:o}=u4.getState(),a=o[r];if(!a)throw Error(`No workspace named "${r}" registered`);let i=o[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==a.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);if(a.window!==e.windowName)throw Error(`Cannot open child workspace ${r} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e,l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{...e,openedWorkspaces:[...u,Sr(r,n)]}}function _6(e,t,r){let n=e.openedWorkspaces.findIndex(e=>e.uuid===t);if(n<0)return e;let o=e.openedWorkspaces[n];if(Object.keys(r).every(e=>o[e]===r[e]))return e;let a=[...e.openedWorkspaces];return a[n]={...o,...r},{...e,openedWorkspaces:a}}function _5(e,t,r){let n=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.uuid===t));if(n<0)return e;let o=e.openedWindows[n],a=_6(o,t,r);if(a===o)return e;let i=[...e.openedWindows];return i[n]=a,{...e,openedWindows:i}}let _9={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=e.openedWindows.findIndex(e=>e.openedWorkspaces.some(e=>e.workspaceName===t));if(r<0)return e;let n=_4(e.openedWindows[r],t),o=[...e.openedWindows],a=e.isMostRecentlyOpenedWindowHidden;if(null===n){let t=r===e.openedWindows.length-1;o.splice(r,1),t&&o.length>0&&(a=!1)}else o[r]=n;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let i=[...e.openedWindows];return i[a]=_3(e.openedWindows[a],t,r,n),{...e,openedWindows:i}},setHasUnsavedChanges:(e,t,r)=>_5(e,t,{hasUnsavedChanges:r}),setWorkspaceTitle:(e,t,r)=>_5(e,t,{title:r})};function _8(){return cy(u4,_9)}let _7=()=>(0,cl.useContext)(cj),Se=()=>Object.keys(u4.getState().registeredWorkspacesByName);function St(e,t,r){let n=e.openedWorkspaces[e.openedWorkspaces.length-1];return(n?t[n.workspaceName]?.width:void 0)??r[e.windowName]?.width??"narrow"}function Sr(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:_Z()}}function Sn(e,t,r){let n=u4.getState().registeredWorkspacesByName[e];return n?{windowName:n.window,openedWorkspaces:[Sr(e,t)],props:r??null,maximized:!1}:null}let So=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let{setHasUnsavedChanges:n,setWorkspaceTitle:o}=_7();return(0,cl.useEffect)(()=>{n(r??!1)},[r,n]),(0,cl.useEffect)(()=>{o(e)},[e,o]),(0,fd.jsx)(fd.Fragment,{children:t})};function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(t){Sl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ss(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Su(e){return(Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sc(e,t){return(Sc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sf=function(e){var t=cl.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&Sc(i,t);var r,n,o,a=(r=function(){if("u"<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=Su(i);e=r?Reflect.construct(t,arguments,Su(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 Sd(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),Sl(Sd(t=a.call(this,e)),"handleRef",function(e){t.el=e}),Sl(Sd(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Sl(Sd(t),"getParcelProps",function(){var e=Si(Si({},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 n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Si({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 cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cl.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ss(i.prototype,n),o&&Ss(i,o),i}();Sl(Sf,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Sp=r(4535),Sm=r(771);let Sh={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sg=e=>e.registeredWorkspacesByName,Sy=({lifeCycle:e,openedWorkspace:t,openedWindow:r,groupProps:n,actions:o,renderChrome:a,isRootWorkspace:i,isLeafWorkspace:s,showActionMenu:l})=>{let u=(0,cl.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:a=!1}=e;return n?!!(a||await o.promptForClosingWorkspaces())&&(o.closeWorkspace(r.openedWorkspaces[0].workspaceName),!0):!!(a||await o.promptForClosingWorkspaces(t.workspaceName))&&(o.closeWorkspace(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let a=t.workspaceName,{openedWorkspaces:i}=r,s=i.findIndex(e=>e.workspaceName===a);-1===s||s!==i.length-1&&i.slice(s+1).some(e=>e.hasUnsavedChanges)&&!await o.promptForClosingWorkspaces(i[s+1].workspaceName)||o.openChildWorkspace(a,e,n||{})},setWorkspaceTitle:e=>o.setWorkspaceTitle(t.uuid,e),setHasUnsavedChanges:e=>o.setHasUnsavedChanges(t.uuid,e),workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:n,workspaceMeta:u4.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:i,isLeafWorkspace:s,windowName:r.windowName,showActionMenu:l},[t,r,n,o,i,s,l]),c=!a&&!s,d=(0,cl.useMemo)(()=>e?(0,fd.jsx)(Sf,{config:e,mountParcel:ci,wrapWith:"div",wrapClassName:fp()(Sh.workspaceContent,{[Sh.hiddenExtraWorkspace]:c}),...u},t.workspaceName):null,[e,t.workspaceName,u,c]);return a?(0,fd.jsx)("div",{children:(0,fd.jsx)(Sv,{openedWorkspace:t,openedWindow:r,isRootWorkspace:i,showActionMenu:l,closeWindow:()=>u.closeWorkspace({closeWindow:!0}),children:d})}):d??(0,fd.jsx)(fv.InlineLoading,{className:fp()(Sh.loader,{[Sh.hiddenExtraWorkspace]:c}),description:`${iz("loading")}`})},Sv=({openedWorkspace:e,openedWindow:t,isRootWorkspace:r,showActionMenu:n,closeWindow:o,children:a})=>{let i=dI(),{openedGroup:s,openedWindows:l,registeredWindowsByName:u,registeredWorkspacesByName:c,registeredGroupsByName:d,isMostRecentlyOpenedWindowHidden:f,setWindowMaximized:p,hideWindow:m}=_8(),h=t.windowName,{maximized:g}=t,y=e.title??"",v=u[h],b=St(t,c,u),w=v?.icon,E=v?.canMaximize,x=!!s&&d[s.groupName]?.persistence==="closable",D=!!w&&!x,_=l.findIndex(e=>e.windowName===h)<l.length-1||f,S=Object.values(u).some(e=>e.group===s?.groupName&&void 0!==e.icon);return(0,fd.jsxs)("div",{className:fp()(Sh.workspaceOuterContainer,{[Sh.narrowWorkspace]:"narrow"===b,[Sh.widerWorkspace]:"wider"===b,[Sh.extraWideWorkspace]:"extra-wide"===b,[Sh.isActionMenuOpened]:S}),children:[(0,fd.jsx)("div",{className:fp()(Sh.workspaceSpacer,{[Sh.hidden]:_})}),(0,fd.jsx)("div",{className:fp()(Sh.workspaceMiddleContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r,[Sh.showActionMenu]:n}),children:(0,fd.jsx)("div",{className:fp()(Sh.workspaceInnerContainer,{[Sh.maximized]:g,[Sh.hidden]:_,[Sh.isRootWorkspace]:r}),children:a?(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)(fv.Header,{"aria-label":iz("workspaceHeader"),className:Sh.header,children:[(0,fd.jsx)(fv.HeaderName,{prefix:"",children:y}),(0,fd.jsx)("div",{className:Sh.overlayHeaderSpacer}),(0,fd.jsx)(fv.HeaderGlobalBar,{className:Sh.headerButtons,children:dM(i)?(0,fd.jsxs)(fd.Fragment,{children:[(E||g)&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":g?iz("minimize"):iz("maximize"),onClick:()=>p(h,!g),children:g?(0,fd.jsx)(Sp.Xj,{}):(0,fd.jsx)(Sp.hz,{})}),D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(fK,{})}),!x&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:o,children:(0,fd.jsx)(pe,{})})]}):(0,fd.jsxs)(fd.Fragment,{children:[D&&(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("hide"),onClick:()=>m(),children:(0,fd.jsx)(Sm.d3,{})}),(0,fd.jsx)(fv.HeaderGlobalAction,{"aria-label":iz("close"),onClick:()=>{x?_q():o()},children:(0,fd.jsx)(pe,{})})]})})]}),a]}):(0,fd.jsx)(fv.InlineLoading,{className:Sh.loader,description:`${iz("loading")} ...`})})})]})},Sb=({openedWindow:e,groupProps:t,actions:r,renderChrome:n,showActionMenu:o})=>{let{openedWorkspaces:a}=e,[i,s]=(0,cl.useState)({}),l=cg(u4,Sg);return(0,cl.useEffect)(()=>{let e=!1;return Promise.all(a.map(async e=>{let t=l[e.workspaceName];if(!t)return null;let{moduleName:r,component:n}=t;return[e.uuid,await fe(r,n)]})).then(t=>{e||s(Object.fromEntries(t.filter(e=>null!=e)))}),()=>{e=!0}},[a,l]),(0,fd.jsx)(fd.Fragment,{children:a.map((s,l)=>(0,fd.jsx)(Sy,{openedWorkspace:s,openedWindow:e,groupProps:t,actions:r,renderChrome:n,lifeCycle:i[s.uuid],isRootWorkspace:0===l,isLeafWorkspace:l===a.length-1,showActionMenu:o},s.uuid))})},Sw=e=>e.registeredWorkspacesByName,SE=({name:e,workspaceProps:t,windowProps:r,groupProps:n,onWindowChanged:o})=>{let a=cg(u4,Sw),i=cg(u4,t=>{let r=t.registeredWorkspacesByName[e]?.window;return r?t.registeredWindowsByName[r]:void 0}),s={name:e,workspaceProps:t,windowProps:r,groupProps:n},l=(0,cl.useRef)(),u=(0,cl.useRef)(null);if(!l.current){let o=Sn(e,t,r);l.current=U({openedWindow:o,groupProps:n??null}),o&&(u.current=s)}let c=l.current;(0,cl.useEffect)(()=>{let o=u.current;if(o&&o.name===e&&R(o.workspaceProps,t)&&R(o.windowProps,r)&&R(o.groupProps,n))return;let a=Sn(e,t,r);c.setState({openedWindow:a,groupProps:n??null},!0),u.current=a?s:null},[e,t,r,n,a,c]);let d=(0,cl.useMemo)(()=>(function(e){function t(t){e.setState(e=>{if(!e.openedWindow)return e;let r=t(e.openedWindow);return r===e.openedWindow?e:{...e,openedWindow:r}})}return{closeWorkspace(e){t(t=>_4(t,e))},openChildWorkspace(e,r,n){t(t=>_3(t,e,r,n))},setWorkspaceTitle(e,r){t(t=>_6(t,e,{title:r}))},setHasUnsavedChanges(e,r){t(t=>_6(t,e,{hasUnsavedChanges:r}))},promptForClosingWorkspaces(t){let{openedWindow:r}=e.getState();return r?_2(r,t):Promise.resolve(!0)}}})(c),[c]),{openedWindow:f,groupProps:p}=cg(c),m=f?.openedWorkspaces[f.openedWorkspaces.length-1],h=m?.workspaceName??null,g=m?.title??"",y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=i?.width??"narrow",b=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{b.current=o}),(0,cl.useEffect)(()=>{b.current?.({workspaceName:h,windowWidth:v,title:g,hasUnsavedChanges:y})},[h,v,g,y]),(0,fd.jsx)("div",{className:"-esm-cohort-builder__exported-workspace-module__exportedWorkspace___FZHbG",children:f?(0,fd.jsx)(Sb,{openedWindow:f,groupProps:p,actions:d,renderChrome:!1,showActionMenu:!1}):null})},Sx="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",SD="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",S_="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",SS="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function SC({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,fd.jsxs)(fd.Fragment,{children:[e({size:16}),t?(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,fd.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let Sk=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dI(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=_8(),{extension:c}=(0,cl.useContext)(cc),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],p=null!=f,m=p&&(d<i.length-1||u),h=p&&!m,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)m?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;_J(e,t,r)}};return"tablet"===a||"phone"===a?(0,fd.jsxs)(fv.Button,{className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fd.jsx)("span",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,fd.jsx)("span",{children:t})]}):(0,fd.jsx)(fv.IconButton,{align:"left","aria-label":t,className:fp()(Sx,{[S_]:p&&!h,[SS]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,fd.jsx)("div",{className:SD,children:(0,fd.jsx)(SC,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SP({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,fd.jsx)(fv.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?f7:f5,children:e?iz("showLess","Show less"):iz("showMore","Show more")})}let SO={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},SR=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i3}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cW()(t,i8),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cl.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsxs)("p",{className:SO.heading,children:[iz("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EK(e?.startDate).getTime()-EK(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fd.jsx)("li",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fd.jsx)("li",{children:"--"})})(),t.length>3&&(0,fd.jsx)("li",{className:SO.link,children:(0,fd.jsx)(cd,{to:`${window.spaBase}/home/patient-lists`,children:iz("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},ST=({patientId:e})=>{let{patient:t,isLoading:r}=dZ(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("address","Address")}),(0,fd.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,fd.jsxs)("li",{children:[iz(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,fd.jsxs)("li",{children:[iz(e,e),": ",t]},`address-${e}`)):(0,fd.jsx)("li",{children:"--"})})]})},SN=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=du({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dp()(`${i3}/patient/${e}?v=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)))`,i8);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cl.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cl.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iz(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("contactDetails","Contact Details")}),t?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,fd.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,fd.jsx)("li",{children:"--"})})]})},Sj=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i3}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cW()(e?t:null,i8),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,fd.jsxs)(fd.Fragment,{children:[(0,fd.jsx)("p",{className:SO.heading,children:iz("relationships","Relationships")}),r?(0,fd.jsx)(fv.InlineLoading,{description:`${iz("loading","Loading")} ...`,role:"progressbar"}):(0,fd.jsx)("ul",{children:t&&t.length>0?(0,fd.jsx)(fd.Fragment,{children:t.map(e=>(0,fd.jsxs)("li",{className:SO.relationship,children:[(0,fd.jsx)("div",{children:(0,fd.jsx)(cd,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fd.jsx)("div",{children:e.relationshipType}),(0,fd.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iz("yearAbbreviation","yr"):iz("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fd.jsx)("li",{children:"--"})})]})};function SA({patientId:e,deceased:t}){return(0,fd.jsxs)("div",{className:fp()(SO.contactDetails,{[SO.deceased]:t}),children:[(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(ST,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SN,{patientUuid:e})})]}),(0,fd.jsxs)("div",{className:SO.row,children:[(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(Sj,{patientId:e})}),(0,fd.jsx)("div",{className:SO.col,children:(0,fd.jsx)(SR,{patientUuid:e})})]})]})}function S$(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let SI="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SM({workspaceGroup:e,groupProps:t}){let r=dI(),{persistence:n}=e;return(0,fd.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,fd.jsxs)("div",{className:SI,children:["closable"==n&&dM(r)&&(0,fd.jsx)(fv.IconButton,{align:"left",onClick:()=>_q(),label:iz("close"),kind:"ghost",children:(0,fd.jsx)(pe,{})}),(0,fd.jsx)(cc.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fd.jsx)(cC,{className:SI,name:e.name,state:{groupProps:t}})})]})})}function SL(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}function SF(e){e&&(0,ck.createRoot)(e).render((0,fd.jsx)(SB,{}))}function SB(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=_8();if((0,cl.useEffect)(()=>lm("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(_q().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SL(t),a=SL(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,a,i)&&o(_q().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,fd.jsxs)("div",{className:fp()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,fd.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(t=>(0,fd.jsx)(SU,{openedWindow:t,groupProps:e.props,showActionMenu:s},t.windowName))}),s&&(0,fd.jsx)(SM,{workspaceGroup:o,groupProps:e.props})]})}function SU({openedWindow:e,groupProps:t,showActionMenu:r}){let{windowName:n}=e,o=(0,cl.useMemo)(()=>({closeWorkspace(e){u4.setState(t=>_9.closeWorkspace(t,e))},openChildWorkspace(e,t,r){u4.setState(n=>_9.openChildWorkspace(n,e,t,r))},setWorkspaceTitle(e,t){u4.setState(r=>_9.setWorkspaceTitle(r,e,t))},setHasUnsavedChanges(e,t){u4.setState(r=>_9.setHasUnsavedChanges(r,e,t))},promptForClosingWorkspaces(e){let t=u4.getState().openedWindows.find(e=>e.windowName===n);return t?_2(t,e):Promise.resolve(!0)}}),[n]);return(0,fd.jsx)(Sb,{openedWindow:e,groupProps:t,actions:o,renderChrome:!0,showActionMenu:r})}function SV(e,t,r){if(null==e)return r;let n=Es(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Es(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SW(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SH(e){return!!e&&e.constructor===Object}var Sz=r(7638);function SK(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function SG(e,t){return Sz(function(e){let t=e.indexOf("-");if(t>=0){let r=SK(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SK(e)}(t),e,{includePrerelease:!0})}async function SZ(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await SY(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SY(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function Sq(e,t,r,n){}function SJ(e){}function SX(e){return Promise.resolve([])}function SQ(e){return Promise.resolve([])}function S0(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function S1(e){return()=>{}}function S2(){return!0}}}]);