@cmmd-center/forge 0.13.133 → 0.13.135
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/bin.cjs +467 -42
- package/dist/bin.mjs +491 -66
- package/dist/client/assets/{CanvasPanel-BZ55yFCm.js → CanvasPanel-56JpVM3f.js} +2 -2
- package/dist/client/assets/{DiffPanel-RwcR62h1.js → DiffPanel-C4C2m32Y.js} +2 -2
- package/dist/client/assets/{DiffPanel.logic-p0v4whSE.js → DiffPanel.logic-CMUCAPGP.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-DuQCCe4H.js → DiffWorkerPoolProvider-DoKh3mrq.js} +2 -2
- package/dist/client/assets/{PullRequestCodePanel-dQ0P1BYv.js → PullRequestCodePanel-BBbZXqYj.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-Bgrpa0cR.js → ThemeEditorPanel-BdgROB68.js} +2 -2
- package/dist/client/assets/{Virtualizer-B7qA3afH.js → Virtualizer-CO7g3RAZ.js} +2 -2
- package/dist/client/assets/{WorkerPoolContext-DJIHDFVZ.js → WorkerPoolContext-CWq7MuOM.js} +2 -2
- package/dist/client/assets/{cmmdAuthRedirect-B_Ad6N4c.js → cmmdAuthRedirect-Cpw3QgrC.js} +2 -2
- package/dist/client/assets/cmmdForgeRuntimeListResource-JkNFZeb3.js +1008 -0
- package/dist/client/assets/{currentForgeWorkspaceStore-DgPGQMqz.js → currentForgeWorkspaceStore-DIu1_8w3.js} +2 -2
- package/dist/client/assets/{dialog-DMVibvkf.js → dialog-BSwJ44Xn.js} +2 -2
- package/dist/client/assets/index-D-9jWQjN.js +301 -0
- package/dist/client/assets/{popover-DZpHoNco.js → popover-ZNCjh9sJ.js} +2 -2
- package/dist/client/assets/{scroll-area-dh4WduWB.js → scroll-area-By2Wg8Aw.js} +2 -2
- package/dist/client/assets/{sidebarV2CustomSnoozeDialog-DsUlSvAq.js → sidebarV2CustomSnoozeDialog-B_dtRwFZ.js} +2 -2
- package/dist/client/assets/src-e9jwz4Nc.js +3 -0
- package/dist/client/assets/{switch-Bt0PG_99.js → switch-opCmyrUy.js} +2 -2
- package/dist/client/assets/{themePalette-rKk-Jh5K.js → themePalette-DchQFoHe.js} +2 -2
- package/dist/client/assets/{toggle-CM3FO84q.js → toggle-CGX6qKVS.js} +2 -2
- package/dist/client/assets/{toggle-group-sUSKwOOz.js → toggle-group-BRN0oZh2.js} +2 -2
- package/dist/client/assets/{tooltip-DHkQTarv.js → tooltip-Bh_PspOm.js} +2 -2
- package/dist/client/assets/{utils-B9FLzOgF.js → utils-MX9zGa4a.js} +2 -2
- package/dist/client/index.html +18 -18
- package/dist/forge-build.json +1 -1
- package/dist/{open-2-reBrpv.mjs → open-yHTUkd2Y.mjs} +3 -3
- package/package.json +1 -1
- package/dist/client/assets/cmmdForgeRuntimeListResource-uAVdZfT3.js +0 -1008
- package/dist/client/assets/index-BSqrLyPh.js +0 -301
- package/dist/client/assets/src-DpAPOFgC.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{Ha as n,Ua as r,Wa as i}from"./Stream-mUTFnSY9.js";import{At as a,H as o,L as s,M as c,Ot as l,P as u,U as d,V as f,X as p,_t as m,a as h,bt as g,f as _,ft as v,gt as y,jt as b,kt as x,l as S,mt as C,o as w,pt as T,r as E,s as D,t as O,tt as k,u as A,y as j,yt as M,z as N}from"./useOpenInteractionType-KsRrk6uH.js";import{Ct as P,J as F,K as I,St as ee,Tt as te,Vt as ne,X as L,Y as R,Z as re,b as ie,bn as z,ct as ae,dn as B,fn as V,ft as H,gn as U,h as W,hn as oe,ht as se,l as ce,lt as G,m as le,mn as ue,n as de,ot as fe,pt as pe,r as me,sn as he,st as ge,tn as _e,tt as ve,un as ye,ut as be,vn as xe,wt as Se,xn as Ce,y as we,yn as Te}from"./CompositeItem-DTyKsv13.js";import{p as Ee,t as K}from"./utils-B9FLzOgF.js";import{_ as De,a as Oe,i as ke,n as Ae,o as je,r as Me,s as Ne}from"./scroll-area-dh4WduWB.js";import{t as Pe}from"./react-D4GEJ3ir.js";import{_ as Fe,d as Ie,f as Le,i as Re,l as ze,o as Be,r as Ve,t as He,u as Ue,y as We}from"./popover-DZpHoNco.js";import{t as Ge}from"./chevron-left-1XbEOuXj.js";import{t as Ke}from"./chevron-right-DAF000Jz.js";import{t as qe}from"./minus-_j91i8bf.js";import{i as Je,n as Ye,r as Xe,t as Ze}from"./getPseudoElementBounds-DJTX-eyW.js";import{C as Qe,D as $e,E as et,N as tt,O as nt,T as rt,a as it,c as at,i as ot,j as st,o as ct,r as lt,s as ut,t as dt}from"./dialog-DMVibvkf.js";import{t as ft}from"./CompositeList-Bc8TYCyy.js";import{n as pt,r as mt,t as ht}from"./toggle-group-sUSKwOOz.js";var gt=B(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),_t=B(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),vt=B(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),yt=B(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),q=r(),J=t(i(),1);function bt(){let[,e]=J.useState({});return J.useCallback(()=>{e({})},[])}function xt(e){let t=J.useRef(!0);t.current&&(t.current=!1,e())}var St=(e,t)=>Object.is(e,t);function Ct(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function wt(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&Ct(t,e,n))}function Tt(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&Ct(e,t,n))}function Et(e,t,n,r){let i=Tt(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function Dt(e,t,n){return e.filter(e=>!Ct(t,e,n))}function Ot(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function kt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function At(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(kt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function jt(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Ot(e)}function Mt(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Ot(e.value):Ot(e)}function Nt(e,t,n){function r(){return jt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=kt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Pt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,q.jsx)(J.Fragment,{children:Nt(r,t,n)},i)),e),[])}function Ft(e){return Array.isArray(e)?e.map(e=>Ft(e)).join(`,`):e==null?``:String(e)}function It(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Lt(e,t){return e??t}var Rt=n();function zt(e){let t=(0,Rt.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,render:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a,o,s;if(t[4]!==n||t[5]!==r){let e={className:K(`inline-flex items-center gap-2 text-base/4.5 sm:text-sm/4 font-medium text-foreground`,n),"data-slot":`label`};s=De,a=`label`,o=Ce(e,r),t[4]=n,t[5]=r,t[6]=a,t[7]=o,t[8]=s}else a=t[6],o=t[7],s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==o?(c={defaultTagName:a,props:o,render:i},t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],s(c)}function Bt(e){return!!(e.hasPendingApprovals||e.hasPendingUserInput||e.session?.status===`error`&&(e.snoozedAt==null||e.session.updatedAt!==null&&Date.parse(e.session.updatedAt)>Date.parse(e.snoozedAt))||e.snoozedAt!=null&&e.latestTurn!==null&&e.latestTurn.state===`completed`&&e.latestTurn.completedAt!=null&&Date.parse(e.latestTurn.completedAt)>Date.parse(e.snoozedAt))}function Vt(e,t){if(e.snoozedUntil==null)return!1;let n=Date.parse(e.snoozedUntil);return Number.isNaN(n)||n<=Date.parse(t.now)?!1:!Bt(e)}function Ht(e){return!(e.hasPendingApprovals||e.hasPendingUserInput)}function Ut(e,t){if(Vt(e,t))return null;let n=Date.parse(e.snoozedUntil),r=Wt(e);return r!==null&&Date.parse(r)<n?r:e.snoozedUntil}function Wt(e){return e.hasPendingApprovals||e.hasPendingUserInput?e.snoozedUntil:e.session?.status===`error`&&e.session.updatedAt!=null&&(e.snoozedAt==null||Date.parse(e.session.updatedAt)>Date.parse(e.snoozedAt))?e.session.updatedAt:e.snoozedAt!=null&&e.latestTurn!==null&&e.latestTurn.state===`completed`&&e.latestTurn.completedAt!=null&&Date.parse(e.latestTurn.completedAt)>Date.parse(e.snoozedAt)?e.latestTurn.completedAt:null}var Gt=36e5,Kt=24*Gt,qt=18,Jt=9;function Yt(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function Xt(e,t){let n=new Date(e);return n.setHours(t,0,0,0),n.getTime()<=e.getTime()&&n.setDate(n.getDate()+1),n}function Zt(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}function Qt(e){let t=new Date(e.getTime()+Gt),n=new Date(e.getTime()+3*Gt),r=[{id:`hour`,label:`In 1 hour`,whenLabel:Yt(t),snoozedUntil:t.toISOString()},{id:`three-hours`,label:`In 3 hours`,whenLabel:Yt(n),snoozedUntil:n.toISOString()}],i=Xt(e,qt);i.getTime()-e.getTime()>Gt&&r.push({id:`evening`,label:`This evening`,whenLabel:Yt(i),snoozedUntil:i.toISOString()});let a=Xt(Zt(e,1),Jt);r.push({id:`tomorrow`,label:`Tomorrow`,whenLabel:Yt(a),snoozedUntil:a.toISOString()});let o=Xt(Zt(e,(1-e.getDay()+7)%7||7),Jt);return r.push({id:`next-week`,label:`Next week`,whenLabel:`${o.toLocaleDateString(void 0,{weekday:`short`})} ${Yt(o)}`,snoozedUntil:o.toISOString()}),r}function $t(e,t){let n=Date.parse(e),r=Date.parse(t.now);if(Number.isNaN(n)||Number.isNaN(r))return`now`;let i=n-r;return i<=0?`now`:i<Gt?`${Math.max(1,Math.ceil(i/6e4))}m`:i<Kt?`${Math.ceil(i/Gt)}h`:`${Math.ceil(i/Kt)}d`}function en(e,t){let n;if(e.mode===`date`){let t=Date.parse(`${e.date}T${e.time||`00:00`}`);if(Number.isNaN(t))return null;n=t}else{let r=Number(e.amount);if(!Number.isFinite(r)||r<=0)return null;let i=e.unit===`minutes`?6e4:e.unit===`hours`?Gt:Kt;n=t.getTime()+r*i}return n<=t.getTime()?null:new Date(n).toISOString()}var tn=J.createContext(null);function nn(){let e=J.useContext(tn);if(e===null)throw Error(z(60));return e}var Y={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Mt(t,r)!==``},hasNullItemLabel:(e,t)=>t?At(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>Ct(t,e,n)):Ct(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function rn(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:l=!1,onOpenChange:d,name:p,form:h,autoComplete:g,disabled:_=!1,readOnly:y=!1,required:b=!1,modal:x=!0,actionsRef:S,inputRef:C,onOpenChangeComplete:w,items:D,multiple:k=!1,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P=St,highlightItemOnHover:I=!0,children:ee}=e,{clearErrors:te}=nt(),{setDirty:ne,setTouched:L,setFocused:re,validityData:ie,setFilled:z,name:ae,disabled:B,validation:V,validationMode:H}=st(),U=et({id:t}),W=B||_,ce=ae??p,[G,de]=le({controlled:n,default:k?r??ue:r,name:`Select`,state:`value`}),[fe,pe]=le({controlled:a,default:l,name:`Select`,state:`open`}),me=J.useRef([]),he=J.useRef([]),ge=J.useRef(null),_e=J.useRef(null),ve=J.useRef(0),be=J.useRef(null),Se=J.useRef([]),we=J.useRef(!1),Ee=J.useRef(null),K=J.useRef(null),De=J.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Oe=J.useRef(!1),{mounted:ke,setMounted:je,transitionStatus:Ne}=u(fe),{openMethod:Pe,triggerProps:Fe}=O(fe),Ie=Te(()=>new s({id:U,labelId:void 0,modal:x,multiple:k,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P,value:G,open:fe,mounted:ke,transitionStatus:Ne,items:D,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Le=N(Ie,Y.activeIndex),Re=N(Ie,Y.selectedIndex),Be=N(Ie,Y.triggerElement),Ve=N(Ie,Y.positionerElement),He=ze(Pe),Ue=Pe??He,We=J.useMemo(()=>k?``:Mt(G,M),[k,G,M]),Ge=J.useMemo(()=>k&&Array.isArray(G)?G.map(e=>Mt(e,M)):Mt(G,M),[k,G,M]),Ke=m(Be),qe=F(()=>Ge);rt(Ke,U,G,qe,!W,p);let Ze=J.useRef(G),Qe=k?Array.isArray(G)&&G.length>0:G!=null&&We!==``;ye(()=>{z(Qe)},[Qe,z]),ye(function(){let e=G,t=!1;if(k){let n=Array.isArray(G)?G:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:Tt(Se.current,e,P),r=n===-1?null:n;r===null&&(K.current=null),!fe&&Ie.set(`selectedIndex`,r)},[k,fe,G,P,Ie]);function $e(e){let t=ie.initialValue;return Array.isArray(e)&&Array.isArray(t)?!It(e,t,(e,t)=>Ct(e,t,P)):e!==t}E(G,()=>{te(ce),ne($e(G)),V.change(G)});let tt=F((e,t)=>{d?.(e,t),!t.isCanceled&&(pe(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(L(!0),re(!1),H===`onBlur`&&V.commit(G)))}),it=F(()=>{je(!1),Ie.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),w?.(!1)});c({enabled:!S,open:fe,ref:ge,onComplete(){fe||it()}}),J.useImperativeHandle(S,()=>({unmount:it}),[it]);let at=F((e,t)=>{i?.(e,t),!t.isCanceled&&de(e)}),ot=F(e=>{let t=Ae(e.scrollHeight,e.clientHeight),n=Me(e.scrollTop,t),r=n>0,i=n<t;Ie.set(`scrollUpArrowVisible`,r),Ie.set(`scrollDownArrowVisible`,i)}),ct=Je({open:fe,onOpenChange:tt,elements:{reference:Be,floating:Ve}}),lt=o(ct,{enabled:!y&&!W,event:`mousedown`}),ut=f(ct),dt=Xe(ct,{enabled:!y&&!W,listRef:me,activeIndex:Le,selectedIndex:Re,disabledIndices:ue,onNavigate(e){e===null&&!fe||Ie.set(`activeIndex`,e)},focusItemOnHover:I}),ft=Ye(ct,{enabled:!y&&!W&&(fe||!k),listRef:he,activeIndex:Le,selectedIndex:Re,disabledIndices:e=>mt(me.current[e]),onMatch(e){fe?Ie.set(`activeIndex`,e):at(Se.current[e],R(se))},onTyping(e){we.current=e}}),pt=J.useMemo(()=>Ce(ft.reference,dt.reference,ut.reference,lt.reference,Fe),[lt.reference,ft.reference,dt.reference,ut.reference,Fe]),ht=J.useMemo(()=>Ce(j,ft.floating,dt.floating,ut.floating),[ft.floating,dt.floating,ut.floating]),gt=dt.item??oe;xt(()=>{Ie.update({popupProps:ht,triggerProps:pt})}),Ie.useSyncedValues({id:U,modal:x,multiple:k,value:G,open:fe,mounted:ke,transitionStatus:Ne,popupProps:ht,triggerProps:pt,items:D,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P,openMethod:Ue});let _t=J.useMemo(()=>({store:Ie,floatingContext:ct,required:b,disabled:W,readOnly:y,multiple:k,highlightItemOnHover:I,setValue:at,setOpen:tt,listRef:me,popupRef:ge,scrollHandlerRef:_e,handleScrollArrowVisibility:ot,scrollArrowsMountedCountRef:ve,itemProps:gt,valueRef:be,valuesRef:Se,labelsRef:he,typingRef:we,selectionRef:De,firstItemTextRef:Ee,selectedItemTextRef:K,validation:V,onOpenChangeComplete:w,alignItemWithTriggerActiveRef:Oe,initialValueRef:Ze}),[Ie,ct,b,W,y,k,I,at,tt,gt,V,w,ot]),vt=xe(C,V.inputRef),yt=k?void 0:ce,bt=J.useMemo(()=>!k||!Array.isArray(G)||!ce?null:G.map(e=>{let t=Mt(e,M);return(0,q.jsx)(`input`,{type:`hidden`,form:h,name:ce,value:t,disabled:W},t)}),[k,G,h,ce,M,W]);return(0,q.jsxs)(tn.Provider,{value:_t,children:[ee,(0,q.jsx)(`input`,{...V.getValidationProps(W,{onFocus(){Ie.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||W||y)return;let t=e.currentTarget.value,n=R(se,e.nativeEvent);function r(){if(k)return;let e=t.toLowerCase(),r=Se.current.findIndex(t=>Mt(t,M).toLowerCase()===e||jt(t,A).toLowerCase()===e);r===-1&&(r=Se.current.findIndex((t,n)=>{let r=he.current[n];return r!=null&&r.toLowerCase()===e}));let i=Se.current[r];i!=null&&at(i,n)}Ie.set(`forceMount`,!0),queueMicrotask(r)}}),id:U&&yt==null?`${U}-hidden-input`:void 0,form:h,name:yt,autoComplete:g,value:We,disabled:W,required:b&&!(k&&Qe),readOnly:y,ref:vt,style:ce?T:v,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),bt]})}var an=400,on={...S,...tt,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},sn=J.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:h}=st(),{labelId:_}=$e(),{store:v,setOpen:y,selectionRef:b,validation:x,readOnly:S,required:w,alignItemWithTriggerActiveRef:T,disabled:E}=nn(),D=h||E||o,O=N(v,Y.open),k=N(v,Y.mounted),A=N(v,Y.value),j=N(v,Y.triggerProps),M=N(v,Y.positionerElement),P=N(v,Y.listElement),F=N(v,Y.popupSide),I=N(v,Y.id),ee=N(v,Y.labelId),ne=N(v,Y.hasSelectedValue),L=k&&M?F:null,ie=i??I,z=Lt(_,ee);et({id:ie});let ae=m(M),B=J.useRef(null),{getButtonProps:H,buttonRef:U}=W({disabled:D,native:s}),oe=v.useStateSetter(`triggerElement`),ce=a(),G=a(),le=a();J.useEffect(()=>{if(O)return le.start(an,()=>{b.current.allowUnselectedMouseUp=!0,b.current.allowSelectedMouseUp=!0}),()=>{le.clear()};b.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[O,b,G,le]);let ue=Ce(j,{id:ie,role:`combobox`,"aria-expanded":O,"aria-haspopup":`listbox`,"aria-controls":O?P?.id??g(M)?.id:void 0,"aria-labelledby":z,"aria-readonly":S||void 0,"aria-required":w||void 0,tabIndex:D?-1:0,onFocus(e){d(!0),O&&T.current&&y(!1,R(se,e.nativeEvent)),ce.start(0,()=>{v.set(`forceMount`,!0)})},onBlur(e){te(M,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&x.commit(A))},onMouseDown(e){if(O)return;let t=C(e.currentTarget);function n(e){if(!B.current)return;let t=e.target;te(B.current,t)||te(ae.current,t)||Ze(e,B.current)||y(!1,R(re,e))}G.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,H),de=x.getValidationProps(D,ue);de.role=`combobox`;let fe={...p,open:O,disabled:D,value:A,readOnly:S,popupSide:L,placeholder:!ne};return V(`button`,e,{ref:[t,B,U,oe],state:fe,stateAttributesMapping:on,props:de})}),cn={value:()=>null},ln=J.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=nn(),u=N(c,Y.value),d=N(c,Y.items),f=N(c,Y.itemToStringLabel),p=N(c,Y.hasSelectedValue),m=!p&&a!=null&&i==null,h=N(c,Y.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(m&&!h?a:Array.isArray(u)?Pt(u,d,f):Nt(u,d,f)),V(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:cn})}),un=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=nn(),s={open:N(o,Y.open)};return V(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:A})}),dn=J.forwardRef(function(e,t){let{store:n}=nn(),r=N(n,Y.mounted),i=N(n,Y.forceMount);return r||i?(0,q.jsx)(p,{ref:t,...e}):null}),fn=J.createContext(void 0);function pn(){let e=J.useContext(fn);if(!e)throw Error(z(59));return e}function mn(e,t){e&&Object.assign(e.style,t)}var hn={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},gn={position:`fixed`},_n=J.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:g=!0,collisionAvoidance:_=k,style:v,...y}=e,{store:b,listRef:x,labelsRef:S,alignItemWithTriggerActiveRef:C,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:O,setValue:A,floatingContext:j}=nn(),M=N(b,Y.open),P=N(b,Y.mounted),I=N(b,Y.modal),ee=N(b,Y.value),te=N(b,Y.openMethod),ne=N(b,Y.positionerElement),L=N(b,Y.triggerElement),re=N(b,Y.isItemEqualToValue),ie=N(b,Y.transitionStatus),z=J.useRef(null),ae=J.useRef(null),[B,V]=J.useState(g),H=P&&B&&te!==`touch`;!P&&B!==g&&V(g),J.useImperativeHandle(C,()=>H),Be((H||I)&&M,te===`touch`,ne,L);let U=Le({anchor:n,floatingRootContext:j,positionMethod:a,mounted:P,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:_,keepMounted:!0}),W=H?`none`:U.side,oe=H?gn:U.positionerStyles,ce={open:M,side:W,align:U.align,anchorHidden:U.anchorHidden};ye(()=>{b.set(`popupSide`,U.side)},[b,U.side]);let G=b.useStateSetter(`positionerElement`),le=Ue(e,ce,{styles:oe,transitionStatus:ie,props:y,refs:[t,G],hidden:!P,inert:!M}),ue=J.useRef(0),de=F(e=>{if(E.current.length===0)return;let t=ue.current;if(ue.current=e.size,e.size===t)return;let n=R(se);if(t!==0&&!b.state.multiple&&ee!==null&&Tt(E.current,ee,re)===-1){let e=D.current,t=e!=null&&Tt(E.current,e,re)!==-1?e:null;A(t,n),t===null&&(b.set(`selectedIndex`,null),T.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(ee)){let e=ee.filter(e=>Tt(E.current,e,re)!==-1);e.length!==ee.length&&(A(e,n),e.length===0&&(b.set(`selectedIndex`,null),T.current=null))}if(M&&H){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};mn(ne,e),mn(O.current,e)}}),fe=J.useMemo(()=>({...U,side:W,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:z,scrollDownArrowRef:ae}),[U,W,H,V]);return(0,q.jsx)(ft,{elementsRef:x,labelsRef:S,onMapChange:de,children:(0,q.jsxs)(fn.Provider,{value:fe,children:[P&&I&&(0,q.jsx)(h,{inert:w(!M),cutout:L}),le]})})}),vn={...D,..._},yn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:u,onOpenChangeComplete:f,setOpen:p,valueRef:m,firstItemTextRef:h,selectedItemTextRef:g,multiple:_,handleScrollArrowVisibility:v,scrollHandlerRef:b,listRef:x,highlightItemOnHover:S,floatingContext:w}=nn(),{side:T,align:E,alignItemWithTriggerActive:D,isPositioned:O,setControlledAlignItemWithTrigger:k}=pn(),A=de(!0)!=null,j=we(),{nonce:I,disableStyleElements:ee}=ke(),te=N(s,Y.id),L=N(s,Y.open),re=N(s,Y.openMethod),ie=N(s,Y.mounted),z=N(s,Y.popupProps),ae=N(s,Y.transitionStatus),B=N(s,Y.triggerElement),H=N(s,Y.positionerElement),U=N(s,Y.listElement),W=J.useRef(!1),oe=J.useRef(!1),se=J.useRef({}),G=y(),le=F(e=>{if(!H||!u.current||!oe.current)return;let t=H.style.top===`0px`,n=H.style.bottom===`0px`;if(W.current||!D||!t&&!n){v(e);return}let r=Sn(H),i=Cn(H.getBoundingClientRect().height,`y`,r),a=C(H),o=ne(H),s=o.getComputedStyle(H),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),d=bn(o.getComputedStyle(u.current)),f=Math.min(a.documentElement.clientHeight-c-l,d),p=e.scrollTop,m=xn(e),h=null,g=e=>{H.style.height=`${e}px`},_=t?m-p:p,y=Math.min(i+_,f);if(_<=1){let n=je(_,0,f-i);n>0&&g(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(W.current=!0),v(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(_-(i+_-f)));let b=Math.ceil(y);if(b!==0&&g(b),h!=null){let t=je(h,0,xn(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(W.current=!0),v(e)});J.useImperativeHandle(b,()=>le,[le]),c({open:L,ref:u,onComplete(){L&&f?.(!0)}});let ue={open:L,transitionStatus:ae,side:T,align:E};ye(()=>{!H||!u.current||Object.keys(se.current).length||(se.current={top:H.style.top||`0`,left:H.style.left||`0`,right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[u,H]),ye(()=>{L||D||(oe.current=!1,W.current=!1,mn(H,se.current))},[L,D,H,u]),ye(()=>{let e=u.current;if(!L||!B||!H||!e||D&&!O||s.state.transitionStatus===`ending`)return;if(oe.current=!0,e.style.removeProperty(`--transform-origin`),!D){G.request(()=>v(U||e));return}let t=En(e);try{let t=g.current;t?.isConnected||(t=!Y.hasSelectedValue(s.state)&&h.current?.isConnected?h.current:null);let n=m.current,r=ne(H),i=r.getComputedStyle(H),a=r.getComputedStyle(e),o=C(B),c=Sn(B),u=wn(B.getBoundingClientRect(),c),d=wn(H.getBoundingClientRect(),c),f=u.height,p=U||e,_=p.scrollHeight,y=parseFloat(a.borderBottomWidth),b=parseFloat(i.marginTop)||10,w=parseFloat(i.marginBottom)||10,T=parseFloat(i.minHeight)||100,E=bn(a),D=o.documentElement.clientHeight-b-w,O=o.documentElement.clientWidth,A=D-u.bottom+f,M,N=j===`rtl`?u.right-d.width:u.left,P=0;if(t&&n){let e=wn(n.getBoundingClientRect(),c);M=wn(t.getBoundingClientRect(),c),N=d.left+(j===`rtl`?e.right-M.right:e.left-M.left);let r=e.top-u.top+e.height/2;P=M.top-d.top+M.height/2-r}let F=A+P+w+y,I=Math.min(D,F),ee=D-b-w,te=F-I,L=O-5;H.style.left=`${je(N,5,L-d.width)}px`,H.style.height=`${I}px`,H.style.maxHeight=`none`,H.style.marginTop=`${b}px`,H.style.marginBottom=`${w}px`,e.style.height=`100%`;let R=xn(p),re=te>=R-1;re&&(I=Math.min(D,d.height)-(te-R));let ie=u.top<20||u.bottom>D-20||Math.ceil(I)+1<Math.min(_,T),z=(r.visualViewport?.scale??1)!==1&&l;if(ie||z){mn(H,se.current),k(!1);return}let ae=Math.max(T,I);if(re){let e=Math.max(0,D-F);H.style.top=d.height>=ee?`0`:`${e}px`,H.style.height=`${I}px`,p.scrollTop=xn(p)}else H.style.bottom=`0`,p.scrollTop=te;if(M){let t=d.top,n=d.height,r=M.top+M.height/2,i=je(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ae===D||I>=E)&&(W.current=!0),v(p),S&&s.state.selectedIndex===null&&s.state.activeIndex===null&&x.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,L,H,B,m,h,g,u,v,D,k,G,U,x,S,j,O]),J.useEffect(()=>{if(!D||!H||!L)return;let e=ne(H);function t(e){p(!1,R(P,e))}return M(e,`resize`,t)},[p,D,H,L]);let fe={...U?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${te}-list`},onKeyDown(e){A&&ce.has(e.key)&&e.stopPropagation()},onScroll(e){U||le(e.currentTarget)},...D&&{style:U?{height:`100%`}:hn},className:!U&&D?Oe.className:void 0},pe=V(`div`,e,{ref:[t,u],state:ue,stateAttributesMapping:vn,props:[z,fe,Ie(ae),o]});return(0,q.jsxs)(J.Fragment,{children:[!ee&&Oe.getElement(I),(0,q.jsx)(d,{context:w,modal:!1,disabled:!ie,openInteractionType:re,returnFocus:a,restoreFocus:!0,children:pe})]})});function bn(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function xn(e){return Ae(e.scrollHeight,e.clientHeight)}function Sn(e){return Fe.getScale(e)}function Cn(e,t,n){return e/n[t]}function wn(e,t){return I({x:Cn(e.x,`x`,t),y:Cn(e.y,`y`,t),width:Cn(e.width,`x`,t),height:Cn(e.height,`y`,t)})}var Tn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function En(e){let{style:t}=e,n={};for(let[e,r]of Tn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Tn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Dn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=nn(),{alignItemWithTriggerActive:l}=pn(),u=N(o,Y.hasScrollArrows),d=N(o,Y.openMethod),f={id:`${N(o,Y.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:hn},className:u&&d!==`touch`?Oe.className:void 0},p=o.useStateSetter(`listElement`);return V(`div`,e,{ref:[t,p],props:[f,a]})}),On=J.createContext(void 0);function kn(){let e=J.useContext(On);if(!e)throw Error(z(57));return e}var An=J.memo(J.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=J.useRef(null),d=me({guess:!0,label:o,textRef:u}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b,disabled:x,readOnly:S}=nn(),C=x||s,w=N(f,Y.isActive,d.index),T=N(f,Y.open),E=N(f,Y.isSelected,a),D=N(f,Y.isSelectedByFocus,d.index),O=N(f,Y.isItemEqualToValue),k=d.index,A=J.useRef(null);ye(()=>{let e=v.current;return e[k]=a,()=>{delete e[k]}},[k,a,v]),ye(()=>{let e=f.state.value,t=e;y&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&Ct(a,t,O)&&(f.set(`selectedIndex`,k),u.current&&(b.current=u.current))},[k,y,O,f,a,b]);let j=J.useRef(`mouse`),M=J.useRef(!1),{getButtonProps:P,buttonRef:F}=W({disabled:C,focusableWhenDisabled:!0,native:c,composite:!0}),I={disabled:C,selected:E,highlighted:w};function ee(e){if(x||S)return;let t=f.state.value;if(y){let n=Array.isArray(t)?t:[],r=E?Dt(n,a,O):[...n,a];h(r,R(H,e))}else h(a,R(H,e)),m(!1,R(H,e))}function te(){g.current.dragY=0}let ne={role:`option`,"aria-selected":E,tabIndex:T&&w?0:-1,onKeyDown(e){f.set(`activeIndex`,k),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=j.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&_e(e.nativeEvent)&&(n!==void 0||w),i=t&&!r&&!M.current;M.current=!1,!(C||i)&&ee(e.nativeEvent)},onPointerEnter(e){j.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){j.current=e.pointerType,M.current=!0,te()},onMouseUp(){if(te(),C||j.current===`touch`||M.current)return;let e=!g.current.allowSelectedMouseUp&&E,t=!g.current.allowUnselectedMouseUp&&!E;e||t||(M.current=!0,A.current?.click(),M.current=!1)}},L=V(`div`,e,{ref:[F,t,d.ref,A],state:I,props:[p,ne,l,P]}),re=J.useMemo(()=>({selected:E,index:k,textRef:u,selectedByFocus:D}),[E,k,u,D]);return(0,q.jsx)(On.Provider,{value:re,children:L})})),jn=J.forwardRef(function(e,t){let{selected:n}=kn();return e.keepMounted||n?(0,q.jsx)(Mn,{...e,ref:t}):null}),Mn=J.memo(J.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=kn(),l=J.useRef(null),{transitionStatus:d,setMounted:f}=u(s),p=V(`span`,e,{ref:[t,l],state:{selected:s,transitionStatus:d},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:_});return c({open:s,ref:l,onComplete(){s||f(!1)}}),p})),Nn=J.memo(J.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=kn(),{firstItemTextRef:a,selectedItemTextRef:o}=nn(),{render:s,className:c,style:l,...u}=e,d=J.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return V(`div`,e,{ref:[d,t,r],props:u})})),Pn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:o,keepMounted:s,...l}=e,d=o===`up`,{store:f,popupRef:p,listRef:m,handleScrollArrowVisibility:h,scrollArrowsMountedCountRef:g}=nn(),{side:v,scrollDownArrowRef:y,scrollUpArrowRef:b}=pn(),x=d?Y.scrollUpArrowVisible:Y.scrollDownArrowVisible,S=N(f,x),C=N(f,Y.openMethod),w=S&&C!==`touch`,T=a(),E=d?b:y,{mounted:D,transitionStatus:O,setMounted:k}=u(w);ye(()=>(g.current+=1,f.set(`hasScrollArrows`,!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&f.set(`hasScrollArrows`,!1)}),[f,g]),c({open:w,ref:E,onComplete(){w||k(!1)}});let A=V(`div`,e,{ref:[t,E],state:{direction:o,visible:w,side:v,transitionStatus:O},props:[{"aria-hidden":!0,children:d?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||T.isStarted())return;f.set(`activeIndex`,null);function t(){let e=f.state.listElement??p.current;if(!e)return;f.set(`activeIndex`,null),h(e);let n=Ae(e.scrollHeight,e.clientHeight),r=Me(e.scrollTop,n),i=r===(d?0:n),a=m.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){T.clear();return}if(a.length>0){let t=E.current?.offsetHeight||0;e.scrollTop=Fn(a,d,r,e.clientHeight,t,n)}T.start(40,t)}T.start(40,t)},onMouseLeave(){T.clear()}},l],stateAttributesMapping:_});return D||s?A:null});function Fn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Me(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Me(l.offsetTop+l.offsetHeight-r+i,a):a}var In=J.forwardRef(function(e,t){return(0,q.jsx)(Pn,{...e,ref:t,direction:`down`})}),Ln=J.forwardRef(function(e,t){return(0,q.jsx)(Pn,{...e,ref:t,direction:`up`})}),Rn=J.createContext(void 0);function zn(){let e=J.useContext(Rn);if(e===void 0)throw Error(z(56));return e}var Bn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=J.useState(),c=J.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=V(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,q.jsx)(Rn.Provider,{value:c,children:l})}),Vn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=zn(),c=ie(a);return ye(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),V(`div`,e,{ref:t,props:[{id:c},o]})}),Hn=rn,Un=Ee(`relative inline-flex cursor-pointer select-none items-center justify-between gap-2 border rounded-lg text-left text-base outline-none transition-[color,box-shadow,background-color] data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,{defaultVariants:{size:`default`,variant:`default`},variants:{variant:{default:`w-full min-w-36 border-input bg-background not-dark:bg-clip-padding text-foreground shadow-xs/5 ring-ring/24 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive-border focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive-border dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,ghost:`border-transparent text-muted-foreground/70 focus-visible:ring-2 focus-visible:ring-ring data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-foreground/80`},size:{default:`min-h-9 px-[calc(--spacing(3)-1px)] sm:min-h-8`,lg:`min-h-10 px-[calc(--spacing(3)-1px)] sm:min-h-9`,sm:`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`}}});function Wn(e){let t=(0,Rt.c)(20),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,size:o,variant:s,children:n,icon:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=o===void 0?`default`:o,l=s===void 0?`default`:s,u;t[7]!==r||t[8]!==c||t[9]!==l?(u=K(Un({size:c,variant:l}),r),t[7]=r,t[8]=c,t[9]=l,t[10]=u):u=t[10];let d;t[11]===i?d=t[12]:(d=i??(0,q.jsx)(We,{className:`size-3 opacity-50`}),t[11]=i,t[12]=d);let f;t[13]===d?f=t[14]:(f=(0,q.jsx)(un,{"data-slot":`select-icon`,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==n||t[16]!==a||t[17]!==u||t[18]!==f?(p=(0,q.jsxs)(sn,{className:u,"data-slot":`select-trigger`,...a,children:[n,f]}),t[15]=n,t[16]=a,t[17]=u,t[18]=f,t[19]=p):p=t[19],p}function Gn(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`flex-1 truncate data-placeholder:text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(ln,{className:i,"data-slot":`select-value`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kn(e){let t=(0,Rt.c)(28),n,r,i,a,o,s,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9]):({className:i,children:r,side:o,sideOffset:s,align:c,alignOffset:l,alignItemWithTrigger:u,anchor:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u);let d=o===void 0?`bottom`:o,f=s===void 0?4:s,p=c===void 0?`start`:c,m=l===void 0?0:l,h=u===void 0||u,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,q.jsx)(Ln,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover`,"data-slot":`select-scroll-up-arrow`,children:(0,q.jsx)(_t,{className:`relative size-4.5 sm:size-4`})}),t[10]=g):g=t[10];let _;t[11]===i?_=t[12]:(_=K(`max-h-(--available-height) overflow-y-auto p-1`,i),t[11]=i,t[12]=_);let v;t[13]!==r||t[14]!==_?(v=(0,q.jsx)(`div`,{className:`dropdown-glass relative h-full min-w-(--anchor-width) rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,children:(0,q.jsx)(Dn,{className:_,"data-slot":`select-list`,children:r})}),t[13]=r,t[14]=_,t[15]=v):v=t[15];let y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,q.jsx)(In,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover`,"data-slot":`select-scroll-down-arrow`,children:(0,q.jsx)(We,{className:`relative size-4.5 sm:size-4`})}),t[16]=y):y=t[16];let b;t[17]!==a||t[18]!==v?(b=(0,q.jsxs)(yn,{className:`origin-(--transform-origin) text-foreground`,"data-slot":`select-popup`,...a,children:[g,v,y]}),t[17]=a,t[18]=v,t[19]=b):b=t[19];let x;return t[20]!==p||t[21]!==h||t[22]!==m||t[23]!==n||t[24]!==d||t[25]!==f||t[26]!==b?(x=(0,q.jsx)(dn,{children:(0,q.jsx)(_n,{align:p,alignItemWithTrigger:h,alignOffset:m,anchor:n,className:`z-50 select-none`,"data-slot":`select-positioner`,side:d,sideOffset:f,children:b})}),t[20]=p,t[21]=h,t[22]=m,t[23]=n,t[24]=d,t[25]=f,t[26]=b,t[27]=x):x=t[27],x}function qn(e){let t=(0,Rt.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a!==void 0&&a,s=o?`grid-cols-[1fr] ps-3 pe-3`:`grid-cols-[1rem_1fr] ps-2 pe-4`,c;t[5]!==r||t[6]!==s?(c=K(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let l;t[8]===o?l=t[9]:(l=o?null:(0,q.jsx)(jn,{className:`col-start-1`,"data-slot":`select-item-indicator`,children:(0,q.jsx)(`svg`,{fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,q.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),t[8]=o,t[9]=l);let u=o?`col-start-1`:`col-start-2`,d;t[10]===u?d=t[11]:(d=K(`min-w-0`,u),t[10]=u,t[11]=d);let f;t[12]!==n||t[13]!==d?(f=(0,q.jsx)(Nn,{className:d,"data-slot":`select-item-text`,children:n}),t[12]=n,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==i||t[16]!==c||t[17]!==l||t[18]!==f?(p=(0,q.jsxs)(An,{className:c,"data-slot":`select-item`,...i,children:[l,f]}),t[15]=i,t[16]=c,t[17]=l,t[18]=f,t[19]=p):p=t[19],p}function Jn(e){let t=(0,Rt.c)(2),n;return t[0]===e?n=t[1]:(n=(0,q.jsx)(Bn,{"data-slot":`select-group`,...e}),t[0]=e,t[1]=n),n}function Yn(e){let t=(0,Rt.c)(2),n;return t[0]===e?n=t[1]:(n=(0,q.jsx)(Vn,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,"data-slot":`select-group-label`,...e}),t[0]=e,t[1]=n),n}function Xn(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var Zn={},Qn={};function $n(e,t){try{let n=(Zn[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in Qn?Qn[n]:tr(n,n.split(`:`))}catch{if(e in Qn)return Qn[e];let t=e?.match(er);return t?tr(e,t.slice(1)):NaN}}var er=/([+-]\d\d):?(\d\d)?/;function tr(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return Qn[e]=n*60+r>0?n*60+r+i:n*60-r-i}var nr=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN($n(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),or(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-$n(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),ir(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},rr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!rr.test(e))return;let t=e.replace(rr,`$1UTC`);nr.prototype[t]&&(e.startsWith(`get`)?nr.prototype[e]=function(){return this.internal[t]()}:(nr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),ar(this),+this},nr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ir(this),+this}))});function ir(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-$n(e.timeZone,e)*60))}function ar(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),or(e)}function or(e,t){let n=Array.isArray(t)?sr(t):+e.internal,r=$n(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),s=-new Date(+a).getTimezoneOffset(),c=o-s,l=o;if(c&&o!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=o-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=$n(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(l=s)}let u=l-i;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let d=new Date(+e);d.setUTCSeconds(0);let f=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-($n(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=$n(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-h,_=h!==i,v=g-u,y=h-i,b=n-h*60*1e3,x=y>0&&cr(e)-n===y*60*1e3&&cr(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=$n(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}ir(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<18e5&&(Date.prototype.setTime.call(e,+e+S),ir(e))}function sr(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function cr(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-$n(e.timeZone,n)*60)),+n}var lr=class e extends nr{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Xn(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},ur=365.2425,dr=6048e5,fr=864e5,pr=86400;pr*7,pr*ur/12*3;var mr=Symbol.for(`constructDateFrom`);function hr(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&mr in e?e[mr](t):e instanceof Date?new e.constructor(t):new Date(t)}function X(e,t){return hr(t||e,e)}function gr(e,t,n){let r=X(e,n?.in);return isNaN(t)?hr(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function _r(e,t,n){let r=X(e,n?.in);if(isNaN(t))return hr(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=hr(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}var vr={};function yr(){return vr}function br(e,t){let n=yr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=X(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function xr(e,t){return br(e,{...t,weekStartsOn:1})}function Sr(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=hr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=xr(i),o=hr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=xr(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Cr(e){let t=X(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function wr(e,...t){let n=hr.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Tr(e,t){let n=X(e,t?.in);return n.setHours(0,0,0,0),n}function Er(e,t,n){let[r,i]=wr(n?.in,e,t),a=Tr(r),o=Tr(i),s=+a-Cr(a),c=+o-Cr(o);return Math.round((s-c)/fr)}function Dr(e,t){let n=Sr(e,t),r=hr(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xr(r)}function Or(e,t,n){return gr(e,t*7,n)}function kr(e,t,n){return _r(e,t*12,n)}function Ar(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=hr.bind(null,e));let t=X(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),hr(r,n||NaN)}function jr(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=hr.bind(null,e));let t=X(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),hr(r,n||NaN)}function Mr(e,t,n){let[r,i]=wr(n?.in,e,t);return+Tr(r)==+Tr(i)}function Nr(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Pr(e){return!(!Nr(e)&&typeof e!=`number`||isNaN(+X(e)))}function Fr(e,t,n){let[r,i]=wr(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function Ir(e,t){let n=X(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Lr(e,t){let[n,r]=wr(e,t.start,t.end);return{start:n,end:r}}function Rr(e,t){let{start:n,end:r}=Lr(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(hr(n,o)),o.setMonth(o.getMonth()+s);return i?c.reverse():c}function zr(e,t){let n=X(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Br(e,t){let n=X(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Vr(e,t){let n=X(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Hr(e,t){let{start:n,end:r}=Lr(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(hr(n,o)),o.setFullYear(o.getFullYear()+s);return i?c.reverse():c}function Ur(e,t){let n=yr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=X(e,t?.in),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function Wr(e,t){return Ur(e,{...t,weekStartsOn:1})}var Gr={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},Kr=(e,t,n)=>{let r,i=Gr[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function qr(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Jr={date:qr({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:qr({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:qr({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Yr={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Xr=(e,t,n,r)=>Yr[e];function Zr(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var Qr={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Zr({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Zr({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Zr({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Zr({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Zr({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function $r(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ti(s,e=>e.test(o)):ei(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ei(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ti(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ni(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ri={code:`en-US`,formatDistance:Kr,formatLong:Jr,formatRelative:Xr,localize:Qr,match:{ordinalNumber:ni({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$r({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:$r({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:$r({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:$r({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:$r({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ii(e,t){let n=X(e,t?.in);return Er(n,Vr(n))+1}function ai(e,t){let n=X(e,t?.in),r=xr(n)-+Dr(n);return Math.round(r/dr)+1}function oi(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=yr(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=hr(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=br(o,t),c=hr(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=br(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function si(e,t){let n=yr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=oi(e,t),a=hr(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),br(a,t)}function ci(e,t){let n=X(e,t?.in),r=br(n,t)-+si(n,t);return Math.round(r/dr)+1}function Z(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var li={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return Z(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):Z(n+1,2)},d(e,t){return Z(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return Z(e.getHours()%12||12,t.length)},H(e,t){return Z(e.getHours(),t.length)},m(e,t){return Z(e.getMinutes(),t.length)},s(e,t){return Z(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return Z(Math.trunc(r*10**(n-3)),t.length)}},ui={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},di={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return li.y(e,t)},Y:function(e,t,n,r){let i=oi(e,r),a=i>0?i:1-i;return t===`YY`?Z(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):Z(a,t.length)},R:function(e,t){return Z(Sr(e),t.length)},u:function(e,t){return Z(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return Z(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return Z(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return li.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return Z(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=ci(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):Z(i,t.length)},I:function(e,t,n){let r=ai(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):Z(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):li.d(e,t)},D:function(e,t,n){let r=ii(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):Z(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return Z(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return Z(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return Z(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?ui.noon:r===0?ui.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?ui.evening:r>=12?ui.afternoon:r>=4?ui.morning:ui.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return li.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):li.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):Z(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):Z(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):li.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):li.s(e,t)},S:function(e,t){return li.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return pi(r);case`XXXX`:case`XX`:return mi(r);default:return mi(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return pi(r);case`xxxx`:case`xx`:return mi(r);default:return mi(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+fi(r,`:`);default:return`GMT`+mi(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+fi(r,`:`);default:return`GMT`+mi(r,`:`)}},t:function(e,t,n){return Z(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return Z(+e,t.length)}};function fi(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Z(a,2)}function pi(e,t){return e%60==0?(e>0?`-`:`+`)+Z(Math.abs(e)/60,2):mi(e,t)}function mi(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Z(Math.trunc(r/60),2),a=Z(r%60,2);return n+i+t+a}var hi=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},gi=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},_i={p:gi,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hi(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,hi(r,t)).replace(`{{time}}`,gi(i,t))}},vi=/^D+$/,yi=/^Y+$/,bi=[`D`,`DD`,`YY`,`YYYY`];function xi(e){return vi.test(e)}function Si(e){return yi.test(e)}function Ci(e,t,n){let r=wi(e,t,n);if(console.warn(r),bi.includes(e))throw RangeError(r)}function wi(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ti=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ei=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Di=/^'([^]*?)'?$/,Oi=/''/g,ki=/[a-zA-Z]/;function Ai(e,t,n){let r=yr(),i=n?.locale??r.locale??ri,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=X(e,n?.in);if(!Pr(s))throw RangeError(`Invalid time value`);let c=t.match(Ei).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=_i[t];return n(e,i.formatLong)}return e}).join(``).match(Ti).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:ji(e)};if(di[t])return{isToken:!0,value:e};if(t.match(ki))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&Si(a)||!n?.useAdditionalDayOfYearTokens&&xi(a))&&Ci(a,t,String(e));let o=di[a[0]];return o(s,a,i.localize,l)}).join(``)}function ji(e){let t=e.match(Di);return t?t[1].replace(Oi,`'`):e}function Mi(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=hr(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Ni(e,t){return X(e,t?.in).getMonth()}function Pi(e,t){return X(e,t?.in).getFullYear()}function Fi(e,t){return+X(e)>+X(t)}function Ii(e,t){return+X(e)<+X(t)}function Li(e,t,n){let[r,i]=wr(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Ri(e,t,n){let[r,i]=wr(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function zi(e,t,n){let r=X(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=hr(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Mi(o);return r.setMonth(t,Math.min(a,s)),r}function Bi(e,t,n){let r=X(e,n?.in);return isNaN(+r)?hr(n?.in||e,NaN):(r.setFullYear(t),r)}var Vi=5,Hi=4;function Ui(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,34);return t.getMonth(e)===t.getMonth(a)?Vi:Hi}function Wi(e,t){let n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Gi(e,t){let n=Wi(e,t),r=Ui(e,t);return t.addDays(n,r*7-1)}var Ki={...ri,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>Ai(e,t,{locale:ri,...n});let a=i(e,`PPPP`);return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:`Choose the Month`,labelNext:`Go to the Next Month`,labelPrevious:`Go to the Previous Month`,labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:`Choose the Year`,labelGrid:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>Ai(e,n,{locale:ri,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>Ai(e,t,{locale:ri,...n});let a=i(e,`PPPP`);return t?.today&&(a=`Today, ${a}`),a},labelNav:`Navigation bar`,labelWeekNumberHeader:`Week Number`,labelWeekday:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>Ai(e,n,{locale:ri,...t}),r(e,`cccc`)}}},qi=class e{constructor(e,t){this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?lr.tz(this.options.timeZone):new(this.options.Date??Date),this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new lr(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):gr(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):_r(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):Or(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):kr(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Er(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):Fr(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):Rr(e),this.eachYearOfInterval=e=>{let t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):Hr(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;let r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):Gi(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):Wr(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):Ir(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):Ur(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):Br(e),this.format=(e,t,n)=>{let r=this.overrides?.format?this.overrides.format(e,t,this.options):Ai(e,t,this.options);return this.options.numerals&&this.options.numerals!==`latn`?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):ai(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):Ni(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):Pi(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):ci(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):Fi(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):Ii(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Nr(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):Mr(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):Li(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):Ri(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):Ar(e),this.min=e=>this.overrides?.min?this.overrides.min(e):jr(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):zi(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):Bi(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):Wi(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Tr(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):xr(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):zr(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):br(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Vr(e),this.options={locale:Ki,...e},this.overrides=t}getDigitMap(){let{numerals:e=`latn`}=this.options,t=new Intl.NumberFormat(`en-US`,{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){let t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){let t=this.options.locale?.code;return t&&e.yearFirstLocales.has(t)?`year-first`:`month-first`}formatMonthYear(t){let{locale:n,timeZone:r,numerals:i}=this.options,a=n?.code;if(a&&e.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:`long`,year:`numeric`,timeZone:r,numberingSystem:i}).format(t)}catch{}let o=this.getMonthYearOrder()===`year-first`?`y LLLL`:`LLLL y`;return this.format(t,o)}};qi.yearFirstLocales=new Set([`eu`,`hu`,`ja`,`ja-Hira`,`ja-JP`,`ko`,`ko-KR`,`lt`,`lt-LT`,`lv`,`lv-LV`,`mn`,`mn-MN`,`zh`,`zh-CN`,`zh-HK`,`zh-TW`]);var Ji=new qi,Yi=class{constructor(e,t,n=Ji){this.date=e,this.displayMonth=t,this.outside=!!(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,`yyyy-MM-dd`),this.displayMonthId=n.format(t,`yyyy-MM`),this.dateMonthId=n.format(e,`yyyy-MM`)}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}},Xi=class{constructor(e,t){this.date=e,this.weeks=t}},Zi=class{constructor(e,t){this.days=t,this.weekNumber=e}};function Qi(e){return J.createElement(`span`,{...e})}function $i(e){let{size:t=24,orientation:n=`left`,className:r,style:i}=e;return J.createElement(`svg`,{className:r,style:i,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&J.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&J.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&J.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&J.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}function ea(e){let{day:t,modifiers:n,...r}=e;return J.createElement(`td`,{...r})}function ta(e){let{day:t,modifiers:n,...r}=e,i=J.useRef(null);return J.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),J.createElement(`button`,{ref:i,...r})}var Q;(function(e){e.Root=`root`,e.Chevron=`chevron`,e.Day=`day`,e.DayButton=`day_button`,e.CaptionLabel=`caption_label`,e.Dropdowns=`dropdowns`,e.Dropdown=`dropdown`,e.DropdownRoot=`dropdown_root`,e.Footer=`footer`,e.MonthGrid=`month_grid`,e.MonthCaption=`month_caption`,e.MonthsDropdown=`months_dropdown`,e.Month=`month`,e.Months=`months`,e.Nav=`nav`,e.NextMonthButton=`button_next`,e.PreviousMonthButton=`button_previous`,e.Week=`week`,e.Weeks=`weeks`,e.Weekday=`weekday`,e.Weekdays=`weekdays`,e.WeekNumber=`week_number`,e.WeekNumberHeader=`week_number_header`,e.YearsDropdown=`years_dropdown`})(Q||={});var $;(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})($||={});var na;(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(na||={});var ra;(function(e){e.weeks_before_enter=`weeks_before_enter`,e.weeks_before_exit=`weeks_before_exit`,e.weeks_after_enter=`weeks_after_enter`,e.weeks_after_exit=`weeks_after_exit`,e.caption_after_enter=`caption_after_enter`,e.caption_after_exit=`caption_after_exit`,e.caption_before_enter=`caption_before_enter`,e.caption_before_exit=`caption_before_exit`})(ra||={});var ia=(0,J.createContext)(void 0);function aa(){let e=(0,J.useContext)(ia);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}function oa(e){let{options:t,className:n,...r}=e,{classNames:i,components:a,styles:o}=aa(),s=[i[Q.Dropdown],n].join(` `),c=t?.find(({value:e})=>e===r.value);return J.createElement(`span`,{"data-disabled":r.disabled,className:i[Q.DropdownRoot],style:o?.[Q.DropdownRoot]},J.createElement(a.Select,{className:s,...r},t?.map(({value:e,label:t,disabled:n})=>J.createElement(a.Option,{key:e,value:e,disabled:n},t))),J.createElement(`span`,{className:i[Q.CaptionLabel],style:o?.[Q.CaptionLabel],"aria-hidden":!0},c?.label,J.createElement(a.Chevron,{orientation:`down`,size:18,className:i[Q.Chevron],style:o?.[Q.Chevron]})))}function sa(e){return J.createElement(`div`,{...e})}function ca(e){return J.createElement(`div`,{...e})}function la(e){let{calendarMonth:t,displayIndex:n,...r}=e;return J.createElement(`div`,{...r},e.children)}function ua(e){let{calendarMonth:t,displayIndex:n,...r}=e;return J.createElement(`div`,{...r})}function da(e){return J.createElement(`table`,{...e})}function fa(e){return J.createElement(`div`,{...e})}function pa(e){let{components:t}=aa();return J.createElement(t.Dropdown,{...e})}function ma(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,styles:c,labels:{labelPrevious:l,labelNext:u}}=aa(),d=(0,J.useCallback)(e=>{i&&n?.(e)},[i,n]),f=(0,J.useCallback)(e=>{r&&t?.(e)},[r,t]);return J.createElement(`nav`,{...a},J.createElement(o.PreviousMonthButton,{type:`button`,className:s[Q.PreviousMonthButton],style:c?.[Q.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:f},J.createElement(o.Chevron,{disabled:!r||void 0,className:s[Q.Chevron],style:c?.[Q.Chevron],orientation:`left`})),J.createElement(o.NextMonthButton,{type:`button`,className:s[Q.NextMonthButton],style:c?.[Q.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":u(i),onClick:d},J.createElement(o.Chevron,{disabled:!i||void 0,orientation:`right`,className:s[Q.Chevron],style:c?.[Q.Chevron]})))}function ha(e){return J.createElement(`button`,{...e})}function ga(e){return J.createElement(`option`,{...e})}function _a(e){return J.createElement(`button`,{...e})}function va(e){let{rootRef:t,...n}=e;return J.createElement(`div`,{...n,ref:t})}function ya(e){return J.createElement(`select`,{...e})}function ba(e){let{week:t,...n}=e;return J.createElement(`tr`,{...n})}function xa(e){return J.createElement(`th`,{...e})}function Sa(e){return J.createElement(`thead`,{"aria-hidden":!0},J.createElement(`tr`,{...e}))}function Ca(e){let{week:t,...n}=e;return J.createElement(`th`,{...n})}function wa(e){return J.createElement(`th`,{...e})}function Ta(e){return J.createElement(`tbody`,{...e})}function Ea(e){let{components:t}=aa();return J.createElement(t.Dropdown,{...e})}var Da=e({CaptionLabel:()=>Qi,Chevron:()=>$i,Day:()=>ea,DayButton:()=>ta,Dropdown:()=>oa,DropdownNav:()=>sa,Footer:()=>ca,Month:()=>la,MonthCaption:()=>ua,MonthGrid:()=>da,Months:()=>fa,MonthsDropdown:()=>pa,Nav:()=>ma,NextMonthButton:()=>ha,Option:()=>ga,PreviousMonthButton:()=>_a,Root:()=>va,Select:()=>ya,Week:()=>ba,WeekNumber:()=>Ca,WeekNumberHeader:()=>wa,Weekday:()=>xa,Weekdays:()=>Sa,Weeks:()=>Ta,YearsDropdown:()=>Ea});function Oa(e,t,n=!1,r=Ji){let{from:i,to:a}=e,{differenceInCalendarDays:o,isSameDay:s}=r;return i&&a?(o(a,i)<0&&([i,a]=[a,i]),o(t,i)>=+!!n&&o(a,t)>=+!!n):!n&&a?s(a,t):!n&&i?s(i,t):!1}function ka(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function Aa(e){return!!(e&&typeof e==`object`&&`from`in e)}function ja(e){return!!(e&&typeof e==`object`&&`after`in e)}function Ma(e){return!!(e&&typeof e==`object`&&`before`in e)}function Na(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function Pa(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Fa(e,t,n=Ji){let r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:o}=n;return r.some(t=>{if(typeof t==`boolean`)return t;if(n.isDate(t))return i(e,t);if(Pa(t,n))return t.some(t=>i(e,t));if(Aa(t))return Oa(t,e,!1,n);if(Na(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(ka(t)){let n=a(t.before,e),r=a(t.after,e),i=n>0,s=r<0;return o(t.before,t.after)?s&&i:i||s}return ja(t)?a(e,t.after)>0:Ma(t)?a(t.before,e)>0:typeof t==`function`&&t(e)})}function Ia(e,t,n,r,i){let{disabled:a,hidden:o,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=i.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=i,_=n&&p(n),v=r&&h(r),y={[$.focused]:[],[$.outside]:[],[$.disabled]:[],[$.hidden]:[],[$.today]:[]},b={};for(let t of e){let{date:e,displayMonth:n}=t,r=!!(n&&!f(e,n)),p=!!(_&&m(e,_)),h=!!(v&&g(e,v)),x=!!(a&&Fa(e,a,i)),S=!!(o&&Fa(e,o,i))||p||h||!l&&!c&&r||l&&c===!1&&r,C=d(e,u);r&&y.outside.push(t),x&&y.disabled.push(t),S&&y.hidden.push(t),C&&y.today.push(t),s&&Object.keys(s).forEach(n=>{let r=s?.[n];r&&Fa(e,r,i)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{let t={[$.focused]:!1,[$.disabled]:!1,[$.hidden]:!1,[$.outside]:!1,[$.today]:!1},n={};for(let n in y)t[n]=y[n].some(t=>t===e);for(let t in b)n[t]=b[t].some(t=>t===e);return{...t,...n}}}function La(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[$[r]]?e.push(t[$[r]]):t[na[r]]&&e.push(t[na[r]]),e),[t[Q.Day]])}function Ra(e){return{...Da,...e}}function za(e){let t={"data-mode":e.mode??void 0,"data-required":`required`in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith(`data-`)&&(t[e]=n)}),t}function Ba(){let e={};for(let t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(let t in $)e[$[t]]=`rdp-${$[t]}`;for(let t in na)e[na[t]]=`rdp-${na[t]}`;for(let t in ra)e[ra[t]]=`rdp-${ra[t]}`;return e}function Va(e,t,n){return(n??new qi(t)).formatMonthYear(e)}function Ha(e,t,n){return(n??new qi(t)).format(e,`d`)}function Ua(e,t=Ji){return t.format(e,`LLLL`)}function Wa(e,t,n){return(n??new qi(t)).format(e,`cccccc`)}function Ga(e,t=Ji){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Ka(){return``}function qa(e,t=Ji){return t.format(e,`yyyy`)}var Ja=e({formatCaption:()=>Va,formatDay:()=>Ha,formatMonthDropdown:()=>Ua,formatWeekNumber:()=>Ga,formatWeekNumberHeader:()=>Ka,formatWeekdayName:()=>Wa,formatYearDropdown:()=>qa});function Ya(e){return{...Ja,...e}}function Xa(e,t,n,r){let i=(r??new qi(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}function Za(e,t,n){return(n??new qi(t)).formatMonthYear(e)}function Qa(e,t,n,r){let i=(r??new qi(n)).format(e,`PPPP`);return t?.today&&(i=`Today, ${i}`),i}function $a(e){return`Choose the Month`}function eo(){return``}var to=`Go to the Next Month`;function no(e,t){return to}function ro(e){return`Go to the Previous Month`}function io(e,t,n){return(n??new qi(t)).format(e,`cccc`)}function ao(e,t){return`Week ${e}`}function oo(e){return`Week Number`}function so(e){return`Choose the Year`}var co=e({labelDayButton:()=>Xa,labelGrid:()=>Za,labelGridcell:()=>Qa,labelMonthDropdown:()=>$a,labelNav:()=>eo,labelNext:()=>no,labelPrevious:()=>ro,labelWeekNumber:()=>ao,labelWeekNumberHeader:()=>oo,labelWeekday:()=>io,labelYearDropdown:()=>so}),lo=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e);function uo(e,t){let n=t.locale?.labels??{};return{...co,...e??{},labelDayButton:lo(Xa,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:lo($a,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:lo(no,e?.labelNext,n.labelNext),labelPrevious:lo(ro,e?.labelPrevious,n.labelPrevious),labelWeekNumber:lo(ao,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:lo(so,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:lo(Za,e?.labelGrid,n.labelGrid),labelGridcell:lo(Qa,e?.labelGridcell,n.labelGridcell),labelNav:lo(eo,e?.labelNav,n.labelNav),labelWeekNumberHeader:lo(oo,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:lo(io,e?.labelWeekday,n.labelWeekday)}}function fo(e,t,n,r,i){let{startOfMonth:a,startOfYear:o,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=i;return c({start:o(e),end:s(e)}).map(e=>{let o=r.formatMonthDropdown(e,i);return{value:l(e),label:o,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function po(e,t={},n={}){let r={...t?.[Q.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n?.[e]}}),r}function mo(e,t,n,r){let i=r??e.today(),a=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),o=[];for(let t=0;t<7;t++){let n=e.addDays(a,t);o.push(n)}return o}function ho(e,t,n,r,i=!1){if(!e||!t)return;let{startOfYear:a,endOfYear:o,eachYearOfInterval:s,getYear:c}=r,l=s({start:a(e),end:o(t)});return i&&l.reverse(),l.map(e=>{let t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}function go(e,t={}){let{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,a=t=>{let n=typeof t==`number`||typeof t==`string`?new Date(t):t;return new lr(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},o=e=>{let t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(lr.tz(e)),newDate:(t,n,r)=>new lr(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{let n=a(e),r=t?.weekStartsOn??i,o=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-o),n},startOfISOWeek:e=>{let t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{let t=a(e);return t.setDate(1),t},startOfYear:e=>{let t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{let n=a(e),r=(((t?.weekStartsOn??i)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{let t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{let t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{let t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new lr(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=r.getFullYear()*12+r.getMonth();for(;o.getFullYear()*12+o.getMonth()<=s;)i.push(new lr(o,e)),o.setMonth(o.getMonth()+1,1);return i},addDays:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t*7),n},addMonths:(e,t)=>{let n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{let n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new lr(n.getFullYear(),0,1,12,0,0,e);for(;o.getFullYear()<=r.getFullYear();)i.push(new lr(o,e)),o.setFullYear(o.getFullYear()+1,0,1);return i},getWeek:(e,t)=>ci(o(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>ai(o(e)),differenceInCalendarDays:(e,t)=>Er(o(e),o(t)),differenceInCalendarMonths:(e,t)=>Fr(o(e),o(t))}}var _o=e=>e instanceof HTMLElement?e:null,vo=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],yo=e=>_o(e.querySelector(`[data-animated-month]`)),bo=e=>_o(e.querySelector(`[data-animated-caption]`)),xo=e=>_o(e.querySelector(`[data-animated-weeks]`)),So=e=>_o(e.querySelector(`[data-animated-nav]`)),Co=e=>_o(e.querySelector(`[data-animated-weekdays]`));function wo(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,J.useRef)(null),s=(0,J.useRef)(r),c=(0,J.useRef)(!1);(0,J.useLayoutEffect)(()=>{let l=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;let u=a.isSameMonth(r[0].date,l[0].date),d=a.isAfter(r[0].date,l[0].date),f=d?n[ra.caption_after_enter]:n[ra.caption_before_enter],p=d?n[ra.weeks_after_enter]:n[ra.weeks_before_enter],m=o.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(vo(h).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=yo(e);t&&e.contains(t)&&e.removeChild(t);let n=bo(e);n&&n.classList.remove(f);let r=xo(e);r&&r.classList.remove(p)}),o.current=h):o.current=null,c.current||u||i)return;let g=m instanceof HTMLElement?vo(m):[],_=vo(e.current);if(_?.every(e=>e instanceof HTMLElement)&&g?.every(e=>e instanceof HTMLElement)){c.current=!0;let t=[];e.current.style.isolation=`isolate`;let r=So(e.current);r&&(r.style.zIndex=`1`),_.forEach((i,a)=>{let o=g[a];if(!o)return;i.style.position=`relative`,i.style.overflow=`hidden`;let s=bo(i);s&&s.classList.add(f);let l=xo(i);l&&l.classList.add(p);let u=()=>{c.current=!1,e.current&&(e.current.style.isolation=``),r&&(r.style.zIndex=``),s&&s.classList.remove(f),l&&l.classList.remove(p),i.style.position=``,i.style.overflow=``,i.contains(o)&&i.removeChild(o)};t.push(u),o.style.pointerEvents=`none`,o.style.position=`absolute`,o.style.overflow=`hidden`,o.setAttribute(`aria-hidden`,`true`);let m=Co(o);m&&(m.style.opacity=`0`);let h=bo(o);h&&(h.classList.add(d?n[ra.caption_before_exit]:n[ra.caption_after_exit]),h.addEventListener(`animationend`,u));let _=xo(o);_&&_.classList.add(d?n[ra.weeks_before_exit]:n[ra.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}function To(e,t,n,r){let i=e[0],a=e[e.length-1],{ISOWeek:o,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:_,startOfISOWeek:v,startOfWeek:y}=r,b=c?_(i,r):o?v(i):y(i),x=c?f(a):o?p(m(a)):h(m(a)),S=t&&(c?f(t):o?p(t):h(t)),C=u(S&&g(x,S)?S:x,b),w=d(a,i)+1,T=[];for(let e=0;e<=C;e++){let t=l(b,e);T.push(t)}let E=(c?35:42)*w;if(s&&T.length<E){let e=E-T.length;for(let t=0;t<e;t++){let e=l(T[T.length-1],1);T.push(e)}}return T}function Eo(e){let t=[];return e.reduce((e,n)=>{let r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}function Do(e,t,n,r){let{numberOfMonths:i=1}=n,a=[];for(let n=0;n<i;n++){let i=r.addMonths(e,n);if(t&&i>t)break;a.push(i)}return a}function Oo(e,t,n,r){let{month:i,defaultMonth:a,today:o=r.today(),numberOfMonths:s=1}=e,c=i||a||o,{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}function ko(e,t,n,r){let{addDays:i,endOfBroadcastWeek:a,endOfISOWeek:o,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{let h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?o(s(m)):c(s(m)),_=t.filter(e=>e>=h&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&_.length<v){let e=t.filter(e=>{let t=v-_.length;return e>g&&e<=i(g,t)});_.push(...e)}let y=new Xi(m,_.reduce((e,t)=>{let i=n.ISOWeek?l(t):u(t),a=e.find(e=>e.weekNumber===i),o=new Yi(t,m,r);return a?a.days.push(o):e.push(new Zi(i,[o])),e},[]));return e.push(y),e},[]);return n.reverseMonths?m.reverse():m}function Ao(e,t){let{startMonth:n,endMonth:r}=e,{startOfYear:i,startOfDay:a,startOfMonth:o,endOfMonth:s,addYears:c,endOfYear:l,today:u}=t,d=e.captionLayout===`dropdown`||e.captionLayout===`dropdown-years`;return n?n=o(n):!n&&d&&(n=i(c(e.today??u(),-100))),r?r=s(r):!r&&d&&(r=l(e.today??u())),[n&&a(n),r&&a(r)]}function jo(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a=1}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a:1,u=o(e);if(!t||!(c(t,e)<a))return s(u,l)}function Mo(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a??1:1,u=o(e);if(!t||!(c(u,t)<=0))return s(u,-l)}function No(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}function Po(e,t){let[n,r]=(0,J.useState)(e);return[t===void 0?n:t,r]}function Fo(e,t){let[n,r]=Ao(e,t),{startOfMonth:i,endOfMonth:a}=t,o=Oo(e,n,r,t),[s,c]=Po(o,e.month?o:void 0);(0,J.useEffect)(()=>{let i=Oo(e,n,r,t);c(i)},[e.timeZone]);let{months:l,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,J.useMemo)(()=>{let i=Do(s,r,{numberOfMonths:e.numberOfMonths},t),o=ko(i,To(i,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t);return{months:o,weeks:No(o),days:Eo(o),previousMonth:Mo(s,n,e,t),nextMonth:jo(s,r,e,t)}},[t,s.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:h}=e,g=e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))),_=e=>{if(m)return;let t=i(e);n&&t<i(n)&&(t=i(n)),r&&t>i(r)&&(t=i(r)),c(t),h?.(t)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:_,goToDay:e=>{g(e)||_(e.date)}}}var Io;(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(Io||={});function Lo(e){return!e[$.disabled]&&!e[$.hidden]&&!e[$.outside]}function Ro(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);Lo(e)&&(e[$.focused]&&a<Io.FocusedModifier?(i=o,a=Io.FocusedModifier):r?.isEqualTo(o)&&a<Io.LastFocused?(i=o,a=Io.LastFocused):n(o.date)&&a<Io.Selected?(i=o,a=Io.Selected):e[$.today]&&a<Io.Today&&(i=o,a=Io.Today))}return i||=e.find(e=>Lo(t(e))),i}function zo(e,t,n,r,i,a,o){let{ISOWeek:s,broadcastCalendar:c}=a,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:_,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=o,x={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,o):s?y(e):b(e),endOfWeek:e=>c?p(e):s?m(e):h(e)}[e](n,t===`after`?1:-1);return t===`before`&&r?x=g([r,x]):t===`after`&&i&&(x=_([i,x])),x}function Bo(e,t,n,r,i,a,o,s=0){if(s>365)return;let c=zo(e,t,n.date,r,i,a,o),l=!!(a.disabled&&Fa(c,a.disabled,o)),u=!!(a.hidden&&Fa(c,a.hidden,o)),d=new Yi(c,c,o);return!l&&!u?d:Bo(e,t,d,r,i,a,o,s+1)}function Vo(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,J.useState)(),c=Ro(t.days,n,r||(()=>!1),o),[l,u]=(0,J.useState)(a?c:void 0);return{isFocusTarget:e=>!!c?.isEqualTo(e),setFocused:u,focused:l,blur:()=>{s(l),u(void 0)},moveFocus:(n,r)=>{if(!l)return;let a=Bo(n,r,l,t.navStart,t.navEnd,e,i);a&&(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(a))||(t.goToDay(a),u(a)))}}}function Ho(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Po(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(l(e)){if(s?.length===u||r&&s?.length===1)return;a=s?.filter(t=>!c(t,e))}else a=s?.length===d?[e]:[...a,e];return i||o(a),i?.(a,e,t,n),a},isSelected:l}}function Uo(e,t,n=0,r=0,i=!1,a=Ji){let{from:o,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=a,d;if(!o&&!s)d={from:e,to:n>0?void 0:e};else if(o&&!s)d=c(o,e)?n===0?{from:o,to:e}:i?{from:o,to:void 0}:void 0:u(e,o)?{from:e,to:o}:{from:o,to:e};else if(o&&s)if(c(o,e)&&c(s,e))d=i?{from:o,to:s}:void 0;else if(c(o,e))d={from:o,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,o))d={from:e,to:s};else if(l(e,o))d={from:o,to:e};else if(l(e,s))d={from:o,to:e};else throw Error(`Invalid range`);if(d?.from&&d?.to){let t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function Wo(e,t,n=Ji){let r=Array.isArray(t)?t:[t],i=e.from,a=n.differenceInCalendarDays(e.to,e.from),o=Math.min(a,6);for(let e=0;e<=o;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function Go(e,t,n=Ji){return Oa(e,t.from,!1,n)||Oa(e,t.to,!1,n)||Oa(t,e.from,!1,n)||Oa(t,e.to,!1,n)}function Ko(e,t,n=Ji){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?Oa(e,t,!1,n):Pa(t,n)?t.some(t=>Oa(e,t,!1,n)):Aa(t)?t.from&&t.to?Go(e,{from:t.from,to:t.to},n):!1:Na(t)?Wo(e,t.dayOfWeek,n):ka(t)?n.isAfter(t.before,t.after)?Go(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Fa(e.from,t,n)||Fa(e.to,t,n):ja(t)||Ma(t)?Fa(e.from,t,n)||Fa(e.to,t,n):!1))return!0;let i=r.filter(e=>typeof e==`function`);if(i.length){let t=e.from,r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function qo(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[c,l]=Po(a,s?a:void 0),u=s?a:c;return{selected:u,select:(a,c,d)=>{let{min:f,max:p}=e,m;if(a){let e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=i&&(r||!u?.from)?!o&&s?void 0:{from:a,to:void 0}:Uo(a,u,f,p,o,t)}return r&&n&&m?.from&&m.to&&Ko({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),s||l(m),s?.(m,a,c,d),m},isSelected:e=>u&&Oa(u,e,!1,t)}}function Jo(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Po(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&c(e,s)&&(a=void 0),i||o(a),i?.(a,e,t,n),a},isSelected:e=>s?c(s,e):!1}}function Yo(e,t){let n=Jo(e,t),r=Ho(e,t),i=qo(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}function Xo(e,t){return e instanceof lr&&e.timeZone===t?e:new lr(e,t)}function Zo(e,t,n){if(!n)return Xo(e,t);let r=Xo(e,t),i=new lr(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function Qo(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?Zo(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?Zo(e,t,n):e):Aa(e)?{...e,from:e.from?Xo(e.from,t):e.from,to:e.to?Xo(e.to,t):e.to}:ka(e)?{before:Zo(e.before,t,n),after:Zo(e.after,t,n)}:ja(e)?{after:Zo(e.after,t,n)}:Ma(e)?{before:Zo(e.before,t,n)}:e}function $o(e,t,n){return e&&(Array.isArray(e)?e.map(e=>Qo(e,t,n)):Qo(e,t,n))}function es(e){let t=e,n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Xo(t.today,n)),t.month&&(t.month=Xo(t.month,n)),t.defaultMonth&&(t.defaultMonth=Xo(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Xo(t.startMonth,n)),t.endMonth&&(t.endMonth=Xo(t.endMonth,n)),t.mode===`single`&&t.selected?t.selected=Xo(t.selected,n):t.mode===`multiple`&&t.selected?t.selected=t.selected?.map(e=>Xo(e,n)):t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?Xo(t.selected.from,n):t.selected.from,to:t.selected.to?Xo(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=$o(t.disabled,n)),t.hidden!==void 0&&(t.hidden=$o(t.hidden,n)),t.modifiers)){let e={};Object.keys(t.modifiers).forEach(r=>{e[r]=$o(t.modifiers?.[r],n)}),t.modifiers=e}let{components:r,formatters:i,labels:a,dateLib:o,locale:s,classNames:c}=(0,J.useMemo)(()=>{let e={...Ki,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?go(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new qi({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:Ra(t.components),formatters:Ya(t.formatters),labels:uo(t.labels,a.options),locale:e,classNames:{...Ba(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});let{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:_,onDayMouseLeave:v,onNextClick:y,onPrevClick:b,showWeekNumber:x,styles:S}=t,{formatCaption:C,formatDay:w,formatMonthDropdown:T,formatWeekNumber:E,formatWeekNumberHeader:D,formatWeekdayName:O,formatYearDropdown:k}=i,A=Fo(t,o),{days:j,months:M,navStart:N,navEnd:P,previousMonth:F,nextMonth:I,goToMonth:ee}=A,te=Ia(j,t,N,P,o),{isSelected:ne,select:L,selected:R}=Yo(t,o)??{},{blur:re,focused:ie,isFocusTarget:z,moveFocus:ae,setFocused:B}=Vo(t,A,te,ne??(()=>!1),o),{labelDayButton:V,labelGridcell:H,labelGrid:U,labelMonthDropdown:W,labelNav:oe,labelPrevious:se,labelNext:ce,labelWeekday:G,labelWeekNumber:le,labelWeekNumberHeader:ue,labelYearDropdown:de}=a,fe=(0,J.useMemo)(()=>mo(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),pe=u!==void 0||m!==void 0,me=(0,J.useCallback)(()=>{F&&(ee(F),b?.(F))},[F,ee,b]),he=(0,J.useCallback)(()=>{I&&(ee(I),y?.(I))},[ee,I,y]),ge=(0,J.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),B(e),!t.disabled&&(L?.(e.date,t,n),m?.(e.date,t,n))},[L,m,B]),_e=(0,J.useCallback)((e,t)=>n=>{B(e),h?.(e.date,t,n)},[h,B]),ve=(0,J.useCallback)((e,t)=>n=>{re(),p?.(e.date,t,n)},[re,p]),ye=(0,J.useCallback)((e,n)=>r=>{let i={ArrowLeft:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`after`:`before`],ArrowRight:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`before`:`after`],ArrowDown:[r.shiftKey?`year`:`week`,`after`],ArrowUp:[r.shiftKey?`year`:`week`,`before`],PageUp:[r.shiftKey?`year`:`month`,`before`],PageDown:[r.shiftKey?`year`:`month`,`after`],Home:[`startOfWeek`,`before`],End:[`endOfWeek`,`after`]};if(i[r.key]){r.preventDefault(),r.stopPropagation();let[e,t]=i[r.key];ae(e,t)}g?.(e.date,n,r)},[ae,g,t.dir]),be=(0,J.useCallback)((e,t)=>n=>{_?.(e.date,t,n)},[_]),xe=(0,J.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),Se=(0,J.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setMonth(o.startOfMonth(e),r);ee(o.addMonths(i,-t))},[o,ee]),Ce=(0,J.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setYear(o.startOfMonth(e),r);ee(o.addMonths(i,-t))},[o,ee]),{className:we,style:Te}=(0,J.useMemo)(()=>({className:[c[Q.Root],t.className].filter(Boolean).join(` `),style:{...S?.[Q.Root],...t.style}}),[c,t.className,t.style,S]),Ee=za(t),K=e=>{let t=S?.[Q.Dropdown],n=S?.[e];if(!(!t&&!n))return{...t,...n}},De=(0,J.useRef)(null);wo(De,!!t.animate,{classNames:c,months:M,focused:ie,dateLib:o});let Oe={dayPickerProps:t,selected:R,select:L,isSelected:ne,months:M,nextMonth:I,previousMonth:F,goToMonth:ee,getModifiers:te,components:r,classNames:c,styles:S,labels:a,formatters:i};return J.createElement(ia.Provider,{value:Oe},J.createElement(r.Root,{rootRef:t.animate?De:void 0,className:we,style:Te,dir:t.dir,id:t.id,lang:t.lang??s.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t[`aria-label`],"aria-labelledby":t[`aria-labelledby`],...Ee},J.createElement(r.Months,{className:c[Q.Months],style:S?.[Q.Months]},!t.hideNavigation&&!d&&J.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[Q.Nav],style:S?.[Q.Nav],"aria-label":oe(),onPreviousClick:me,onNextClick:he,previousMonth:F,nextMonth:I}),M.map((e,n)=>{let a=t.reverseMonths?M.length-1-n:n;return J.createElement(r.Month,{"data-animated-month":t.animate?`true`:void 0,className:c[Q.Month],style:S?.[Q.Month],key:n,displayIndex:n,calendarMonth:e},d===`around`&&!t.hideNavigation&&n===0&&J.createElement(r.PreviousMonthButton,{type:`button`,className:c[Q.PreviousMonthButton],style:S?.[Q.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":!F||void 0,"aria-label":se(F),onClick:me,"data-animated-button":t.animate?`true`:void 0},J.createElement(r.Chevron,{disabled:!F||void 0,className:c[Q.Chevron],style:S?.[Q.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),J.createElement(r.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:c[Q.MonthCaption],style:S?.[Q.MonthCaption],calendarMonth:e,displayIndex:n},l?.startsWith(`dropdown`)?J.createElement(r.DropdownNav,{className:c[Q.Dropdowns],style:S?.[Q.Dropdowns]},(()=>{let n=l===`dropdown`||l===`dropdown-months`?J.createElement(r.MonthsDropdown,{key:`month`,className:c[Q.MonthsDropdown],"aria-label":W(),disabled:!!t.disableNavigation,onChange:Se(e.date,a),options:fo(e.date,N,P,i,o),style:K(Q.MonthsDropdown),value:o.getMonth(e.date)}):J.createElement(`span`,{key:`month`},T(e.date,o)),s=l===`dropdown`||l===`dropdown-years`?J.createElement(r.YearsDropdown,{key:`year`,className:c[Q.YearsDropdown],"aria-label":de(o.options),disabled:!!t.disableNavigation,onChange:Ce(e.date,a),options:ho(N,P,i,o,!!t.reverseYears),style:K(Q.YearsDropdown),value:o.getYear(e.date)}):J.createElement(`span`,{key:`year`},k(e.date,o));return o.getMonthYearOrder()===`year-first`?[s,n]:[n,s]})(),J.createElement(`span`,{role:`status`,"aria-live":`polite`,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}},C(e.date,o.options,o))):J.createElement(r.CaptionLabel,{className:c[Q.CaptionLabel],style:S?.[Q.CaptionLabel],role:`status`,"aria-live":`polite`},C(e.date,o.options,o))),d===`around`&&!t.hideNavigation&&n===f-1&&J.createElement(r.NextMonthButton,{type:`button`,className:c[Q.NextMonthButton],style:S?.[Q.NextMonthButton],tabIndex:I?void 0:-1,"aria-disabled":!I||void 0,"aria-label":ce(I),onClick:he,"data-animated-button":t.animate?`true`:void 0},J.createElement(r.Chevron,{disabled:!I||void 0,className:c[Q.Chevron],style:S?.[Q.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===f-1&&d===`after`&&!t.hideNavigation&&J.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[Q.Nav],style:S?.[Q.Nav],"aria-label":oe(),onPreviousClick:me,onNextClick:he,previousMonth:F,nextMonth:I}),J.createElement(r.MonthGrid,{role:`grid`,"aria-multiselectable":u===`multiple`||u===`range`,"aria-label":U(e.date,o.options,o)||void 0,className:c[Q.MonthGrid],style:S?.[Q.MonthGrid]},!t.hideWeekdays&&J.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:c[Q.Weekdays],style:S?.[Q.Weekdays]},x&&J.createElement(r.WeekNumberHeader,{"aria-label":ue(o.options),className:c[Q.WeekNumberHeader],style:S?.[Q.WeekNumberHeader],scope:`col`},D()),fe.map(e=>J.createElement(r.Weekday,{"aria-label":G(e,o.options,o),className:c[Q.Weekday],key:String(e),style:S?.[Q.Weekday],scope:`col`},O(e,o.options,o)))),J.createElement(r.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:c[Q.Weeks],style:S?.[Q.Weeks]},e.weeks.map(e=>J.createElement(r.Week,{className:c[Q.Week],key:e.weekNumber,style:S?.[Q.Week],week:e},x&&J.createElement(r.WeekNumber,{week:e,style:S?.[Q.WeekNumber],"aria-label":le(e.weekNumber,{locale:s}),className:c[Q.WeekNumber],scope:`row`,role:`rowheader`},E(e.weekNumber,o)),e.days.map(e=>{let{date:n}=e,i=te(e);if(i[$.focused]=!i.hidden&&!!ie?.isEqualTo(e),i[na.selected]=ne?.(n)||i.selected,Aa(R)){let{from:e,to:t}=R;i[na.range_start]=!!(e&&t&&o.isSameDay(n,e)),i[na.range_end]=!!(e&&t&&o.isSameDay(n,t)),i[na.range_middle]=Oa(R,n,!0,o)}let a=po(i,S,t.modifiersStyles),s=La(i,c,t.modifiersClassNames),l=!pe&&!i.hidden?H(n,i,o.options,o):void 0;return J.createElement(r.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:i,className:s.join(` `),style:a,role:`gridcell`,"aria-selected":i.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":i.selected||void 0,"data-disabled":i.disabled||void 0,"data-hidden":i.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":i.focused||void 0,"data-today":i.today||void 0},!i.hidden&&pe?J.createElement(r.DayButton,{className:c[Q.DayButton],style:S?.[Q.DayButton],type:`button`,day:e,modifiers:i,disabled:!i.focused&&i.disabled||void 0,"aria-disabled":i.focused&&i.disabled||void 0,tabIndex:z(e)?0:-1,"aria-label":V(n,i,o.options,o),onClick:ge(e,i),onBlur:ve(e,i),onFocus:_e(e,i),onKeyDown:ye(e,i),onMouseEnter:be(e,i),onMouseLeave:xe(e,i)},w(n,o.options,o)):!i.hidden&&w(e.date,o.options,o))}))))))})),t.footer&&J.createElement(r.Footer,{className:c[Q.Footer],style:S?.[Q.Footer],role:`status`,"aria-live":`polite`},t.footer)))}var ts=`relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,ns={Chevron:({className:e,orientation:t,...n})=>t===`left`?(0,q.jsx)(Ge,{className:K(e,`rtl:rotate-180`),...n,"aria-hidden":`true`}):t===`right`?(0,q.jsx)(Ke,{className:K(e,`rtl:rotate-180`),...n,"aria-hidden":`true`}):(0,q.jsx)(vt,{className:e,...n,"aria-hidden":`true`})};function rs(e){let t=(0,Rt.c)(23),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,classNames:r,showOutsideDays:a,components:s,mode:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0||a,l=o===void 0?`single`:o,u;if(t[7]!==r){let e={button_next:ts,button_previous:ts,caption_label:`text-base sm:text-sm font-medium flex items-center gap-2 h-full`,day:`size-(--cell-size) text-sm py-px`,day_button:K(ts,`in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50`),dropdown:`absolute bg-popover inset-0 opacity-0`,dropdown_root:`relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1`,dropdowns:`w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium`,hidden:`invisible`,month:`w-full`,month_caption:`relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2`,months:`relative flex flex-col sm:flex-row gap-2`,nav:`absolute top-0 flex w-full justify-between z-1`,outside:`text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground`,range_end:`range-end`,range_middle:`range-middle`,range_start:`range-start`,today:`*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30`,week_number:`size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72`,weekday:`size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72`};u=Object.keys(e).reduce((t,n)=>{let i=r?.[n],a=e[n];return t[n]=i?K(a,i):a,t},{...e}),t[7]=r,t[8]=u}else u=t[8];let d=u,f;t[9]===s?f=t[10]:(f={...ns,...s},t[9]=s,t[10]=f);let p=f,m;t[11]===n?m=t[12]:(m=K(`w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]`,n),t[11]=n,t[12]=m);let h;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(h={formatMonthDropdown:is},t[13]=h):h=t[13];let g;t[14]!==d||t[15]!==p||t[16]!==l||t[17]!==i||t[18]!==c||t[19]!==m?(g={className:m,classNames:d,components:p,"data-slot":`calendar`,formatters:h,mode:l,showOutsideDays:c,...i},t[14]=d,t[15]=p,t[16]=l,t[17]=i,t[18]=c,t[19]=m,t[20]=g):g=t[20];let _=g,v;return t[21]===_?v=t[22]:(v=(0,q.jsx)(es,{..._}),t[21]=_,t[22]=v),v}function is(e){return e.toLocaleString(`default`,{month:`short`})}var as=J.createContext(void 0);function os(){let e=J.useContext(as);if(e===void 0)throw Error(z(43));return e}var ss={inputValue:()=>null,value:()=>null,...tt},cs=new Map;function ls(e,t){let n=JSON.stringify({locale:Ft(e),options:t}),r=cs.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return cs.set(n,i),i}function us(e,t,n){return e==null?``:ls(t,n).format(e)}var ds=`零〇一二三四五六七八九`,fs=/[٠-٩۰-۹0-9]/g,ps=/[零〇一二三四五六七八九]/g,ms=[`%`,`٪`,`%`,`﹪`],hs=[`‰`,`؉`],gs=/[%٪%﹪]/,_s=/[‰؉]/,vs=/[%٪%﹪]/g,ys=/[‰؉]/g,bs=/[٠-٩۰-۹]/,xs=/[零〇一二三四五六七八九]/,Ss=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function Cs(e){return Ss.test(e)}var ws=[`.`,`,`,`.`,`,`,`٫`,`٬`],Ts=/\p{Zs}/u,Es=/\p{Cf}/u,Ds=/\p{Cf}/gu,Os=[`+`,`+`,`﹢`],ks=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],As=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function js(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var Ms=/[-−-‒–—﹣]/gu,Ns=/[++﹢]/gu,Ps=/[-−-‒–—﹣]/,Fs=/[++﹢]/,Is=11111.1;function Ls(e,t){return ls(e,t).formatToParts(Is)}function Rs(e,t){let n=Ls(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return ls(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function zs(e,t,n){let r=e.replace(Ds,``).trim();r=r.replace(Ms,`-`).replace(Ns,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(bs.test(r)?o=`ar`:xs.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=Rs(o,n),d=ls(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>As(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(As(s),`g`));let m=[[p,``],[new RegExp(As(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(As(l),`g`):null,``],[f,``],[vs,``],[ys,``],[u?new RegExp(As(u),`g`):null,`e`],[fs,e=>String(e.charCodeAt(0)%16)],[ps,e=>String(Math.max(ds.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=gs.test(e)||v===`percent`;return _s.test(e)?_=js(_,-3):!y&&b&&(_=js(_,-2)),Number.isFinite(_)?_:null}var Bs=1e-10,Vs=1e-10;function Hs(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function Us(e,t){if(!Number.isFinite(e))return e;if(!Hs(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),Vs)?t:e}let n=ls(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=zs(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function Ws(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*Bs*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function Gs(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=Ws(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=je(l,n,r)),t==null&&!Hs(a))return l;let u=Us(l,a);return c?je(u,n,r):u}var Ks=J.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:p,value:h,onValueChange:g,onValueCommitted:_,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:w,render:E,className:D,inputRef:O,style:k,...A}=e,{setDirty:j,validityData:N,disabled:P,setFilled:I,name:te,state:ne,validation:re}=st(),{clearErrors:ie}=nt(),z=P||l,ae=te??f,B=o===`any`?1:o,[H,U]=J.useState(!1),W=r??-(2**53-1),oe=i??2**53-1,ce=r??0,G=S?.style,ue=J.useRef(null),de=xe(O,re.inputRef),fe=et({id:n}),[pe,me]=le({controlled:h,default:p,name:`NumberField`,state:`value`}),ge=pe??null,_e=m(ge);ye(()=>{I(ge!==null)},[I,ge]);let ve=bt(),be=m(S),Ce=J.useRef(!1),we=F((e,t)=>{Ce.current=!1,_?.(e,t)}),Te=J.useRef(!0),Ee=J.useRef(null),[K,De]=J.useState(()=>us(ge,w,S)),[Oe,ke]=J.useState(`numeric`),Ae=F(()=>{let e=Ls(w,S),t=new Set(ws),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??Rs(w,S).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),Ts.test(e.value)&&t.add(` `))});let i=G===`percent`||G===`unit`&&S?.unit===`percent`,a=G===`percent`||G===`unit`&&S?.unit===`permille`;return i&&n(ms),a&&n(hs),n(Os),(W<0||x)&&n(ks),t}),je=F(e=>e?.altKey?a:e?.shiftKey?s:B),Me=F((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!x||!i,o=Gs(e,r?je(n)*r:void 0,W,oe,ce,be.current,b,n?.altKey??!1,a),s=o!==ge||i&&(e!==ge||Te.current===!1);if(s){if(g?.(o,t),t.isCanceled)return!1;me(o),j(o!==N.initialValue),Ce.current=!0}return Ee.current=o,Te.current&&De(us(o,w,S)),ve(),s}),Ne=F((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??_e.current,o=r;return typeof a==`number`?Me(a+e*t,R(i,o,void 0,{direction:t})):Me(0,R(i,o))});ye(function(){if(!Te.current)return;let e=us(ge,w,S);e!==K&&De(e)}),ye(function(){if(!he)return;let e=`text`;W>=0&&(e=`decimal`),ke(e)},[W]),J.useEffect(function(){let e=ue.current;if(z||u||!y||!e)return;function t(e){if(e.ctrlKey||Se(C(ue.current))!==ue.current)return;e.preventDefault(),Te.current=!0;let t=je(e);Ne(t,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`})&&we(Ee.current,L(ee,e))}return M(e,`wheel`,t)},[y,Ne,z,u,je,we,Ee,_e]);let Pe=J.useMemo(()=>({...ne,disabled:z,readOnly:u,required:c,value:ge,inputValue:K,scrubbing:H}),[ne,z,u,c,ge,K,H]),Fe=J.useMemo(()=>({inputRef:ue,minWithDefault:W,maxWithDefault:oe,id:fe,setValue:Me,incrementValue:Ne,getStepAmount:je,allowInputSyncRef:Te,formatOptionsRef:be,valueRef:_e,lastChangedValueRef:Ee,hasPendingCommitRef:Ce,name:ae,nameProp:f,inputMode:Oe,getAllowedNonNumericKeys:Ae,min:r,max:i,setInputValue:De,locale:w,setIsScrubbing:U,state:Pe,onValueCommitted:we}),[ue,W,oe,fe,Me,Ne,je,be,_e,ae,f,Oe,Ae,r,i,De,w,Pe,we]),Ie=V(`div`,e,{ref:t,state:Pe,props:A,stateAttributesMapping:ss});return(0,q.jsxs)(as.Provider,{value:Fe,children:[Ie,(0,q.jsx)(`input`,{...re.getValidationProps(z,{onFocus(){ue.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||z||u)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=R(se,e.nativeEvent);Me(n,r),ie(ae),re.change(Ee.current??n)}}),ref:de,type:`number`,form:d,name:ae,value:ge??``,min:r,max:i,step:o,disabled:z,readOnly:u,required:c,"aria-hidden":!0,tabIndex:-1,style:ae?T:v,suppressHydrationWarning:!0})]})}),qs=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=os();return V(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:ss})}),Js=0,Ys=class e extends x{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Js&&(clearInterval(this.currentId),this.currentId=Js)}};function Xs(){let e=Te(Ys.create).current;return b(e.disposeEffect),e}var Zs=60,Qs=400,$s=8,ec=50,tc=3;function nc(e){return e===`touch`||e===`pen`}function rc(e){let{disabled:t,tick:n,onStop:r,tickDelay:i=Zs,startDelay:o=Qs,scrollDistance:s=$s,elementRef:c}=e,l=a(),u=Xs(),d=a(),f=J.useRef(!1),p=J.useRef(0),m=J.useRef({x:0,y:0}),h=J.useRef(!1),g=J.useRef(!1),_=J.useRef(``),v=J.useRef(U),y=J.useRef(U),b=F(()=>{d.clear(),l.clear(),u.clear(),v.current(),p.current=0});function x(e){b();let t=c.current;if(!t)return;let a=ne(t);function s(e){e.preventDefault()}if(v.current=M(a,`contextmenu`,s),y.current(),y.current=M(a,`pointerup`,e=>{f.current=!1,b(),r?.(e)},{once:!0}),!n(e)){b();return}l.start(o,()=>{u.start(i,()=>{n(e)||b()})})}return J.useEffect(()=>()=>{b(),y.current()},[b]),{pointerHandlers:{onTouchStart(){h.current=!0},onTouchEnd(){h.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(_.current=e.pointerType,g.current=!1,f.current=!0,m.current={x:e.clientX,y:e.clientY},nc(e.pointerType)?d.start(ec,()=>{let t=p.current;p.current=0,f.current&&t<tc?(x(e.nativeEvent),g.current=!0):(g.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){nc(e.pointerType)&&(f.current=!1)},onPointerMove(e){if(t||!nc(e.pointerType)||!f.current)return;p.current+=1;let{x:n,y:r}=m.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>s**2&&b()},onMouseEnter(e){e.defaultPrevented||t||!f.current||h.current||nc(_.current)||x(e.nativeEvent)},onMouseLeave(){h.current||b()},onMouseUp(){h.current||b()}},shouldSkipClick:F(e=>e.defaultPrevented?!0:nc(_.current)?g.current:e.detail!==0)}}var ic={WebkitUserSelect:`none`,userSelect:`none`};function ac(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,maxWithDefault:h,minWithDefault:g,setValue:_,state:v,valueRef:y,locale:b,lastChangedValueRef:x,onValueCommitted:S}=os(),{disabled:C,readOnly:w,value:T,inputValue:E}=v,D=a||C||T!=null&&(n?T>=h:T<=g),O=n?fe:ve;function k(e){let t=!l.current;if(l.current=!0,!t){x.current=y.current;return}let n=zs(E,b,u.current);if(n!==null){let t=R(O,e);_(n,t),t.isCanceled||(y.current=n)}}let{pointerHandlers:A,shouldSkipClick:j}=rc({disabled:D||w,elementRef:m,tick(e){let t=d(e);return p(t,{direction:n?1:-1,event:e,reason:O})},onStop(e){let t=x.current??y.current;S(t,L(O,e))}}),M={disabled:D,"aria-label":n?`Increase`:`Decrease`,"aria-controls":f,tabIndex:-1,style:ic,...A,onClick(e){let t=D||w;if(e.defaultPrevented||t||j(e))return;k(e.nativeEvent);let r=d(e),i=y.current;p(r,{direction:n?1:-1,event:e.nativeEvent,reason:O});let a=x.current??y.current;a!==i&&S(a,L(O,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||w||e.button||D||(k(e.nativeEvent),x.current=null,nc(e.pointerType)||m.current?.focus(),A.onPointerDown(e))}},{getButtonProps:N,buttonRef:P}=W({disabled:D||w,native:o,focusableWhenDisabled:!0}),F={...v,disabled:D};return V(`button`,e,{ref:[t,P],state:F,props:[M,c,N],stateAttributesMapping:ss})}var oc=J.forwardRef(function(e,t){return ac(e,t,!0)}),sc=J.forwardRef(function(e,t){return ac(e,t,!1)}),cc=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),lc=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:o,formatOptionsRef:s,getAllowedNonNumericKeys:c,getStepAmount:l,id:u,incrementValue:d,inputMode:f,max:p,min:m,name:h,nameProp:g,setValue:_,state:v,setInputValue:y,locale:b,inputRef:x,onValueCommitted:S,lastChangedValueRef:C,hasPendingCommitRef:w,valueRef:T}=os(),{disabled:D,readOnly:O,required:k,value:A,inputValue:j}=v,{clearErrors:M}=nt(),{validationMode:N,setTouched:P,setFocused:F,invalid:I,shouldValidateOnChange:ee,validation:te}=st(),{labelId:ne}=$e(),re=J.useRef(!1),ie=J.useRef(!1),z=J.useRef(null);return rt(x,u,A,void 0,!D,g),ye(()=>{if(z.current!=null){let e=z.current;z.current=null,x.current?.setSelectionRange(e,e)}}),E(A,()=>{if(M(h),ie.current&&!ee()){ie.current=!1;return}te.change(A)}),V(`input`,e,{ref:[t,x],state:v,props:[{id:u,required:k,disabled:D,readOnly:O,inputMode:f,value:j,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!D&&I?!0:void 0,"aria-labelledby":ne,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||D||(F(!0),re.current))return;re.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||D||(P(!0),F(!1),O))return;let t=!o.current,n=w.current;if(o.current=!0,j.trim()===``){let r=R(G,e.nativeEvent);if(_(null,r),r.isCanceled)return;N===`onBlur`&&te.commit(null),(t||n||A!==null)&&S(null,L(G,e.nativeEvent));return}let r=s.current,i=zs(j,b,r);if(i===null)return;let a=Hs(r),c;c=!t&&!a?A:a?Us(i,r):i;let l=L(ge,e.nativeEvent),u=A!==c,d=t||u||n,f=c;if(u){let t=R(ge,e.nativeEvent);if(ie.current=!0,_(c,t),t.isCanceled){ie.current=!1;return}f=C.current,f===A&&(ie.current=!1)}N===`onBlur`&&te.commit(f),d&&S(f,l);let p=us(f,b,r);j!==p&&y(p)},onChange(e){if(e.nativeEvent.defaultPrevented)return;o.current=!1;let t=e.currentTarget.value;if(t.trim()===``){y(t),_(null,R(G,e.nativeEvent));return}let n=c();if(!Array.from(t).every(e=>Cs(e)||Ps.test(e)||n.has(e)||Es.test(e)))return;let r=zs(t,b,s.current);y(t),r!==null&&_(r,R(ae,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||O||D)return;let t=e.nativeEvent,n=!o.current,r=c(),i=r.has(e.key),{decimal:a,currency:u,percentSign:f}=Rs(b,s.current),h=e.currentTarget.selectionStart,g=e.currentTarget.selectionEnd,v=h===0&&g===j.length,y=e=>h!=null&&g!=null&&e>=h&&e<g;[[Ps,Ms],[Fs,Ns]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=j.search(n),t=e!==-1&&y(e);i=!(Ps.test(j)||Fs.test(j))||v||t}}),[a,u,f].forEach(t=>{if(e.key===t){let e=j.indexOf(t),n=y(e);i=e===-1||v||n}});let x=cc.has(e.key),w=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!w||e.ctrlKey||e.metaKey||i||Cs(e.key)||x)return;let E=null;if(e.key===`Home`&&m!=null?E=m:e.key===`End`&&p!=null&&(E=p),e.key.length>1&&!w&&E===null)return;let k=n?zs(j,b,s.current):null,A=l(e);e.preventDefault(),e.stopPropagation();let M=L(pe,t),N=!1;(w||E!==null)&&(o.current=!0),w?(n||(C.current=T.current),N=d(A,{direction:e.key===`ArrowUp`?1:-1,currentValue:k,event:t,reason:pe})):E!==null&&(N=_(E,R(pe,t))),N&&S(C.current,M)},onPaste(e){if(e.defaultPrevented||O||D)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=j.slice(0,r)+t+j.slice(i),c=zs(a,b,s.current);c!==null&&(o.current=!1,z.current=r+t.length,_(c,R(be,e.nativeEvent)),y(a))}},a,e=>te.getValidationProps(D,e)],stateAttributesMapping:ss})});function uc(e){let t=(0,Rt.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,className:n,size:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s=J.useId(),c=r??s,l;t[5]===n?l=t[6]:(l=K(`flex w-full flex-col items-start gap-2`,n),t[5]=n,t[6]=l);let u;return t[7]!==c||t[8]!==i||t[9]!==o||t[10]!==l?(u=(0,q.jsx)(Ks,{className:l,"data-size":o,"data-slot":`number-field`,id:c,...i}),t[7]=c,t[8]=i,t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function dc(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex w-full justify-between rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] has-aria-invalid:border-destructive/36 has-autofill:bg-foreground/4 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/48 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-within,[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(qs,{className:i,"data-slot":`number-field-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fc(e){let t=(0,Rt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-s-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(qe,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,q.jsx)(sc,{className:i,"data-slot":`number-field-decrement`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function pc(e){let t=(0,Rt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-e-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(yt,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,q.jsx)(oc,{className:i,"data-slot":`number-field-increment`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function mc(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`h-8.5 in-data-[size=lg]:h-9.5 in-data-[size=sm]:h-7.5 w-full min-w-0 grow bg-transparent in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] text-center tabular-nums in-data-[size=lg]:leading-9.5 in-data-[size=sm]:leading-7.5 leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:in-data-[size=lg]:h-8.5 sm:in-data-[size=sm]:h-6.5 sm:in-data-[size=lg]:leading-8.5 sm:in-data-[size=sm]:leading-8.5 sm:leading-7.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(lc,{className:i,"data-slot":`number-field-input`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var hc=e({CustomSnoozeDialogHost:()=>xc,requestCustomSnooze:()=>_c}),gc=Pe(()=>({request:null}));function _c(){return gc.getState().request?.resolve(null),new Promise(e=>gc.setState({request:{resolve:e}}))}function vc(e){let t=gc.getState().request;gc.setState({request:null}),t?.resolve(e)}function yc(e){let t=e.getTimezoneOffset();return new Date(e.getTime()-t*6e4).toISOString().slice(0,10)}function bc(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function xc(){let e=(0,Rt.c)(3),t=gc(wc),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0],(0,J.useEffect)(Sc,n);let r;return e[1]===t?r=e[2]:(r=t?(0,q.jsx)(Tc,{}):null,e[1]=t,e[2]=r),r}function Sc(){return Cc}function Cc(){return vc(null)}function wc(e){return e.request}function Tc(){let e=(0,Rt.c)(39),t=(0,J.useId)(),[n]=(0,J.useState)(Oc),[r,i]=(0,J.useState)(`date`),[a,o]=(0,J.useState)(n),[s,c]=(0,J.useState)(!1),l;e[0]===n?l=e[1]:(l=bc(n),e[0]=n,e[1]=l);let[u,d]=(0,J.useState)(l),[f,p]=(0,J.useState)(`2`),[m,h]=(0,J.useState)(`hours`),[g,_]=(0,J.useState)(null),v;e[2]!==f||e[3]!==a||e[4]!==r||e[5]!==u||e[6]!==m?(v=r===`date`?{mode:r,date:yc(a),time:u}:{mode:r,amount:f,unit:m},e[2]=f,e[3]=a,e[4]=r,e[5]=u,e[6]=m,e[7]=v):v=e[7];let y=v,b;e[8]!==y||e[9]!==r?(b=e=>{e.preventDefault();let t=en(y,new Date);if(!t){_(r===`date`?`Choose a valid date and time in the future.`:`Enter a positive duration.`);return}vc({snoozedUntil:t})},e[8]=y,e[9]=r,e[10]=b):b=e[10];let x=b,S;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsxs)(it,{children:[(0,q.jsx)(at,{children:`Custom snooze`}),(0,q.jsx)(lt,{children:`Choose when snoozed threads return to your inbox.`})]}),e[11]=S):S=e[11];let C;e[12]===r?C=e[13]:(C=[r],e[12]=r,e[13]=C);let w,T,E;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{let t=e[0];(t===`date`||t===`duration`)&&i(t),_(null)},T=(0,q.jsx)(ht,{value:`date`,children:`Date and time`}),E=(0,q.jsx)(ht,{value:`duration`,children:`Duration`}),e[14]=w,e[15]=T,e[16]=E):(w=e[14],T=e[15],E=e[16]);let D;e[17]===C?D=e[18]:(D=(0,q.jsxs)(pt,{"aria-label":`Schedule type`,className:`w-full *:flex-1`,value:C,onValueChange:w,children:[T,E]}),e[17]=C,e[18]=D);let O;e[19]!==f||e[20]!==s||e[21]!==a||e[22]!==t||e[23]!==r||e[24]!==u||e[25]!==m?(O=r===`date`?(0,q.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,q.jsx)(zt,{htmlFor:`${t}-date`,children:`Date`}),(0,q.jsxs)(He,{open:s,onOpenChange:c,children:[(0,q.jsxs)(Re,{render:(0,q.jsx)(Ne,{id:`${t}-date`,variant:`outline`,className:`w-full justify-between`}),children:[a.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`}),(0,q.jsx)(gt,{className:`size-4 text-muted-foreground`})]}),(0,q.jsx)(Ve,{align:`start`,"aria-label":`Choose snooze date`,children:(0,q.jsx)(rs,{mode:`single`,required:!0,selected:a,defaultMonth:a,disabled:{before:new Date(new Date().setHours(0,0,0,0))},onSelect:e=>{e&&(o(e),c(!1),_(null))}})})]})]}),(0,q.jsxs)(zt,{className:`flex min-w-0 flex-col items-stretch`,htmlFor:`${t}-time`,children:[`Time`,(0,q.jsx)(Qe,{nativeInput:!0,id:`${t}-time`,className:`h-9 sm:h-8`,type:`time`,required:!0,value:u,onChange:e=>{d(e.target.value),_(null)}})]})]}):(0,q.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(uc,{id:`${t}-amount`,min:0,step:`any`,value:f===``?null:Number(f),onValueChange:e=>{p(e===null?``:String(e)),_(null)},children:[(0,q.jsx)(zt,{htmlFor:`${t}-amount`,children:`Snooze for`}),(0,q.jsxs)(dc,{children:[(0,q.jsx)(fc,{"aria-label":`Decrease duration`}),(0,q.jsx)(mc,{required:!0}),(0,q.jsx)(pc,{"aria-label":`Increase duration`})]})]}),(0,q.jsxs)(zt,{className:`flex min-w-0 flex-col items-stretch`,htmlFor:`${t}-unit`,children:[`Unit`,(0,q.jsxs)(Hn,{value:m,items:{minutes:`Minutes`,hours:`Hours`,days:`Days`},onValueChange:e=>{(e===`minutes`||e===`hours`||e===`days`)&&h(e),_(null)},children:[(0,q.jsx)(Wn,{id:`${t}-unit`,className:`min-w-0`,children:(0,q.jsx)(Gn,{})}),(0,q.jsxs)(Kn,{children:[(0,q.jsx)(qn,{value:`minutes`,children:`Minutes`}),(0,q.jsx)(qn,{value:`hours`,children:`Hours`}),(0,q.jsx)(qn,{value:`days`,children:`Days`})]})]})]})]}),e[19]=f,e[20]=s,e[21]=a,e[22]=t,e[23]=r,e[24]=u,e[25]=m,e[26]=O):O=e[26];let k;e[27]!==D||e[28]!==O?(k=(0,q.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[D,O]}),e[27]=D,e[28]=O,e[29]=k):k=e[29];let A;e[30]===g?A=e[31]:(A=g?(0,q.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:g}):null,e[30]=g,e[31]=A);let j;e[32]!==k||e[33]!==A?(j=(0,q.jsxs)(ct,{children:[k,A]}),e[32]=k,e[33]=A,e[34]=j):j=e[34];let M;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,q.jsxs)(ot,{children:[(0,q.jsx)(Ne,{type:`button`,variant:`outline`,onClick:Ec,children:`Cancel`}),(0,q.jsx)(Ne,{type:`submit`,children:`Snooze`})]}),e[35]=M):M=e[35];let N;return e[36]!==x||e[37]!==j?(N=(0,q.jsx)(dt,{open:!0,onOpenChange:Dc,children:(0,q.jsx)(ut,{className:`sm:max-w-sm`,children:(0,q.jsxs)(`form`,{className:`flex min-h-0 flex-col`,onSubmit:x,children:[S,j,M]})})}),e[36]=x,e[37]=j,e[38]=N):N=e[38],N}function Ec(){return vc(null)}function Dc(e){e||vc(null)}function Oc(){return new Date(Date.now()+36e5)}export{yt as A,Ct as C,Dt as D,Et as E,_t as M,gt as N,wt as O,Mt as S,Tt as T,It as _,Yn as a,kt as b,Wn as c,Vt as d,Qt as f,Lt as g,zt as h,Jn as i,vt as j,xt as k,Gn as l,Ut as m,hc as n,qn as o,$t as p,Hn as r,Kn as s,xc as t,Ht as u,Ft as v,St as w,jt as x,At as y};
|
|
2
|
-
//# sourceMappingURL=sidebarV2CustomSnoozeDialog-
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{Ha as n,Ua as r,Wa as i}from"./Stream-mUTFnSY9.js";import{At as a,H as o,L as s,M as c,Ot as l,P as u,U as d,V as f,X as p,_t as m,a as h,bt as g,f as _,ft as v,gt as y,jt as b,kt as x,l as S,mt as C,o as w,pt as T,r as E,s as D,t as O,tt as k,u as A,y as j,yt as M,z as N}from"./useOpenInteractionType-KsRrk6uH.js";import{Ct as P,J as F,K as I,St as ee,Tt as te,Vt as ne,X as L,Y as R,Z as re,b as ie,bn as z,ct as ae,dn as B,fn as V,ft as H,gn as U,h as W,hn as oe,ht as se,l as ce,lt as G,m as le,mn as ue,n as de,ot as fe,pt as pe,r as me,sn as he,st as ge,tn as _e,tt as ve,un as ye,ut as be,vn as xe,wt as Se,xn as Ce,y as we,yn as Te}from"./CompositeItem-DTyKsv13.js";import{p as Ee,t as K}from"./utils-MX9zGa4a.js";import{_ as De,a as Oe,i as ke,n as Ae,o as je,r as Me,s as Ne}from"./scroll-area-By2Wg8Aw.js";import{t as Pe}from"./react-D4GEJ3ir.js";import{_ as Fe,d as Ie,f as Le,i as Re,l as ze,o as Be,r as Ve,t as He,u as Ue,y as We}from"./popover-ZNCjh9sJ.js";import{t as Ge}from"./chevron-left-1XbEOuXj.js";import{t as Ke}from"./chevron-right-DAF000Jz.js";import{t as qe}from"./minus-_j91i8bf.js";import{i as Je,n as Ye,r as Xe,t as Ze}from"./getPseudoElementBounds-DJTX-eyW.js";import{C as Qe,D as $e,E as et,N as tt,O as nt,T as rt,a as it,c as at,i as ot,j as st,o as ct,r as lt,s as ut,t as dt}from"./dialog-BSwJ44Xn.js";import{t as ft}from"./CompositeList-Bc8TYCyy.js";import{n as pt,r as mt,t as ht}from"./toggle-group-BRN0oZh2.js";var gt=B(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),_t=B(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),vt=B(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),yt=B(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),q=r(),J=t(i(),1);function bt(){let[,e]=J.useState({});return J.useCallback(()=>{e({})},[])}function xt(e){let t=J.useRef(!0);t.current&&(t.current=!1,e())}var St=(e,t)=>Object.is(e,t);function Ct(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function wt(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&Ct(t,e,n))}function Tt(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&Ct(e,t,n))}function Et(e,t,n,r){let i=Tt(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function Dt(e,t,n){return e.filter(e=>!Ct(t,e,n))}function Ot(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function kt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function At(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(kt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function jt(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Ot(e)}function Mt(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Ot(e.value):Ot(e)}function Nt(e,t,n){function r(){return jt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=kt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Pt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,q.jsx)(J.Fragment,{children:Nt(r,t,n)},i)),e),[])}function Ft(e){return Array.isArray(e)?e.map(e=>Ft(e)).join(`,`):e==null?``:String(e)}function It(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Lt(e,t){return e??t}var Rt=n();function zt(e){let t=(0,Rt.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,render:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a,o,s;if(t[4]!==n||t[5]!==r){let e={className:K(`inline-flex items-center gap-2 text-base/4.5 sm:text-sm/4 font-medium text-foreground`,n),"data-slot":`label`};s=De,a=`label`,o=Ce(e,r),t[4]=n,t[5]=r,t[6]=a,t[7]=o,t[8]=s}else a=t[6],o=t[7],s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==o?(c={defaultTagName:a,props:o,render:i},t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],s(c)}function Bt(e){return!!(e.hasPendingApprovals||e.hasPendingUserInput||e.session?.status===`error`&&(e.snoozedAt==null||e.session.updatedAt!==null&&Date.parse(e.session.updatedAt)>Date.parse(e.snoozedAt))||e.snoozedAt!=null&&e.latestTurn!==null&&e.latestTurn.state===`completed`&&e.latestTurn.completedAt!=null&&Date.parse(e.latestTurn.completedAt)>Date.parse(e.snoozedAt))}function Vt(e,t){if(e.snoozedUntil==null)return!1;let n=Date.parse(e.snoozedUntil);return Number.isNaN(n)||n<=Date.parse(t.now)?!1:!Bt(e)}function Ht(e){return!(e.hasPendingApprovals||e.hasPendingUserInput)}function Ut(e,t){if(Vt(e,t))return null;let n=Date.parse(e.snoozedUntil),r=Wt(e);return r!==null&&Date.parse(r)<n?r:e.snoozedUntil}function Wt(e){return e.hasPendingApprovals||e.hasPendingUserInput?e.snoozedUntil:e.session?.status===`error`&&e.session.updatedAt!=null&&(e.snoozedAt==null||Date.parse(e.session.updatedAt)>Date.parse(e.snoozedAt))?e.session.updatedAt:e.snoozedAt!=null&&e.latestTurn!==null&&e.latestTurn.state===`completed`&&e.latestTurn.completedAt!=null&&Date.parse(e.latestTurn.completedAt)>Date.parse(e.snoozedAt)?e.latestTurn.completedAt:null}var Gt=36e5,Kt=24*Gt,qt=18,Jt=9;function Yt(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function Xt(e,t){let n=new Date(e);return n.setHours(t,0,0,0),n.getTime()<=e.getTime()&&n.setDate(n.getDate()+1),n}function Zt(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}function Qt(e){let t=new Date(e.getTime()+Gt),n=new Date(e.getTime()+3*Gt),r=[{id:`hour`,label:`In 1 hour`,whenLabel:Yt(t),snoozedUntil:t.toISOString()},{id:`three-hours`,label:`In 3 hours`,whenLabel:Yt(n),snoozedUntil:n.toISOString()}],i=Xt(e,qt);i.getTime()-e.getTime()>Gt&&r.push({id:`evening`,label:`This evening`,whenLabel:Yt(i),snoozedUntil:i.toISOString()});let a=Xt(Zt(e,1),Jt);r.push({id:`tomorrow`,label:`Tomorrow`,whenLabel:Yt(a),snoozedUntil:a.toISOString()});let o=Xt(Zt(e,(1-e.getDay()+7)%7||7),Jt);return r.push({id:`next-week`,label:`Next week`,whenLabel:`${o.toLocaleDateString(void 0,{weekday:`short`})} ${Yt(o)}`,snoozedUntil:o.toISOString()}),r}function $t(e,t){let n=Date.parse(e),r=Date.parse(t.now);if(Number.isNaN(n)||Number.isNaN(r))return`now`;let i=n-r;return i<=0?`now`:i<Gt?`${Math.max(1,Math.ceil(i/6e4))}m`:i<Kt?`${Math.ceil(i/Gt)}h`:`${Math.ceil(i/Kt)}d`}function en(e,t){let n;if(e.mode===`date`){let t=Date.parse(`${e.date}T${e.time||`00:00`}`);if(Number.isNaN(t))return null;n=t}else{let r=Number(e.amount);if(!Number.isFinite(r)||r<=0)return null;let i=e.unit===`minutes`?6e4:e.unit===`hours`?Gt:Kt;n=t.getTime()+r*i}return n<=t.getTime()?null:new Date(n).toISOString()}var tn=J.createContext(null);function nn(){let e=J.useContext(tn);if(e===null)throw Error(z(60));return e}var Y={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Mt(t,r)!==``},hasNullItemLabel:(e,t)=>t?At(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>Ct(t,e,n)):Ct(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function rn(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:l=!1,onOpenChange:d,name:p,form:h,autoComplete:g,disabled:_=!1,readOnly:y=!1,required:b=!1,modal:x=!0,actionsRef:S,inputRef:C,onOpenChangeComplete:w,items:D,multiple:k=!1,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P=St,highlightItemOnHover:I=!0,children:ee}=e,{clearErrors:te}=nt(),{setDirty:ne,setTouched:L,setFocused:re,validityData:ie,setFilled:z,name:ae,disabled:B,validation:V,validationMode:H}=st(),U=et({id:t}),W=B||_,ce=ae??p,[G,de]=le({controlled:n,default:k?r??ue:r,name:`Select`,state:`value`}),[fe,pe]=le({controlled:a,default:l,name:`Select`,state:`open`}),me=J.useRef([]),he=J.useRef([]),ge=J.useRef(null),_e=J.useRef(null),ve=J.useRef(0),be=J.useRef(null),Se=J.useRef([]),we=J.useRef(!1),Ee=J.useRef(null),K=J.useRef(null),De=J.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Oe=J.useRef(!1),{mounted:ke,setMounted:je,transitionStatus:Ne}=u(fe),{openMethod:Pe,triggerProps:Fe}=O(fe),Ie=Te(()=>new s({id:U,labelId:void 0,modal:x,multiple:k,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P,value:G,open:fe,mounted:ke,transitionStatus:Ne,items:D,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Le=N(Ie,Y.activeIndex),Re=N(Ie,Y.selectedIndex),Be=N(Ie,Y.triggerElement),Ve=N(Ie,Y.positionerElement),He=ze(Pe),Ue=Pe??He,We=J.useMemo(()=>k?``:Mt(G,M),[k,G,M]),Ge=J.useMemo(()=>k&&Array.isArray(G)?G.map(e=>Mt(e,M)):Mt(G,M),[k,G,M]),Ke=m(Be),qe=F(()=>Ge);rt(Ke,U,G,qe,!W,p);let Ze=J.useRef(G),Qe=k?Array.isArray(G)&&G.length>0:G!=null&&We!==``;ye(()=>{z(Qe)},[Qe,z]),ye(function(){let e=G,t=!1;if(k){let n=Array.isArray(G)?G:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:Tt(Se.current,e,P),r=n===-1?null:n;r===null&&(K.current=null),!fe&&Ie.set(`selectedIndex`,r)},[k,fe,G,P,Ie]);function $e(e){let t=ie.initialValue;return Array.isArray(e)&&Array.isArray(t)?!It(e,t,(e,t)=>Ct(e,t,P)):e!==t}E(G,()=>{te(ce),ne($e(G)),V.change(G)});let tt=F((e,t)=>{d?.(e,t),!t.isCanceled&&(pe(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(L(!0),re(!1),H===`onBlur`&&V.commit(G)))}),it=F(()=>{je(!1),Ie.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),w?.(!1)});c({enabled:!S,open:fe,ref:ge,onComplete(){fe||it()}}),J.useImperativeHandle(S,()=>({unmount:it}),[it]);let at=F((e,t)=>{i?.(e,t),!t.isCanceled&&de(e)}),ot=F(e=>{let t=Ae(e.scrollHeight,e.clientHeight),n=Me(e.scrollTop,t),r=n>0,i=n<t;Ie.set(`scrollUpArrowVisible`,r),Ie.set(`scrollDownArrowVisible`,i)}),ct=Je({open:fe,onOpenChange:tt,elements:{reference:Be,floating:Ve}}),lt=o(ct,{enabled:!y&&!W,event:`mousedown`}),ut=f(ct),dt=Xe(ct,{enabled:!y&&!W,listRef:me,activeIndex:Le,selectedIndex:Re,disabledIndices:ue,onNavigate(e){e===null&&!fe||Ie.set(`activeIndex`,e)},focusItemOnHover:I}),ft=Ye(ct,{enabled:!y&&!W&&(fe||!k),listRef:he,activeIndex:Le,selectedIndex:Re,disabledIndices:e=>mt(me.current[e]),onMatch(e){fe?Ie.set(`activeIndex`,e):at(Se.current[e],R(se))},onTyping(e){we.current=e}}),pt=J.useMemo(()=>Ce(ft.reference,dt.reference,ut.reference,lt.reference,Fe),[lt.reference,ft.reference,dt.reference,ut.reference,Fe]),ht=J.useMemo(()=>Ce(j,ft.floating,dt.floating,ut.floating),[ft.floating,dt.floating,ut.floating]),gt=dt.item??oe;xt(()=>{Ie.update({popupProps:ht,triggerProps:pt})}),Ie.useSyncedValues({id:U,modal:x,multiple:k,value:G,open:fe,mounted:ke,transitionStatus:Ne,popupProps:ht,triggerProps:pt,items:D,itemToStringLabel:A,itemToStringValue:M,isItemEqualToValue:P,openMethod:Ue});let _t=J.useMemo(()=>({store:Ie,floatingContext:ct,required:b,disabled:W,readOnly:y,multiple:k,highlightItemOnHover:I,setValue:at,setOpen:tt,listRef:me,popupRef:ge,scrollHandlerRef:_e,handleScrollArrowVisibility:ot,scrollArrowsMountedCountRef:ve,itemProps:gt,valueRef:be,valuesRef:Se,labelsRef:he,typingRef:we,selectionRef:De,firstItemTextRef:Ee,selectedItemTextRef:K,validation:V,onOpenChangeComplete:w,alignItemWithTriggerActiveRef:Oe,initialValueRef:Ze}),[Ie,ct,b,W,y,k,I,at,tt,gt,V,w,ot]),vt=xe(C,V.inputRef),yt=k?void 0:ce,bt=J.useMemo(()=>!k||!Array.isArray(G)||!ce?null:G.map(e=>{let t=Mt(e,M);return(0,q.jsx)(`input`,{type:`hidden`,form:h,name:ce,value:t,disabled:W},t)}),[k,G,h,ce,M,W]);return(0,q.jsxs)(tn.Provider,{value:_t,children:[ee,(0,q.jsx)(`input`,{...V.getValidationProps(W,{onFocus(){Ie.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||W||y)return;let t=e.currentTarget.value,n=R(se,e.nativeEvent);function r(){if(k)return;let e=t.toLowerCase(),r=Se.current.findIndex(t=>Mt(t,M).toLowerCase()===e||jt(t,A).toLowerCase()===e);r===-1&&(r=Se.current.findIndex((t,n)=>{let r=he.current[n];return r!=null&&r.toLowerCase()===e}));let i=Se.current[r];i!=null&&at(i,n)}Ie.set(`forceMount`,!0),queueMicrotask(r)}}),id:U&&yt==null?`${U}-hidden-input`:void 0,form:h,name:yt,autoComplete:g,value:We,disabled:W,required:b&&!(k&&Qe),readOnly:y,ref:vt,style:ce?T:v,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),bt]})}var an=400,on={...S,...tt,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},sn=J.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:h}=st(),{labelId:_}=$e(),{store:v,setOpen:y,selectionRef:b,validation:x,readOnly:S,required:w,alignItemWithTriggerActiveRef:T,disabled:E}=nn(),D=h||E||o,O=N(v,Y.open),k=N(v,Y.mounted),A=N(v,Y.value),j=N(v,Y.triggerProps),M=N(v,Y.positionerElement),P=N(v,Y.listElement),F=N(v,Y.popupSide),I=N(v,Y.id),ee=N(v,Y.labelId),ne=N(v,Y.hasSelectedValue),L=k&&M?F:null,ie=i??I,z=Lt(_,ee);et({id:ie});let ae=m(M),B=J.useRef(null),{getButtonProps:H,buttonRef:U}=W({disabled:D,native:s}),oe=v.useStateSetter(`triggerElement`),ce=a(),G=a(),le=a();J.useEffect(()=>{if(O)return le.start(an,()=>{b.current.allowUnselectedMouseUp=!0,b.current.allowSelectedMouseUp=!0}),()=>{le.clear()};b.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[O,b,G,le]);let ue=Ce(j,{id:ie,role:`combobox`,"aria-expanded":O,"aria-haspopup":`listbox`,"aria-controls":O?P?.id??g(M)?.id:void 0,"aria-labelledby":z,"aria-readonly":S||void 0,"aria-required":w||void 0,tabIndex:D?-1:0,onFocus(e){d(!0),O&&T.current&&y(!1,R(se,e.nativeEvent)),ce.start(0,()=>{v.set(`forceMount`,!0)})},onBlur(e){te(M,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&x.commit(A))},onMouseDown(e){if(O)return;let t=C(e.currentTarget);function n(e){if(!B.current)return;let t=e.target;te(B.current,t)||te(ae.current,t)||Ze(e,B.current)||y(!1,R(re,e))}G.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,H),de=x.getValidationProps(D,ue);de.role=`combobox`;let fe={...p,open:O,disabled:D,value:A,readOnly:S,popupSide:L,placeholder:!ne};return V(`button`,e,{ref:[t,B,U,oe],state:fe,stateAttributesMapping:on,props:de})}),cn={value:()=>null},ln=J.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=nn(),u=N(c,Y.value),d=N(c,Y.items),f=N(c,Y.itemToStringLabel),p=N(c,Y.hasSelectedValue),m=!p&&a!=null&&i==null,h=N(c,Y.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(m&&!h?a:Array.isArray(u)?Pt(u,d,f):Nt(u,d,f)),V(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:cn})}),un=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=nn(),s={open:N(o,Y.open)};return V(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:A})}),dn=J.forwardRef(function(e,t){let{store:n}=nn(),r=N(n,Y.mounted),i=N(n,Y.forceMount);return r||i?(0,q.jsx)(p,{ref:t,...e}):null}),fn=J.createContext(void 0);function pn(){let e=J.useContext(fn);if(!e)throw Error(z(59));return e}function mn(e,t){e&&Object.assign(e.style,t)}var hn={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},gn={position:`fixed`},_n=J.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:g=!0,collisionAvoidance:_=k,style:v,...y}=e,{store:b,listRef:x,labelsRef:S,alignItemWithTriggerActiveRef:C,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:O,setValue:A,floatingContext:j}=nn(),M=N(b,Y.open),P=N(b,Y.mounted),I=N(b,Y.modal),ee=N(b,Y.value),te=N(b,Y.openMethod),ne=N(b,Y.positionerElement),L=N(b,Y.triggerElement),re=N(b,Y.isItemEqualToValue),ie=N(b,Y.transitionStatus),z=J.useRef(null),ae=J.useRef(null),[B,V]=J.useState(g),H=P&&B&&te!==`touch`;!P&&B!==g&&V(g),J.useImperativeHandle(C,()=>H),Be((H||I)&&M,te===`touch`,ne,L);let U=Le({anchor:n,floatingRootContext:j,positionMethod:a,mounted:P,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:_,keepMounted:!0}),W=H?`none`:U.side,oe=H?gn:U.positionerStyles,ce={open:M,side:W,align:U.align,anchorHidden:U.anchorHidden};ye(()=>{b.set(`popupSide`,U.side)},[b,U.side]);let G=b.useStateSetter(`positionerElement`),le=Ue(e,ce,{styles:oe,transitionStatus:ie,props:y,refs:[t,G],hidden:!P,inert:!M}),ue=J.useRef(0),de=F(e=>{if(E.current.length===0)return;let t=ue.current;if(ue.current=e.size,e.size===t)return;let n=R(se);if(t!==0&&!b.state.multiple&&ee!==null&&Tt(E.current,ee,re)===-1){let e=D.current,t=e!=null&&Tt(E.current,e,re)!==-1?e:null;A(t,n),t===null&&(b.set(`selectedIndex`,null),T.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(ee)){let e=ee.filter(e=>Tt(E.current,e,re)!==-1);e.length!==ee.length&&(A(e,n),e.length===0&&(b.set(`selectedIndex`,null),T.current=null))}if(M&&H){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};mn(ne,e),mn(O.current,e)}}),fe=J.useMemo(()=>({...U,side:W,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:z,scrollDownArrowRef:ae}),[U,W,H,V]);return(0,q.jsx)(ft,{elementsRef:x,labelsRef:S,onMapChange:de,children:(0,q.jsxs)(fn.Provider,{value:fe,children:[P&&I&&(0,q.jsx)(h,{inert:w(!M),cutout:L}),le]})})}),vn={...D,..._},yn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:u,onOpenChangeComplete:f,setOpen:p,valueRef:m,firstItemTextRef:h,selectedItemTextRef:g,multiple:_,handleScrollArrowVisibility:v,scrollHandlerRef:b,listRef:x,highlightItemOnHover:S,floatingContext:w}=nn(),{side:T,align:E,alignItemWithTriggerActive:D,isPositioned:O,setControlledAlignItemWithTrigger:k}=pn(),A=de(!0)!=null,j=we(),{nonce:I,disableStyleElements:ee}=ke(),te=N(s,Y.id),L=N(s,Y.open),re=N(s,Y.openMethod),ie=N(s,Y.mounted),z=N(s,Y.popupProps),ae=N(s,Y.transitionStatus),B=N(s,Y.triggerElement),H=N(s,Y.positionerElement),U=N(s,Y.listElement),W=J.useRef(!1),oe=J.useRef(!1),se=J.useRef({}),G=y(),le=F(e=>{if(!H||!u.current||!oe.current)return;let t=H.style.top===`0px`,n=H.style.bottom===`0px`;if(W.current||!D||!t&&!n){v(e);return}let r=Sn(H),i=Cn(H.getBoundingClientRect().height,`y`,r),a=C(H),o=ne(H),s=o.getComputedStyle(H),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),d=bn(o.getComputedStyle(u.current)),f=Math.min(a.documentElement.clientHeight-c-l,d),p=e.scrollTop,m=xn(e),h=null,g=e=>{H.style.height=`${e}px`},_=t?m-p:p,y=Math.min(i+_,f);if(_<=1){let n=je(_,0,f-i);n>0&&g(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(W.current=!0),v(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(_-(i+_-f)));let b=Math.ceil(y);if(b!==0&&g(b),h!=null){let t=je(h,0,xn(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(W.current=!0),v(e)});J.useImperativeHandle(b,()=>le,[le]),c({open:L,ref:u,onComplete(){L&&f?.(!0)}});let ue={open:L,transitionStatus:ae,side:T,align:E};ye(()=>{!H||!u.current||Object.keys(se.current).length||(se.current={top:H.style.top||`0`,left:H.style.left||`0`,right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[u,H]),ye(()=>{L||D||(oe.current=!1,W.current=!1,mn(H,se.current))},[L,D,H,u]),ye(()=>{let e=u.current;if(!L||!B||!H||!e||D&&!O||s.state.transitionStatus===`ending`)return;if(oe.current=!0,e.style.removeProperty(`--transform-origin`),!D){G.request(()=>v(U||e));return}let t=En(e);try{let t=g.current;t?.isConnected||(t=!Y.hasSelectedValue(s.state)&&h.current?.isConnected?h.current:null);let n=m.current,r=ne(H),i=r.getComputedStyle(H),a=r.getComputedStyle(e),o=C(B),c=Sn(B),u=wn(B.getBoundingClientRect(),c),d=wn(H.getBoundingClientRect(),c),f=u.height,p=U||e,_=p.scrollHeight,y=parseFloat(a.borderBottomWidth),b=parseFloat(i.marginTop)||10,w=parseFloat(i.marginBottom)||10,T=parseFloat(i.minHeight)||100,E=bn(a),D=o.documentElement.clientHeight-b-w,O=o.documentElement.clientWidth,A=D-u.bottom+f,M,N=j===`rtl`?u.right-d.width:u.left,P=0;if(t&&n){let e=wn(n.getBoundingClientRect(),c);M=wn(t.getBoundingClientRect(),c),N=d.left+(j===`rtl`?e.right-M.right:e.left-M.left);let r=e.top-u.top+e.height/2;P=M.top-d.top+M.height/2-r}let F=A+P+w+y,I=Math.min(D,F),ee=D-b-w,te=F-I,L=O-5;H.style.left=`${je(N,5,L-d.width)}px`,H.style.height=`${I}px`,H.style.maxHeight=`none`,H.style.marginTop=`${b}px`,H.style.marginBottom=`${w}px`,e.style.height=`100%`;let R=xn(p),re=te>=R-1;re&&(I=Math.min(D,d.height)-(te-R));let ie=u.top<20||u.bottom>D-20||Math.ceil(I)+1<Math.min(_,T),z=(r.visualViewport?.scale??1)!==1&&l;if(ie||z){mn(H,se.current),k(!1);return}let ae=Math.max(T,I);if(re){let e=Math.max(0,D-F);H.style.top=d.height>=ee?`0`:`${e}px`,H.style.height=`${I}px`,p.scrollTop=xn(p)}else H.style.bottom=`0`,p.scrollTop=te;if(M){let t=d.top,n=d.height,r=M.top+M.height/2,i=je(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ae===D||I>=E)&&(W.current=!0),v(p),S&&s.state.selectedIndex===null&&s.state.activeIndex===null&&x.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,L,H,B,m,h,g,u,v,D,k,G,U,x,S,j,O]),J.useEffect(()=>{if(!D||!H||!L)return;let e=ne(H);function t(e){p(!1,R(P,e))}return M(e,`resize`,t)},[p,D,H,L]);let fe={...U?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${te}-list`},onKeyDown(e){A&&ce.has(e.key)&&e.stopPropagation()},onScroll(e){U||le(e.currentTarget)},...D&&{style:U?{height:`100%`}:hn},className:!U&&D?Oe.className:void 0},pe=V(`div`,e,{ref:[t,u],state:ue,stateAttributesMapping:vn,props:[z,fe,Ie(ae),o]});return(0,q.jsxs)(J.Fragment,{children:[!ee&&Oe.getElement(I),(0,q.jsx)(d,{context:w,modal:!1,disabled:!ie,openInteractionType:re,returnFocus:a,restoreFocus:!0,children:pe})]})});function bn(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function xn(e){return Ae(e.scrollHeight,e.clientHeight)}function Sn(e){return Fe.getScale(e)}function Cn(e,t,n){return e/n[t]}function wn(e,t){return I({x:Cn(e.x,`x`,t),y:Cn(e.y,`y`,t),width:Cn(e.width,`x`,t),height:Cn(e.height,`y`,t)})}var Tn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function En(e){let{style:t}=e,n={};for(let[e,r]of Tn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Tn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Dn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=nn(),{alignItemWithTriggerActive:l}=pn(),u=N(o,Y.hasScrollArrows),d=N(o,Y.openMethod),f={id:`${N(o,Y.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:hn},className:u&&d!==`touch`?Oe.className:void 0},p=o.useStateSetter(`listElement`);return V(`div`,e,{ref:[t,p],props:[f,a]})}),On=J.createContext(void 0);function kn(){let e=J.useContext(On);if(!e)throw Error(z(57));return e}var An=J.memo(J.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=J.useRef(null),d=me({guess:!0,label:o,textRef:u}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b,disabled:x,readOnly:S}=nn(),C=x||s,w=N(f,Y.isActive,d.index),T=N(f,Y.open),E=N(f,Y.isSelected,a),D=N(f,Y.isSelectedByFocus,d.index),O=N(f,Y.isItemEqualToValue),k=d.index,A=J.useRef(null);ye(()=>{let e=v.current;return e[k]=a,()=>{delete e[k]}},[k,a,v]),ye(()=>{let e=f.state.value,t=e;y&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&Ct(a,t,O)&&(f.set(`selectedIndex`,k),u.current&&(b.current=u.current))},[k,y,O,f,a,b]);let j=J.useRef(`mouse`),M=J.useRef(!1),{getButtonProps:P,buttonRef:F}=W({disabled:C,focusableWhenDisabled:!0,native:c,composite:!0}),I={disabled:C,selected:E,highlighted:w};function ee(e){if(x||S)return;let t=f.state.value;if(y){let n=Array.isArray(t)?t:[],r=E?Dt(n,a,O):[...n,a];h(r,R(H,e))}else h(a,R(H,e)),m(!1,R(H,e))}function te(){g.current.dragY=0}let ne={role:`option`,"aria-selected":E,tabIndex:T&&w?0:-1,onKeyDown(e){f.set(`activeIndex`,k),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=j.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&_e(e.nativeEvent)&&(n!==void 0||w),i=t&&!r&&!M.current;M.current=!1,!(C||i)&&ee(e.nativeEvent)},onPointerEnter(e){j.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){j.current=e.pointerType,M.current=!0,te()},onMouseUp(){if(te(),C||j.current===`touch`||M.current)return;let e=!g.current.allowSelectedMouseUp&&E,t=!g.current.allowUnselectedMouseUp&&!E;e||t||(M.current=!0,A.current?.click(),M.current=!1)}},L=V(`div`,e,{ref:[F,t,d.ref,A],state:I,props:[p,ne,l,P]}),re=J.useMemo(()=>({selected:E,index:k,textRef:u,selectedByFocus:D}),[E,k,u,D]);return(0,q.jsx)(On.Provider,{value:re,children:L})})),jn=J.forwardRef(function(e,t){let{selected:n}=kn();return e.keepMounted||n?(0,q.jsx)(Mn,{...e,ref:t}):null}),Mn=J.memo(J.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=kn(),l=J.useRef(null),{transitionStatus:d,setMounted:f}=u(s),p=V(`span`,e,{ref:[t,l],state:{selected:s,transitionStatus:d},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:_});return c({open:s,ref:l,onComplete(){s||f(!1)}}),p})),Nn=J.memo(J.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=kn(),{firstItemTextRef:a,selectedItemTextRef:o}=nn(),{render:s,className:c,style:l,...u}=e,d=J.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return V(`div`,e,{ref:[d,t,r],props:u})})),Pn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:o,keepMounted:s,...l}=e,d=o===`up`,{store:f,popupRef:p,listRef:m,handleScrollArrowVisibility:h,scrollArrowsMountedCountRef:g}=nn(),{side:v,scrollDownArrowRef:y,scrollUpArrowRef:b}=pn(),x=d?Y.scrollUpArrowVisible:Y.scrollDownArrowVisible,S=N(f,x),C=N(f,Y.openMethod),w=S&&C!==`touch`,T=a(),E=d?b:y,{mounted:D,transitionStatus:O,setMounted:k}=u(w);ye(()=>(g.current+=1,f.set(`hasScrollArrows`,!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&f.set(`hasScrollArrows`,!1)}),[f,g]),c({open:w,ref:E,onComplete(){w||k(!1)}});let A=V(`div`,e,{ref:[t,E],state:{direction:o,visible:w,side:v,transitionStatus:O},props:[{"aria-hidden":!0,children:d?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||T.isStarted())return;f.set(`activeIndex`,null);function t(){let e=f.state.listElement??p.current;if(!e)return;f.set(`activeIndex`,null),h(e);let n=Ae(e.scrollHeight,e.clientHeight),r=Me(e.scrollTop,n),i=r===(d?0:n),a=m.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){T.clear();return}if(a.length>0){let t=E.current?.offsetHeight||0;e.scrollTop=Fn(a,d,r,e.clientHeight,t,n)}T.start(40,t)}T.start(40,t)},onMouseLeave(){T.clear()}},l],stateAttributesMapping:_});return D||s?A:null});function Fn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Me(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Me(l.offsetTop+l.offsetHeight-r+i,a):a}var In=J.forwardRef(function(e,t){return(0,q.jsx)(Pn,{...e,ref:t,direction:`down`})}),Ln=J.forwardRef(function(e,t){return(0,q.jsx)(Pn,{...e,ref:t,direction:`up`})}),Rn=J.createContext(void 0);function zn(){let e=J.useContext(Rn);if(e===void 0)throw Error(z(56));return e}var Bn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=J.useState(),c=J.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=V(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,q.jsx)(Rn.Provider,{value:c,children:l})}),Vn=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=zn(),c=ie(a);return ye(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),V(`div`,e,{ref:t,props:[{id:c},o]})}),Hn=rn,Un=Ee(`relative inline-flex cursor-pointer select-none items-center justify-between gap-2 border rounded-lg text-left text-base outline-none transition-[color,box-shadow,background-color] data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,{defaultVariants:{size:`default`,variant:`default`},variants:{variant:{default:`w-full min-w-36 border-input bg-background not-dark:bg-clip-padding text-foreground shadow-xs/5 ring-ring/24 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive-border focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive-border dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,ghost:`border-transparent text-muted-foreground/70 focus-visible:ring-2 focus-visible:ring-ring data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-foreground/80`},size:{default:`min-h-9 px-[calc(--spacing(3)-1px)] sm:min-h-8`,lg:`min-h-10 px-[calc(--spacing(3)-1px)] sm:min-h-9`,sm:`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`}}});function Wn(e){let t=(0,Rt.c)(20),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,size:o,variant:s,children:n,icon:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=o===void 0?`default`:o,l=s===void 0?`default`:s,u;t[7]!==r||t[8]!==c||t[9]!==l?(u=K(Un({size:c,variant:l}),r),t[7]=r,t[8]=c,t[9]=l,t[10]=u):u=t[10];let d;t[11]===i?d=t[12]:(d=i??(0,q.jsx)(We,{className:`size-3 opacity-50`}),t[11]=i,t[12]=d);let f;t[13]===d?f=t[14]:(f=(0,q.jsx)(un,{"data-slot":`select-icon`,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==n||t[16]!==a||t[17]!==u||t[18]!==f?(p=(0,q.jsxs)(sn,{className:u,"data-slot":`select-trigger`,...a,children:[n,f]}),t[15]=n,t[16]=a,t[17]=u,t[18]=f,t[19]=p):p=t[19],p}function Gn(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`flex-1 truncate data-placeholder:text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(ln,{className:i,"data-slot":`select-value`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kn(e){let t=(0,Rt.c)(28),n,r,i,a,o,s,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9]):({className:i,children:r,side:o,sideOffset:s,align:c,alignOffset:l,alignItemWithTrigger:u,anchor:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u);let d=o===void 0?`bottom`:o,f=s===void 0?4:s,p=c===void 0?`start`:c,m=l===void 0?0:l,h=u===void 0||u,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,q.jsx)(Ln,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover`,"data-slot":`select-scroll-up-arrow`,children:(0,q.jsx)(_t,{className:`relative size-4.5 sm:size-4`})}),t[10]=g):g=t[10];let _;t[11]===i?_=t[12]:(_=K(`max-h-(--available-height) overflow-y-auto p-1`,i),t[11]=i,t[12]=_);let v;t[13]!==r||t[14]!==_?(v=(0,q.jsx)(`div`,{className:`dropdown-glass relative h-full min-w-(--anchor-width) rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,children:(0,q.jsx)(Dn,{className:_,"data-slot":`select-list`,children:r})}),t[13]=r,t[14]=_,t[15]=v):v=t[15];let y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,q.jsx)(In,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover`,"data-slot":`select-scroll-down-arrow`,children:(0,q.jsx)(We,{className:`relative size-4.5 sm:size-4`})}),t[16]=y):y=t[16];let b;t[17]!==a||t[18]!==v?(b=(0,q.jsxs)(yn,{className:`origin-(--transform-origin) text-foreground`,"data-slot":`select-popup`,...a,children:[g,v,y]}),t[17]=a,t[18]=v,t[19]=b):b=t[19];let x;return t[20]!==p||t[21]!==h||t[22]!==m||t[23]!==n||t[24]!==d||t[25]!==f||t[26]!==b?(x=(0,q.jsx)(dn,{children:(0,q.jsx)(_n,{align:p,alignItemWithTrigger:h,alignOffset:m,anchor:n,className:`z-50 select-none`,"data-slot":`select-positioner`,side:d,sideOffset:f,children:b})}),t[20]=p,t[21]=h,t[22]=m,t[23]=n,t[24]=d,t[25]=f,t[26]=b,t[27]=x):x=t[27],x}function qn(e){let t=(0,Rt.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a!==void 0&&a,s=o?`grid-cols-[1fr] ps-3 pe-3`:`grid-cols-[1rem_1fr] ps-2 pe-4`,c;t[5]!==r||t[6]!==s?(c=K(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let l;t[8]===o?l=t[9]:(l=o?null:(0,q.jsx)(jn,{className:`col-start-1`,"data-slot":`select-item-indicator`,children:(0,q.jsx)(`svg`,{fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,q.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),t[8]=o,t[9]=l);let u=o?`col-start-1`:`col-start-2`,d;t[10]===u?d=t[11]:(d=K(`min-w-0`,u),t[10]=u,t[11]=d);let f;t[12]!==n||t[13]!==d?(f=(0,q.jsx)(Nn,{className:d,"data-slot":`select-item-text`,children:n}),t[12]=n,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==i||t[16]!==c||t[17]!==l||t[18]!==f?(p=(0,q.jsxs)(An,{className:c,"data-slot":`select-item`,...i,children:[l,f]}),t[15]=i,t[16]=c,t[17]=l,t[18]=f,t[19]=p):p=t[19],p}function Jn(e){let t=(0,Rt.c)(2),n;return t[0]===e?n=t[1]:(n=(0,q.jsx)(Bn,{"data-slot":`select-group`,...e}),t[0]=e,t[1]=n),n}function Yn(e){let t=(0,Rt.c)(2),n;return t[0]===e?n=t[1]:(n=(0,q.jsx)(Vn,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,"data-slot":`select-group-label`,...e}),t[0]=e,t[1]=n),n}function Xn(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var Zn={},Qn={};function $n(e,t){try{let n=(Zn[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in Qn?Qn[n]:tr(n,n.split(`:`))}catch{if(e in Qn)return Qn[e];let t=e?.match(er);return t?tr(e,t.slice(1)):NaN}}var er=/([+-]\d\d):?(\d\d)?/;function tr(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return Qn[e]=n*60+r>0?n*60+r+i:n*60-r-i}var nr=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN($n(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),or(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-$n(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),ir(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},rr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!rr.test(e))return;let t=e.replace(rr,`$1UTC`);nr.prototype[t]&&(e.startsWith(`get`)?nr.prototype[e]=function(){return this.internal[t]()}:(nr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),ar(this),+this},nr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ir(this),+this}))});function ir(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-$n(e.timeZone,e)*60))}function ar(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),or(e)}function or(e,t){let n=Array.isArray(t)?sr(t):+e.internal,r=$n(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),s=-new Date(+a).getTimezoneOffset(),c=o-s,l=o;if(c&&o!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=o-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=$n(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(l=s)}let u=l-i;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let d=new Date(+e);d.setUTCSeconds(0);let f=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-($n(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=$n(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-h,_=h!==i,v=g-u,y=h-i,b=n-h*60*1e3,x=y>0&&cr(e)-n===y*60*1e3&&cr(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=$n(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}ir(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<18e5&&(Date.prototype.setTime.call(e,+e+S),ir(e))}function sr(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function cr(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-$n(e.timeZone,n)*60)),+n}var lr=class e extends nr{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Xn(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},ur=365.2425,dr=6048e5,fr=864e5,pr=86400;pr*7,pr*ur/12*3;var mr=Symbol.for(`constructDateFrom`);function hr(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&mr in e?e[mr](t):e instanceof Date?new e.constructor(t):new Date(t)}function X(e,t){return hr(t||e,e)}function gr(e,t,n){let r=X(e,n?.in);return isNaN(t)?hr(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function _r(e,t,n){let r=X(e,n?.in);if(isNaN(t))return hr(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=hr(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}var vr={};function yr(){return vr}function br(e,t){let n=yr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=X(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function xr(e,t){return br(e,{...t,weekStartsOn:1})}function Sr(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=hr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=xr(i),o=hr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=xr(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Cr(e){let t=X(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function wr(e,...t){let n=hr.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Tr(e,t){let n=X(e,t?.in);return n.setHours(0,0,0,0),n}function Er(e,t,n){let[r,i]=wr(n?.in,e,t),a=Tr(r),o=Tr(i),s=+a-Cr(a),c=+o-Cr(o);return Math.round((s-c)/fr)}function Dr(e,t){let n=Sr(e,t),r=hr(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xr(r)}function Or(e,t,n){return gr(e,t*7,n)}function kr(e,t,n){return _r(e,t*12,n)}function Ar(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=hr.bind(null,e));let t=X(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),hr(r,n||NaN)}function jr(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=hr.bind(null,e));let t=X(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),hr(r,n||NaN)}function Mr(e,t,n){let[r,i]=wr(n?.in,e,t);return+Tr(r)==+Tr(i)}function Nr(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Pr(e){return!(!Nr(e)&&typeof e!=`number`||isNaN(+X(e)))}function Fr(e,t,n){let[r,i]=wr(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function Ir(e,t){let n=X(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Lr(e,t){let[n,r]=wr(e,t.start,t.end);return{start:n,end:r}}function Rr(e,t){let{start:n,end:r}=Lr(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(hr(n,o)),o.setMonth(o.getMonth()+s);return i?c.reverse():c}function zr(e,t){let n=X(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Br(e,t){let n=X(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Vr(e,t){let n=X(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Hr(e,t){let{start:n,end:r}=Lr(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(hr(n,o)),o.setFullYear(o.getFullYear()+s);return i?c.reverse():c}function Ur(e,t){let n=yr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=X(e,t?.in),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function Wr(e,t){return Ur(e,{...t,weekStartsOn:1})}var Gr={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},Kr=(e,t,n)=>{let r,i=Gr[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function qr(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Jr={date:qr({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:qr({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:qr({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Yr={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Xr=(e,t,n,r)=>Yr[e];function Zr(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var Qr={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Zr({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Zr({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Zr({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Zr({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Zr({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function $r(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ti(s,e=>e.test(o)):ei(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ei(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ti(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ni(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ri={code:`en-US`,formatDistance:Kr,formatLong:Jr,formatRelative:Xr,localize:Qr,match:{ordinalNumber:ni({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$r({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:$r({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:$r({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:$r({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:$r({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ii(e,t){let n=X(e,t?.in);return Er(n,Vr(n))+1}function ai(e,t){let n=X(e,t?.in),r=xr(n)-+Dr(n);return Math.round(r/dr)+1}function oi(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=yr(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=hr(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=br(o,t),c=hr(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=br(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function si(e,t){let n=yr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=oi(e,t),a=hr(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),br(a,t)}function ci(e,t){let n=X(e,t?.in),r=br(n,t)-+si(n,t);return Math.round(r/dr)+1}function Z(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var li={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return Z(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):Z(n+1,2)},d(e,t){return Z(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return Z(e.getHours()%12||12,t.length)},H(e,t){return Z(e.getHours(),t.length)},m(e,t){return Z(e.getMinutes(),t.length)},s(e,t){return Z(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return Z(Math.trunc(r*10**(n-3)),t.length)}},ui={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},di={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return li.y(e,t)},Y:function(e,t,n,r){let i=oi(e,r),a=i>0?i:1-i;return t===`YY`?Z(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):Z(a,t.length)},R:function(e,t){return Z(Sr(e),t.length)},u:function(e,t){return Z(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return Z(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return Z(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return li.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return Z(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=ci(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):Z(i,t.length)},I:function(e,t,n){let r=ai(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):Z(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):li.d(e,t)},D:function(e,t,n){let r=ii(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):Z(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return Z(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return Z(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return Z(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?ui.noon:r===0?ui.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?ui.evening:r>=12?ui.afternoon:r>=4?ui.morning:ui.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return li.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):li.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):Z(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):Z(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):li.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):li.s(e,t)},S:function(e,t){return li.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return pi(r);case`XXXX`:case`XX`:return mi(r);default:return mi(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return pi(r);case`xxxx`:case`xx`:return mi(r);default:return mi(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+fi(r,`:`);default:return`GMT`+mi(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+fi(r,`:`);default:return`GMT`+mi(r,`:`)}},t:function(e,t,n){return Z(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return Z(+e,t.length)}};function fi(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Z(a,2)}function pi(e,t){return e%60==0?(e>0?`-`:`+`)+Z(Math.abs(e)/60,2):mi(e,t)}function mi(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Z(Math.trunc(r/60),2),a=Z(r%60,2);return n+i+t+a}var hi=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},gi=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},_i={p:gi,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hi(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,hi(r,t)).replace(`{{time}}`,gi(i,t))}},vi=/^D+$/,yi=/^Y+$/,bi=[`D`,`DD`,`YY`,`YYYY`];function xi(e){return vi.test(e)}function Si(e){return yi.test(e)}function Ci(e,t,n){let r=wi(e,t,n);if(console.warn(r),bi.includes(e))throw RangeError(r)}function wi(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ti=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ei=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Di=/^'([^]*?)'?$/,Oi=/''/g,ki=/[a-zA-Z]/;function Ai(e,t,n){let r=yr(),i=n?.locale??r.locale??ri,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=X(e,n?.in);if(!Pr(s))throw RangeError(`Invalid time value`);let c=t.match(Ei).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=_i[t];return n(e,i.formatLong)}return e}).join(``).match(Ti).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:ji(e)};if(di[t])return{isToken:!0,value:e};if(t.match(ki))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&Si(a)||!n?.useAdditionalDayOfYearTokens&&xi(a))&&Ci(a,t,String(e));let o=di[a[0]];return o(s,a,i.localize,l)}).join(``)}function ji(e){let t=e.match(Di);return t?t[1].replace(Oi,`'`):e}function Mi(e,t){let n=X(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=hr(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Ni(e,t){return X(e,t?.in).getMonth()}function Pi(e,t){return X(e,t?.in).getFullYear()}function Fi(e,t){return+X(e)>+X(t)}function Ii(e,t){return+X(e)<+X(t)}function Li(e,t,n){let[r,i]=wr(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Ri(e,t,n){let[r,i]=wr(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function zi(e,t,n){let r=X(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=hr(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Mi(o);return r.setMonth(t,Math.min(a,s)),r}function Bi(e,t,n){let r=X(e,n?.in);return isNaN(+r)?hr(n?.in||e,NaN):(r.setFullYear(t),r)}var Vi=5,Hi=4;function Ui(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,34);return t.getMonth(e)===t.getMonth(a)?Vi:Hi}function Wi(e,t){let n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Gi(e,t){let n=Wi(e,t),r=Ui(e,t);return t.addDays(n,r*7-1)}var Ki={...ri,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>Ai(e,t,{locale:ri,...n});let a=i(e,`PPPP`);return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:`Choose the Month`,labelNext:`Go to the Next Month`,labelPrevious:`Go to the Previous Month`,labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:`Choose the Year`,labelGrid:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>Ai(e,n,{locale:ri,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>Ai(e,t,{locale:ri,...n});let a=i(e,`PPPP`);return t?.today&&(a=`Today, ${a}`),a},labelNav:`Navigation bar`,labelWeekNumberHeader:`Week Number`,labelWeekday:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>Ai(e,n,{locale:ri,...t}),r(e,`cccc`)}}},qi=class e{constructor(e,t){this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?lr.tz(this.options.timeZone):new(this.options.Date??Date),this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new lr(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):gr(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):_r(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):Or(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):kr(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Er(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):Fr(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):Rr(e),this.eachYearOfInterval=e=>{let t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):Hr(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;let r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):Gi(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):Wr(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):Ir(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):Ur(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):Br(e),this.format=(e,t,n)=>{let r=this.overrides?.format?this.overrides.format(e,t,this.options):Ai(e,t,this.options);return this.options.numerals&&this.options.numerals!==`latn`?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):ai(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):Ni(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):Pi(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):ci(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):Fi(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):Ii(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Nr(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):Mr(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):Li(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):Ri(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):Ar(e),this.min=e=>this.overrides?.min?this.overrides.min(e):jr(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):zi(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):Bi(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):Wi(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Tr(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):xr(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):zr(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):br(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Vr(e),this.options={locale:Ki,...e},this.overrides=t}getDigitMap(){let{numerals:e=`latn`}=this.options,t=new Intl.NumberFormat(`en-US`,{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){let t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){let t=this.options.locale?.code;return t&&e.yearFirstLocales.has(t)?`year-first`:`month-first`}formatMonthYear(t){let{locale:n,timeZone:r,numerals:i}=this.options,a=n?.code;if(a&&e.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:`long`,year:`numeric`,timeZone:r,numberingSystem:i}).format(t)}catch{}let o=this.getMonthYearOrder()===`year-first`?`y LLLL`:`LLLL y`;return this.format(t,o)}};qi.yearFirstLocales=new Set([`eu`,`hu`,`ja`,`ja-Hira`,`ja-JP`,`ko`,`ko-KR`,`lt`,`lt-LT`,`lv`,`lv-LV`,`mn`,`mn-MN`,`zh`,`zh-CN`,`zh-HK`,`zh-TW`]);var Ji=new qi,Yi=class{constructor(e,t,n=Ji){this.date=e,this.displayMonth=t,this.outside=!!(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,`yyyy-MM-dd`),this.displayMonthId=n.format(t,`yyyy-MM`),this.dateMonthId=n.format(e,`yyyy-MM`)}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}},Xi=class{constructor(e,t){this.date=e,this.weeks=t}},Zi=class{constructor(e,t){this.days=t,this.weekNumber=e}};function Qi(e){return J.createElement(`span`,{...e})}function $i(e){let{size:t=24,orientation:n=`left`,className:r,style:i}=e;return J.createElement(`svg`,{className:r,style:i,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&J.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&J.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&J.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&J.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}function ea(e){let{day:t,modifiers:n,...r}=e;return J.createElement(`td`,{...r})}function ta(e){let{day:t,modifiers:n,...r}=e,i=J.useRef(null);return J.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),J.createElement(`button`,{ref:i,...r})}var Q;(function(e){e.Root=`root`,e.Chevron=`chevron`,e.Day=`day`,e.DayButton=`day_button`,e.CaptionLabel=`caption_label`,e.Dropdowns=`dropdowns`,e.Dropdown=`dropdown`,e.DropdownRoot=`dropdown_root`,e.Footer=`footer`,e.MonthGrid=`month_grid`,e.MonthCaption=`month_caption`,e.MonthsDropdown=`months_dropdown`,e.Month=`month`,e.Months=`months`,e.Nav=`nav`,e.NextMonthButton=`button_next`,e.PreviousMonthButton=`button_previous`,e.Week=`week`,e.Weeks=`weeks`,e.Weekday=`weekday`,e.Weekdays=`weekdays`,e.WeekNumber=`week_number`,e.WeekNumberHeader=`week_number_header`,e.YearsDropdown=`years_dropdown`})(Q||={});var $;(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})($||={});var na;(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(na||={});var ra;(function(e){e.weeks_before_enter=`weeks_before_enter`,e.weeks_before_exit=`weeks_before_exit`,e.weeks_after_enter=`weeks_after_enter`,e.weeks_after_exit=`weeks_after_exit`,e.caption_after_enter=`caption_after_enter`,e.caption_after_exit=`caption_after_exit`,e.caption_before_enter=`caption_before_enter`,e.caption_before_exit=`caption_before_exit`})(ra||={});var ia=(0,J.createContext)(void 0);function aa(){let e=(0,J.useContext)(ia);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}function oa(e){let{options:t,className:n,...r}=e,{classNames:i,components:a,styles:o}=aa(),s=[i[Q.Dropdown],n].join(` `),c=t?.find(({value:e})=>e===r.value);return J.createElement(`span`,{"data-disabled":r.disabled,className:i[Q.DropdownRoot],style:o?.[Q.DropdownRoot]},J.createElement(a.Select,{className:s,...r},t?.map(({value:e,label:t,disabled:n})=>J.createElement(a.Option,{key:e,value:e,disabled:n},t))),J.createElement(`span`,{className:i[Q.CaptionLabel],style:o?.[Q.CaptionLabel],"aria-hidden":!0},c?.label,J.createElement(a.Chevron,{orientation:`down`,size:18,className:i[Q.Chevron],style:o?.[Q.Chevron]})))}function sa(e){return J.createElement(`div`,{...e})}function ca(e){return J.createElement(`div`,{...e})}function la(e){let{calendarMonth:t,displayIndex:n,...r}=e;return J.createElement(`div`,{...r},e.children)}function ua(e){let{calendarMonth:t,displayIndex:n,...r}=e;return J.createElement(`div`,{...r})}function da(e){return J.createElement(`table`,{...e})}function fa(e){return J.createElement(`div`,{...e})}function pa(e){let{components:t}=aa();return J.createElement(t.Dropdown,{...e})}function ma(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,styles:c,labels:{labelPrevious:l,labelNext:u}}=aa(),d=(0,J.useCallback)(e=>{i&&n?.(e)},[i,n]),f=(0,J.useCallback)(e=>{r&&t?.(e)},[r,t]);return J.createElement(`nav`,{...a},J.createElement(o.PreviousMonthButton,{type:`button`,className:s[Q.PreviousMonthButton],style:c?.[Q.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:f},J.createElement(o.Chevron,{disabled:!r||void 0,className:s[Q.Chevron],style:c?.[Q.Chevron],orientation:`left`})),J.createElement(o.NextMonthButton,{type:`button`,className:s[Q.NextMonthButton],style:c?.[Q.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":u(i),onClick:d},J.createElement(o.Chevron,{disabled:!i||void 0,orientation:`right`,className:s[Q.Chevron],style:c?.[Q.Chevron]})))}function ha(e){return J.createElement(`button`,{...e})}function ga(e){return J.createElement(`option`,{...e})}function _a(e){return J.createElement(`button`,{...e})}function va(e){let{rootRef:t,...n}=e;return J.createElement(`div`,{...n,ref:t})}function ya(e){return J.createElement(`select`,{...e})}function ba(e){let{week:t,...n}=e;return J.createElement(`tr`,{...n})}function xa(e){return J.createElement(`th`,{...e})}function Sa(e){return J.createElement(`thead`,{"aria-hidden":!0},J.createElement(`tr`,{...e}))}function Ca(e){let{week:t,...n}=e;return J.createElement(`th`,{...n})}function wa(e){return J.createElement(`th`,{...e})}function Ta(e){return J.createElement(`tbody`,{...e})}function Ea(e){let{components:t}=aa();return J.createElement(t.Dropdown,{...e})}var Da=e({CaptionLabel:()=>Qi,Chevron:()=>$i,Day:()=>ea,DayButton:()=>ta,Dropdown:()=>oa,DropdownNav:()=>sa,Footer:()=>ca,Month:()=>la,MonthCaption:()=>ua,MonthGrid:()=>da,Months:()=>fa,MonthsDropdown:()=>pa,Nav:()=>ma,NextMonthButton:()=>ha,Option:()=>ga,PreviousMonthButton:()=>_a,Root:()=>va,Select:()=>ya,Week:()=>ba,WeekNumber:()=>Ca,WeekNumberHeader:()=>wa,Weekday:()=>xa,Weekdays:()=>Sa,Weeks:()=>Ta,YearsDropdown:()=>Ea});function Oa(e,t,n=!1,r=Ji){let{from:i,to:a}=e,{differenceInCalendarDays:o,isSameDay:s}=r;return i&&a?(o(a,i)<0&&([i,a]=[a,i]),o(t,i)>=+!!n&&o(a,t)>=+!!n):!n&&a?s(a,t):!n&&i?s(i,t):!1}function ka(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function Aa(e){return!!(e&&typeof e==`object`&&`from`in e)}function ja(e){return!!(e&&typeof e==`object`&&`after`in e)}function Ma(e){return!!(e&&typeof e==`object`&&`before`in e)}function Na(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function Pa(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Fa(e,t,n=Ji){let r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:o}=n;return r.some(t=>{if(typeof t==`boolean`)return t;if(n.isDate(t))return i(e,t);if(Pa(t,n))return t.some(t=>i(e,t));if(Aa(t))return Oa(t,e,!1,n);if(Na(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(ka(t)){let n=a(t.before,e),r=a(t.after,e),i=n>0,s=r<0;return o(t.before,t.after)?s&&i:i||s}return ja(t)?a(e,t.after)>0:Ma(t)?a(t.before,e)>0:typeof t==`function`&&t(e)})}function Ia(e,t,n,r,i){let{disabled:a,hidden:o,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=i.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=i,_=n&&p(n),v=r&&h(r),y={[$.focused]:[],[$.outside]:[],[$.disabled]:[],[$.hidden]:[],[$.today]:[]},b={};for(let t of e){let{date:e,displayMonth:n}=t,r=!!(n&&!f(e,n)),p=!!(_&&m(e,_)),h=!!(v&&g(e,v)),x=!!(a&&Fa(e,a,i)),S=!!(o&&Fa(e,o,i))||p||h||!l&&!c&&r||l&&c===!1&&r,C=d(e,u);r&&y.outside.push(t),x&&y.disabled.push(t),S&&y.hidden.push(t),C&&y.today.push(t),s&&Object.keys(s).forEach(n=>{let r=s?.[n];r&&Fa(e,r,i)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{let t={[$.focused]:!1,[$.disabled]:!1,[$.hidden]:!1,[$.outside]:!1,[$.today]:!1},n={};for(let n in y)t[n]=y[n].some(t=>t===e);for(let t in b)n[t]=b[t].some(t=>t===e);return{...t,...n}}}function La(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[$[r]]?e.push(t[$[r]]):t[na[r]]&&e.push(t[na[r]]),e),[t[Q.Day]])}function Ra(e){return{...Da,...e}}function za(e){let t={"data-mode":e.mode??void 0,"data-required":`required`in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith(`data-`)&&(t[e]=n)}),t}function Ba(){let e={};for(let t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(let t in $)e[$[t]]=`rdp-${$[t]}`;for(let t in na)e[na[t]]=`rdp-${na[t]}`;for(let t in ra)e[ra[t]]=`rdp-${ra[t]}`;return e}function Va(e,t,n){return(n??new qi(t)).formatMonthYear(e)}function Ha(e,t,n){return(n??new qi(t)).format(e,`d`)}function Ua(e,t=Ji){return t.format(e,`LLLL`)}function Wa(e,t,n){return(n??new qi(t)).format(e,`cccccc`)}function Ga(e,t=Ji){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Ka(){return``}function qa(e,t=Ji){return t.format(e,`yyyy`)}var Ja=e({formatCaption:()=>Va,formatDay:()=>Ha,formatMonthDropdown:()=>Ua,formatWeekNumber:()=>Ga,formatWeekNumberHeader:()=>Ka,formatWeekdayName:()=>Wa,formatYearDropdown:()=>qa});function Ya(e){return{...Ja,...e}}function Xa(e,t,n,r){let i=(r??new qi(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}function Za(e,t,n){return(n??new qi(t)).formatMonthYear(e)}function Qa(e,t,n,r){let i=(r??new qi(n)).format(e,`PPPP`);return t?.today&&(i=`Today, ${i}`),i}function $a(e){return`Choose the Month`}function eo(){return``}var to=`Go to the Next Month`;function no(e,t){return to}function ro(e){return`Go to the Previous Month`}function io(e,t,n){return(n??new qi(t)).format(e,`cccc`)}function ao(e,t){return`Week ${e}`}function oo(e){return`Week Number`}function so(e){return`Choose the Year`}var co=e({labelDayButton:()=>Xa,labelGrid:()=>Za,labelGridcell:()=>Qa,labelMonthDropdown:()=>$a,labelNav:()=>eo,labelNext:()=>no,labelPrevious:()=>ro,labelWeekNumber:()=>ao,labelWeekNumberHeader:()=>oo,labelWeekday:()=>io,labelYearDropdown:()=>so}),lo=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e);function uo(e,t){let n=t.locale?.labels??{};return{...co,...e??{},labelDayButton:lo(Xa,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:lo($a,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:lo(no,e?.labelNext,n.labelNext),labelPrevious:lo(ro,e?.labelPrevious,n.labelPrevious),labelWeekNumber:lo(ao,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:lo(so,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:lo(Za,e?.labelGrid,n.labelGrid),labelGridcell:lo(Qa,e?.labelGridcell,n.labelGridcell),labelNav:lo(eo,e?.labelNav,n.labelNav),labelWeekNumberHeader:lo(oo,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:lo(io,e?.labelWeekday,n.labelWeekday)}}function fo(e,t,n,r,i){let{startOfMonth:a,startOfYear:o,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=i;return c({start:o(e),end:s(e)}).map(e=>{let o=r.formatMonthDropdown(e,i);return{value:l(e),label:o,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function po(e,t={},n={}){let r={...t?.[Q.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n?.[e]}}),r}function mo(e,t,n,r){let i=r??e.today(),a=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),o=[];for(let t=0;t<7;t++){let n=e.addDays(a,t);o.push(n)}return o}function ho(e,t,n,r,i=!1){if(!e||!t)return;let{startOfYear:a,endOfYear:o,eachYearOfInterval:s,getYear:c}=r,l=s({start:a(e),end:o(t)});return i&&l.reverse(),l.map(e=>{let t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}function go(e,t={}){let{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,a=t=>{let n=typeof t==`number`||typeof t==`string`?new Date(t):t;return new lr(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},o=e=>{let t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(lr.tz(e)),newDate:(t,n,r)=>new lr(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{let n=a(e),r=t?.weekStartsOn??i,o=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-o),n},startOfISOWeek:e=>{let t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{let t=a(e);return t.setDate(1),t},startOfYear:e=>{let t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{let n=a(e),r=(((t?.weekStartsOn??i)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{let t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{let t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{let t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new lr(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=r.getFullYear()*12+r.getMonth();for(;o.getFullYear()*12+o.getMonth()<=s;)i.push(new lr(o,e)),o.setMonth(o.getMonth()+1,1);return i},addDays:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t*7),n},addMonths:(e,t)=>{let n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{let n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new lr(n.getFullYear(),0,1,12,0,0,e);for(;o.getFullYear()<=r.getFullYear();)i.push(new lr(o,e)),o.setFullYear(o.getFullYear()+1,0,1);return i},getWeek:(e,t)=>ci(o(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>ai(o(e)),differenceInCalendarDays:(e,t)=>Er(o(e),o(t)),differenceInCalendarMonths:(e,t)=>Fr(o(e),o(t))}}var _o=e=>e instanceof HTMLElement?e:null,vo=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],yo=e=>_o(e.querySelector(`[data-animated-month]`)),bo=e=>_o(e.querySelector(`[data-animated-caption]`)),xo=e=>_o(e.querySelector(`[data-animated-weeks]`)),So=e=>_o(e.querySelector(`[data-animated-nav]`)),Co=e=>_o(e.querySelector(`[data-animated-weekdays]`));function wo(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,J.useRef)(null),s=(0,J.useRef)(r),c=(0,J.useRef)(!1);(0,J.useLayoutEffect)(()=>{let l=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;let u=a.isSameMonth(r[0].date,l[0].date),d=a.isAfter(r[0].date,l[0].date),f=d?n[ra.caption_after_enter]:n[ra.caption_before_enter],p=d?n[ra.weeks_after_enter]:n[ra.weeks_before_enter],m=o.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(vo(h).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=yo(e);t&&e.contains(t)&&e.removeChild(t);let n=bo(e);n&&n.classList.remove(f);let r=xo(e);r&&r.classList.remove(p)}),o.current=h):o.current=null,c.current||u||i)return;let g=m instanceof HTMLElement?vo(m):[],_=vo(e.current);if(_?.every(e=>e instanceof HTMLElement)&&g?.every(e=>e instanceof HTMLElement)){c.current=!0;let t=[];e.current.style.isolation=`isolate`;let r=So(e.current);r&&(r.style.zIndex=`1`),_.forEach((i,a)=>{let o=g[a];if(!o)return;i.style.position=`relative`,i.style.overflow=`hidden`;let s=bo(i);s&&s.classList.add(f);let l=xo(i);l&&l.classList.add(p);let u=()=>{c.current=!1,e.current&&(e.current.style.isolation=``),r&&(r.style.zIndex=``),s&&s.classList.remove(f),l&&l.classList.remove(p),i.style.position=``,i.style.overflow=``,i.contains(o)&&i.removeChild(o)};t.push(u),o.style.pointerEvents=`none`,o.style.position=`absolute`,o.style.overflow=`hidden`,o.setAttribute(`aria-hidden`,`true`);let m=Co(o);m&&(m.style.opacity=`0`);let h=bo(o);h&&(h.classList.add(d?n[ra.caption_before_exit]:n[ra.caption_after_exit]),h.addEventListener(`animationend`,u));let _=xo(o);_&&_.classList.add(d?n[ra.weeks_before_exit]:n[ra.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}function To(e,t,n,r){let i=e[0],a=e[e.length-1],{ISOWeek:o,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:_,startOfISOWeek:v,startOfWeek:y}=r,b=c?_(i,r):o?v(i):y(i),x=c?f(a):o?p(m(a)):h(m(a)),S=t&&(c?f(t):o?p(t):h(t)),C=u(S&&g(x,S)?S:x,b),w=d(a,i)+1,T=[];for(let e=0;e<=C;e++){let t=l(b,e);T.push(t)}let E=(c?35:42)*w;if(s&&T.length<E){let e=E-T.length;for(let t=0;t<e;t++){let e=l(T[T.length-1],1);T.push(e)}}return T}function Eo(e){let t=[];return e.reduce((e,n)=>{let r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}function Do(e,t,n,r){let{numberOfMonths:i=1}=n,a=[];for(let n=0;n<i;n++){let i=r.addMonths(e,n);if(t&&i>t)break;a.push(i)}return a}function Oo(e,t,n,r){let{month:i,defaultMonth:a,today:o=r.today(),numberOfMonths:s=1}=e,c=i||a||o,{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}function ko(e,t,n,r){let{addDays:i,endOfBroadcastWeek:a,endOfISOWeek:o,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{let h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?o(s(m)):c(s(m)),_=t.filter(e=>e>=h&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&_.length<v){let e=t.filter(e=>{let t=v-_.length;return e>g&&e<=i(g,t)});_.push(...e)}let y=new Xi(m,_.reduce((e,t)=>{let i=n.ISOWeek?l(t):u(t),a=e.find(e=>e.weekNumber===i),o=new Yi(t,m,r);return a?a.days.push(o):e.push(new Zi(i,[o])),e},[]));return e.push(y),e},[]);return n.reverseMonths?m.reverse():m}function Ao(e,t){let{startMonth:n,endMonth:r}=e,{startOfYear:i,startOfDay:a,startOfMonth:o,endOfMonth:s,addYears:c,endOfYear:l,today:u}=t,d=e.captionLayout===`dropdown`||e.captionLayout===`dropdown-years`;return n?n=o(n):!n&&d&&(n=i(c(e.today??u(),-100))),r?r=s(r):!r&&d&&(r=l(e.today??u())),[n&&a(n),r&&a(r)]}function jo(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a=1}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a:1,u=o(e);if(!t||!(c(t,e)<a))return s(u,l)}function Mo(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a??1:1,u=o(e);if(!t||!(c(u,t)<=0))return s(u,-l)}function No(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}function Po(e,t){let[n,r]=(0,J.useState)(e);return[t===void 0?n:t,r]}function Fo(e,t){let[n,r]=Ao(e,t),{startOfMonth:i,endOfMonth:a}=t,o=Oo(e,n,r,t),[s,c]=Po(o,e.month?o:void 0);(0,J.useEffect)(()=>{let i=Oo(e,n,r,t);c(i)},[e.timeZone]);let{months:l,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,J.useMemo)(()=>{let i=Do(s,r,{numberOfMonths:e.numberOfMonths},t),o=ko(i,To(i,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t);return{months:o,weeks:No(o),days:Eo(o),previousMonth:Mo(s,n,e,t),nextMonth:jo(s,r,e,t)}},[t,s.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:h}=e,g=e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))),_=e=>{if(m)return;let t=i(e);n&&t<i(n)&&(t=i(n)),r&&t>i(r)&&(t=i(r)),c(t),h?.(t)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:_,goToDay:e=>{g(e)||_(e.date)}}}var Io;(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(Io||={});function Lo(e){return!e[$.disabled]&&!e[$.hidden]&&!e[$.outside]}function Ro(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);Lo(e)&&(e[$.focused]&&a<Io.FocusedModifier?(i=o,a=Io.FocusedModifier):r?.isEqualTo(o)&&a<Io.LastFocused?(i=o,a=Io.LastFocused):n(o.date)&&a<Io.Selected?(i=o,a=Io.Selected):e[$.today]&&a<Io.Today&&(i=o,a=Io.Today))}return i||=e.find(e=>Lo(t(e))),i}function zo(e,t,n,r,i,a,o){let{ISOWeek:s,broadcastCalendar:c}=a,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:_,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=o,x={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,o):s?y(e):b(e),endOfWeek:e=>c?p(e):s?m(e):h(e)}[e](n,t===`after`?1:-1);return t===`before`&&r?x=g([r,x]):t===`after`&&i&&(x=_([i,x])),x}function Bo(e,t,n,r,i,a,o,s=0){if(s>365)return;let c=zo(e,t,n.date,r,i,a,o),l=!!(a.disabled&&Fa(c,a.disabled,o)),u=!!(a.hidden&&Fa(c,a.hidden,o)),d=new Yi(c,c,o);return!l&&!u?d:Bo(e,t,d,r,i,a,o,s+1)}function Vo(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,J.useState)(),c=Ro(t.days,n,r||(()=>!1),o),[l,u]=(0,J.useState)(a?c:void 0);return{isFocusTarget:e=>!!c?.isEqualTo(e),setFocused:u,focused:l,blur:()=>{s(l),u(void 0)},moveFocus:(n,r)=>{if(!l)return;let a=Bo(n,r,l,t.navStart,t.navEnd,e,i);a&&(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(a))||(t.goToDay(a),u(a)))}}}function Ho(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Po(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(l(e)){if(s?.length===u||r&&s?.length===1)return;a=s?.filter(t=>!c(t,e))}else a=s?.length===d?[e]:[...a,e];return i||o(a),i?.(a,e,t,n),a},isSelected:l}}function Uo(e,t,n=0,r=0,i=!1,a=Ji){let{from:o,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=a,d;if(!o&&!s)d={from:e,to:n>0?void 0:e};else if(o&&!s)d=c(o,e)?n===0?{from:o,to:e}:i?{from:o,to:void 0}:void 0:u(e,o)?{from:e,to:o}:{from:o,to:e};else if(o&&s)if(c(o,e)&&c(s,e))d=i?{from:o,to:s}:void 0;else if(c(o,e))d={from:o,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,o))d={from:e,to:s};else if(l(e,o))d={from:o,to:e};else if(l(e,s))d={from:o,to:e};else throw Error(`Invalid range`);if(d?.from&&d?.to){let t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function Wo(e,t,n=Ji){let r=Array.isArray(t)?t:[t],i=e.from,a=n.differenceInCalendarDays(e.to,e.from),o=Math.min(a,6);for(let e=0;e<=o;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function Go(e,t,n=Ji){return Oa(e,t.from,!1,n)||Oa(e,t.to,!1,n)||Oa(t,e.from,!1,n)||Oa(t,e.to,!1,n)}function Ko(e,t,n=Ji){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?Oa(e,t,!1,n):Pa(t,n)?t.some(t=>Oa(e,t,!1,n)):Aa(t)?t.from&&t.to?Go(e,{from:t.from,to:t.to},n):!1:Na(t)?Wo(e,t.dayOfWeek,n):ka(t)?n.isAfter(t.before,t.after)?Go(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Fa(e.from,t,n)||Fa(e.to,t,n):ja(t)||Ma(t)?Fa(e.from,t,n)||Fa(e.to,t,n):!1))return!0;let i=r.filter(e=>typeof e==`function`);if(i.length){let t=e.from,r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function qo(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[c,l]=Po(a,s?a:void 0),u=s?a:c;return{selected:u,select:(a,c,d)=>{let{min:f,max:p}=e,m;if(a){let e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=i&&(r||!u?.from)?!o&&s?void 0:{from:a,to:void 0}:Uo(a,u,f,p,o,t)}return r&&n&&m?.from&&m.to&&Ko({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),s||l(m),s?.(m,a,c,d),m},isSelected:e=>u&&Oa(u,e,!1,t)}}function Jo(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Po(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&c(e,s)&&(a=void 0),i||o(a),i?.(a,e,t,n),a},isSelected:e=>s?c(s,e):!1}}function Yo(e,t){let n=Jo(e,t),r=Ho(e,t),i=qo(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}function Xo(e,t){return e instanceof lr&&e.timeZone===t?e:new lr(e,t)}function Zo(e,t,n){if(!n)return Xo(e,t);let r=Xo(e,t),i=new lr(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function Qo(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?Zo(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?Zo(e,t,n):e):Aa(e)?{...e,from:e.from?Xo(e.from,t):e.from,to:e.to?Xo(e.to,t):e.to}:ka(e)?{before:Zo(e.before,t,n),after:Zo(e.after,t,n)}:ja(e)?{after:Zo(e.after,t,n)}:Ma(e)?{before:Zo(e.before,t,n)}:e}function $o(e,t,n){return e&&(Array.isArray(e)?e.map(e=>Qo(e,t,n)):Qo(e,t,n))}function es(e){let t=e,n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Xo(t.today,n)),t.month&&(t.month=Xo(t.month,n)),t.defaultMonth&&(t.defaultMonth=Xo(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Xo(t.startMonth,n)),t.endMonth&&(t.endMonth=Xo(t.endMonth,n)),t.mode===`single`&&t.selected?t.selected=Xo(t.selected,n):t.mode===`multiple`&&t.selected?t.selected=t.selected?.map(e=>Xo(e,n)):t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?Xo(t.selected.from,n):t.selected.from,to:t.selected.to?Xo(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=$o(t.disabled,n)),t.hidden!==void 0&&(t.hidden=$o(t.hidden,n)),t.modifiers)){let e={};Object.keys(t.modifiers).forEach(r=>{e[r]=$o(t.modifiers?.[r],n)}),t.modifiers=e}let{components:r,formatters:i,labels:a,dateLib:o,locale:s,classNames:c}=(0,J.useMemo)(()=>{let e={...Ki,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?go(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new qi({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:Ra(t.components),formatters:Ya(t.formatters),labels:uo(t.labels,a.options),locale:e,classNames:{...Ba(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});let{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:_,onDayMouseLeave:v,onNextClick:y,onPrevClick:b,showWeekNumber:x,styles:S}=t,{formatCaption:C,formatDay:w,formatMonthDropdown:T,formatWeekNumber:E,formatWeekNumberHeader:D,formatWeekdayName:O,formatYearDropdown:k}=i,A=Fo(t,o),{days:j,months:M,navStart:N,navEnd:P,previousMonth:F,nextMonth:I,goToMonth:ee}=A,te=Ia(j,t,N,P,o),{isSelected:ne,select:L,selected:R}=Yo(t,o)??{},{blur:re,focused:ie,isFocusTarget:z,moveFocus:ae,setFocused:B}=Vo(t,A,te,ne??(()=>!1),o),{labelDayButton:V,labelGridcell:H,labelGrid:U,labelMonthDropdown:W,labelNav:oe,labelPrevious:se,labelNext:ce,labelWeekday:G,labelWeekNumber:le,labelWeekNumberHeader:ue,labelYearDropdown:de}=a,fe=(0,J.useMemo)(()=>mo(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),pe=u!==void 0||m!==void 0,me=(0,J.useCallback)(()=>{F&&(ee(F),b?.(F))},[F,ee,b]),he=(0,J.useCallback)(()=>{I&&(ee(I),y?.(I))},[ee,I,y]),ge=(0,J.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),B(e),!t.disabled&&(L?.(e.date,t,n),m?.(e.date,t,n))},[L,m,B]),_e=(0,J.useCallback)((e,t)=>n=>{B(e),h?.(e.date,t,n)},[h,B]),ve=(0,J.useCallback)((e,t)=>n=>{re(),p?.(e.date,t,n)},[re,p]),ye=(0,J.useCallback)((e,n)=>r=>{let i={ArrowLeft:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`after`:`before`],ArrowRight:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`before`:`after`],ArrowDown:[r.shiftKey?`year`:`week`,`after`],ArrowUp:[r.shiftKey?`year`:`week`,`before`],PageUp:[r.shiftKey?`year`:`month`,`before`],PageDown:[r.shiftKey?`year`:`month`,`after`],Home:[`startOfWeek`,`before`],End:[`endOfWeek`,`after`]};if(i[r.key]){r.preventDefault(),r.stopPropagation();let[e,t]=i[r.key];ae(e,t)}g?.(e.date,n,r)},[ae,g,t.dir]),be=(0,J.useCallback)((e,t)=>n=>{_?.(e.date,t,n)},[_]),xe=(0,J.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),Se=(0,J.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setMonth(o.startOfMonth(e),r);ee(o.addMonths(i,-t))},[o,ee]),Ce=(0,J.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setYear(o.startOfMonth(e),r);ee(o.addMonths(i,-t))},[o,ee]),{className:we,style:Te}=(0,J.useMemo)(()=>({className:[c[Q.Root],t.className].filter(Boolean).join(` `),style:{...S?.[Q.Root],...t.style}}),[c,t.className,t.style,S]),Ee=za(t),K=e=>{let t=S?.[Q.Dropdown],n=S?.[e];if(!(!t&&!n))return{...t,...n}},De=(0,J.useRef)(null);wo(De,!!t.animate,{classNames:c,months:M,focused:ie,dateLib:o});let Oe={dayPickerProps:t,selected:R,select:L,isSelected:ne,months:M,nextMonth:I,previousMonth:F,goToMonth:ee,getModifiers:te,components:r,classNames:c,styles:S,labels:a,formatters:i};return J.createElement(ia.Provider,{value:Oe},J.createElement(r.Root,{rootRef:t.animate?De:void 0,className:we,style:Te,dir:t.dir,id:t.id,lang:t.lang??s.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t[`aria-label`],"aria-labelledby":t[`aria-labelledby`],...Ee},J.createElement(r.Months,{className:c[Q.Months],style:S?.[Q.Months]},!t.hideNavigation&&!d&&J.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[Q.Nav],style:S?.[Q.Nav],"aria-label":oe(),onPreviousClick:me,onNextClick:he,previousMonth:F,nextMonth:I}),M.map((e,n)=>{let a=t.reverseMonths?M.length-1-n:n;return J.createElement(r.Month,{"data-animated-month":t.animate?`true`:void 0,className:c[Q.Month],style:S?.[Q.Month],key:n,displayIndex:n,calendarMonth:e},d===`around`&&!t.hideNavigation&&n===0&&J.createElement(r.PreviousMonthButton,{type:`button`,className:c[Q.PreviousMonthButton],style:S?.[Q.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":!F||void 0,"aria-label":se(F),onClick:me,"data-animated-button":t.animate?`true`:void 0},J.createElement(r.Chevron,{disabled:!F||void 0,className:c[Q.Chevron],style:S?.[Q.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),J.createElement(r.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:c[Q.MonthCaption],style:S?.[Q.MonthCaption],calendarMonth:e,displayIndex:n},l?.startsWith(`dropdown`)?J.createElement(r.DropdownNav,{className:c[Q.Dropdowns],style:S?.[Q.Dropdowns]},(()=>{let n=l===`dropdown`||l===`dropdown-months`?J.createElement(r.MonthsDropdown,{key:`month`,className:c[Q.MonthsDropdown],"aria-label":W(),disabled:!!t.disableNavigation,onChange:Se(e.date,a),options:fo(e.date,N,P,i,o),style:K(Q.MonthsDropdown),value:o.getMonth(e.date)}):J.createElement(`span`,{key:`month`},T(e.date,o)),s=l===`dropdown`||l===`dropdown-years`?J.createElement(r.YearsDropdown,{key:`year`,className:c[Q.YearsDropdown],"aria-label":de(o.options),disabled:!!t.disableNavigation,onChange:Ce(e.date,a),options:ho(N,P,i,o,!!t.reverseYears),style:K(Q.YearsDropdown),value:o.getYear(e.date)}):J.createElement(`span`,{key:`year`},k(e.date,o));return o.getMonthYearOrder()===`year-first`?[s,n]:[n,s]})(),J.createElement(`span`,{role:`status`,"aria-live":`polite`,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}},C(e.date,o.options,o))):J.createElement(r.CaptionLabel,{className:c[Q.CaptionLabel],style:S?.[Q.CaptionLabel],role:`status`,"aria-live":`polite`},C(e.date,o.options,o))),d===`around`&&!t.hideNavigation&&n===f-1&&J.createElement(r.NextMonthButton,{type:`button`,className:c[Q.NextMonthButton],style:S?.[Q.NextMonthButton],tabIndex:I?void 0:-1,"aria-disabled":!I||void 0,"aria-label":ce(I),onClick:he,"data-animated-button":t.animate?`true`:void 0},J.createElement(r.Chevron,{disabled:!I||void 0,className:c[Q.Chevron],style:S?.[Q.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===f-1&&d===`after`&&!t.hideNavigation&&J.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[Q.Nav],style:S?.[Q.Nav],"aria-label":oe(),onPreviousClick:me,onNextClick:he,previousMonth:F,nextMonth:I}),J.createElement(r.MonthGrid,{role:`grid`,"aria-multiselectable":u===`multiple`||u===`range`,"aria-label":U(e.date,o.options,o)||void 0,className:c[Q.MonthGrid],style:S?.[Q.MonthGrid]},!t.hideWeekdays&&J.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:c[Q.Weekdays],style:S?.[Q.Weekdays]},x&&J.createElement(r.WeekNumberHeader,{"aria-label":ue(o.options),className:c[Q.WeekNumberHeader],style:S?.[Q.WeekNumberHeader],scope:`col`},D()),fe.map(e=>J.createElement(r.Weekday,{"aria-label":G(e,o.options,o),className:c[Q.Weekday],key:String(e),style:S?.[Q.Weekday],scope:`col`},O(e,o.options,o)))),J.createElement(r.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:c[Q.Weeks],style:S?.[Q.Weeks]},e.weeks.map(e=>J.createElement(r.Week,{className:c[Q.Week],key:e.weekNumber,style:S?.[Q.Week],week:e},x&&J.createElement(r.WeekNumber,{week:e,style:S?.[Q.WeekNumber],"aria-label":le(e.weekNumber,{locale:s}),className:c[Q.WeekNumber],scope:`row`,role:`rowheader`},E(e.weekNumber,o)),e.days.map(e=>{let{date:n}=e,i=te(e);if(i[$.focused]=!i.hidden&&!!ie?.isEqualTo(e),i[na.selected]=ne?.(n)||i.selected,Aa(R)){let{from:e,to:t}=R;i[na.range_start]=!!(e&&t&&o.isSameDay(n,e)),i[na.range_end]=!!(e&&t&&o.isSameDay(n,t)),i[na.range_middle]=Oa(R,n,!0,o)}let a=po(i,S,t.modifiersStyles),s=La(i,c,t.modifiersClassNames),l=!pe&&!i.hidden?H(n,i,o.options,o):void 0;return J.createElement(r.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:i,className:s.join(` `),style:a,role:`gridcell`,"aria-selected":i.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":i.selected||void 0,"data-disabled":i.disabled||void 0,"data-hidden":i.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":i.focused||void 0,"data-today":i.today||void 0},!i.hidden&&pe?J.createElement(r.DayButton,{className:c[Q.DayButton],style:S?.[Q.DayButton],type:`button`,day:e,modifiers:i,disabled:!i.focused&&i.disabled||void 0,"aria-disabled":i.focused&&i.disabled||void 0,tabIndex:z(e)?0:-1,"aria-label":V(n,i,o.options,o),onClick:ge(e,i),onBlur:ve(e,i),onFocus:_e(e,i),onKeyDown:ye(e,i),onMouseEnter:be(e,i),onMouseLeave:xe(e,i)},w(n,o.options,o)):!i.hidden&&w(e.date,o.options,o))}))))))})),t.footer&&J.createElement(r.Footer,{className:c[Q.Footer],style:S?.[Q.Footer],role:`status`,"aria-live":`polite`},t.footer)))}var ts=`relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,ns={Chevron:({className:e,orientation:t,...n})=>t===`left`?(0,q.jsx)(Ge,{className:K(e,`rtl:rotate-180`),...n,"aria-hidden":`true`}):t===`right`?(0,q.jsx)(Ke,{className:K(e,`rtl:rotate-180`),...n,"aria-hidden":`true`}):(0,q.jsx)(vt,{className:e,...n,"aria-hidden":`true`})};function rs(e){let t=(0,Rt.c)(23),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,classNames:r,showOutsideDays:a,components:s,mode:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0||a,l=o===void 0?`single`:o,u;if(t[7]!==r){let e={button_next:ts,button_previous:ts,caption_label:`text-base sm:text-sm font-medium flex items-center gap-2 h-full`,day:`size-(--cell-size) text-sm py-px`,day_button:K(ts,`in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50`),dropdown:`absolute bg-popover inset-0 opacity-0`,dropdown_root:`relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1`,dropdowns:`w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium`,hidden:`invisible`,month:`w-full`,month_caption:`relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2`,months:`relative flex flex-col sm:flex-row gap-2`,nav:`absolute top-0 flex w-full justify-between z-1`,outside:`text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground`,range_end:`range-end`,range_middle:`range-middle`,range_start:`range-start`,today:`*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30`,week_number:`size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72`,weekday:`size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72`};u=Object.keys(e).reduce((t,n)=>{let i=r?.[n],a=e[n];return t[n]=i?K(a,i):a,t},{...e}),t[7]=r,t[8]=u}else u=t[8];let d=u,f;t[9]===s?f=t[10]:(f={...ns,...s},t[9]=s,t[10]=f);let p=f,m;t[11]===n?m=t[12]:(m=K(`w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]`,n),t[11]=n,t[12]=m);let h;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(h={formatMonthDropdown:is},t[13]=h):h=t[13];let g;t[14]!==d||t[15]!==p||t[16]!==l||t[17]!==i||t[18]!==c||t[19]!==m?(g={className:m,classNames:d,components:p,"data-slot":`calendar`,formatters:h,mode:l,showOutsideDays:c,...i},t[14]=d,t[15]=p,t[16]=l,t[17]=i,t[18]=c,t[19]=m,t[20]=g):g=t[20];let _=g,v;return t[21]===_?v=t[22]:(v=(0,q.jsx)(es,{..._}),t[21]=_,t[22]=v),v}function is(e){return e.toLocaleString(`default`,{month:`short`})}var as=J.createContext(void 0);function os(){let e=J.useContext(as);if(e===void 0)throw Error(z(43));return e}var ss={inputValue:()=>null,value:()=>null,...tt},cs=new Map;function ls(e,t){let n=JSON.stringify({locale:Ft(e),options:t}),r=cs.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return cs.set(n,i),i}function us(e,t,n){return e==null?``:ls(t,n).format(e)}var ds=`零〇一二三四五六七八九`,fs=/[٠-٩۰-۹0-9]/g,ps=/[零〇一二三四五六七八九]/g,ms=[`%`,`٪`,`%`,`﹪`],hs=[`‰`,`؉`],gs=/[%٪%﹪]/,_s=/[‰؉]/,vs=/[%٪%﹪]/g,ys=/[‰؉]/g,bs=/[٠-٩۰-۹]/,xs=/[零〇一二三四五六七八九]/,Ss=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function Cs(e){return Ss.test(e)}var ws=[`.`,`,`,`.`,`,`,`٫`,`٬`],Ts=/\p{Zs}/u,Es=/\p{Cf}/u,Ds=/\p{Cf}/gu,Os=[`+`,`+`,`﹢`],ks=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],As=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function js(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var Ms=/[-−-‒–—﹣]/gu,Ns=/[++﹢]/gu,Ps=/[-−-‒–—﹣]/,Fs=/[++﹢]/,Is=11111.1;function Ls(e,t){return ls(e,t).formatToParts(Is)}function Rs(e,t){let n=Ls(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return ls(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function zs(e,t,n){let r=e.replace(Ds,``).trim();r=r.replace(Ms,`-`).replace(Ns,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(bs.test(r)?o=`ar`:xs.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=Rs(o,n),d=ls(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>As(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(As(s),`g`));let m=[[p,``],[new RegExp(As(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(As(l),`g`):null,``],[f,``],[vs,``],[ys,``],[u?new RegExp(As(u),`g`):null,`e`],[fs,e=>String(e.charCodeAt(0)%16)],[ps,e=>String(Math.max(ds.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=gs.test(e)||v===`percent`;return _s.test(e)?_=js(_,-3):!y&&b&&(_=js(_,-2)),Number.isFinite(_)?_:null}var Bs=1e-10,Vs=1e-10;function Hs(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function Us(e,t){if(!Number.isFinite(e))return e;if(!Hs(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),Vs)?t:e}let n=ls(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=zs(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function Ws(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*Bs*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function Gs(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=Ws(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=je(l,n,r)),t==null&&!Hs(a))return l;let u=Us(l,a);return c?je(u,n,r):u}var Ks=J.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:p,value:h,onValueChange:g,onValueCommitted:_,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:w,render:E,className:D,inputRef:O,style:k,...A}=e,{setDirty:j,validityData:N,disabled:P,setFilled:I,name:te,state:ne,validation:re}=st(),{clearErrors:ie}=nt(),z=P||l,ae=te??f,B=o===`any`?1:o,[H,U]=J.useState(!1),W=r??-(2**53-1),oe=i??2**53-1,ce=r??0,G=S?.style,ue=J.useRef(null),de=xe(O,re.inputRef),fe=et({id:n}),[pe,me]=le({controlled:h,default:p,name:`NumberField`,state:`value`}),ge=pe??null,_e=m(ge);ye(()=>{I(ge!==null)},[I,ge]);let ve=bt(),be=m(S),Ce=J.useRef(!1),we=F((e,t)=>{Ce.current=!1,_?.(e,t)}),Te=J.useRef(!0),Ee=J.useRef(null),[K,De]=J.useState(()=>us(ge,w,S)),[Oe,ke]=J.useState(`numeric`),Ae=F(()=>{let e=Ls(w,S),t=new Set(ws),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??Rs(w,S).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),Ts.test(e.value)&&t.add(` `))});let i=G===`percent`||G===`unit`&&S?.unit===`percent`,a=G===`percent`||G===`unit`&&S?.unit===`permille`;return i&&n(ms),a&&n(hs),n(Os),(W<0||x)&&n(ks),t}),je=F(e=>e?.altKey?a:e?.shiftKey?s:B),Me=F((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!x||!i,o=Gs(e,r?je(n)*r:void 0,W,oe,ce,be.current,b,n?.altKey??!1,a),s=o!==ge||i&&(e!==ge||Te.current===!1);if(s){if(g?.(o,t),t.isCanceled)return!1;me(o),j(o!==N.initialValue),Ce.current=!0}return Ee.current=o,Te.current&&De(us(o,w,S)),ve(),s}),Ne=F((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??_e.current,o=r;return typeof a==`number`?Me(a+e*t,R(i,o,void 0,{direction:t})):Me(0,R(i,o))});ye(function(){if(!Te.current)return;let e=us(ge,w,S);e!==K&&De(e)}),ye(function(){if(!he)return;let e=`text`;W>=0&&(e=`decimal`),ke(e)},[W]),J.useEffect(function(){let e=ue.current;if(z||u||!y||!e)return;function t(e){if(e.ctrlKey||Se(C(ue.current))!==ue.current)return;e.preventDefault(),Te.current=!0;let t=je(e);Ne(t,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`})&&we(Ee.current,L(ee,e))}return M(e,`wheel`,t)},[y,Ne,z,u,je,we,Ee,_e]);let Pe=J.useMemo(()=>({...ne,disabled:z,readOnly:u,required:c,value:ge,inputValue:K,scrubbing:H}),[ne,z,u,c,ge,K,H]),Fe=J.useMemo(()=>({inputRef:ue,minWithDefault:W,maxWithDefault:oe,id:fe,setValue:Me,incrementValue:Ne,getStepAmount:je,allowInputSyncRef:Te,formatOptionsRef:be,valueRef:_e,lastChangedValueRef:Ee,hasPendingCommitRef:Ce,name:ae,nameProp:f,inputMode:Oe,getAllowedNonNumericKeys:Ae,min:r,max:i,setInputValue:De,locale:w,setIsScrubbing:U,state:Pe,onValueCommitted:we}),[ue,W,oe,fe,Me,Ne,je,be,_e,ae,f,Oe,Ae,r,i,De,w,Pe,we]),Ie=V(`div`,e,{ref:t,state:Pe,props:A,stateAttributesMapping:ss});return(0,q.jsxs)(as.Provider,{value:Fe,children:[Ie,(0,q.jsx)(`input`,{...re.getValidationProps(z,{onFocus(){ue.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||z||u)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=R(se,e.nativeEvent);Me(n,r),ie(ae),re.change(Ee.current??n)}}),ref:de,type:`number`,form:d,name:ae,value:ge??``,min:r,max:i,step:o,disabled:z,readOnly:u,required:c,"aria-hidden":!0,tabIndex:-1,style:ae?T:v,suppressHydrationWarning:!0})]})}),qs=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=os();return V(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:ss})}),Js=0,Ys=class e extends x{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Js&&(clearInterval(this.currentId),this.currentId=Js)}};function Xs(){let e=Te(Ys.create).current;return b(e.disposeEffect),e}var Zs=60,Qs=400,$s=8,ec=50,tc=3;function nc(e){return e===`touch`||e===`pen`}function rc(e){let{disabled:t,tick:n,onStop:r,tickDelay:i=Zs,startDelay:o=Qs,scrollDistance:s=$s,elementRef:c}=e,l=a(),u=Xs(),d=a(),f=J.useRef(!1),p=J.useRef(0),m=J.useRef({x:0,y:0}),h=J.useRef(!1),g=J.useRef(!1),_=J.useRef(``),v=J.useRef(U),y=J.useRef(U),b=F(()=>{d.clear(),l.clear(),u.clear(),v.current(),p.current=0});function x(e){b();let t=c.current;if(!t)return;let a=ne(t);function s(e){e.preventDefault()}if(v.current=M(a,`contextmenu`,s),y.current(),y.current=M(a,`pointerup`,e=>{f.current=!1,b(),r?.(e)},{once:!0}),!n(e)){b();return}l.start(o,()=>{u.start(i,()=>{n(e)||b()})})}return J.useEffect(()=>()=>{b(),y.current()},[b]),{pointerHandlers:{onTouchStart(){h.current=!0},onTouchEnd(){h.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(_.current=e.pointerType,g.current=!1,f.current=!0,m.current={x:e.clientX,y:e.clientY},nc(e.pointerType)?d.start(ec,()=>{let t=p.current;p.current=0,f.current&&t<tc?(x(e.nativeEvent),g.current=!0):(g.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){nc(e.pointerType)&&(f.current=!1)},onPointerMove(e){if(t||!nc(e.pointerType)||!f.current)return;p.current+=1;let{x:n,y:r}=m.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>s**2&&b()},onMouseEnter(e){e.defaultPrevented||t||!f.current||h.current||nc(_.current)||x(e.nativeEvent)},onMouseLeave(){h.current||b()},onMouseUp(){h.current||b()}},shouldSkipClick:F(e=>e.defaultPrevented?!0:nc(_.current)?g.current:e.detail!==0)}}var ic={WebkitUserSelect:`none`,userSelect:`none`};function ac(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,maxWithDefault:h,minWithDefault:g,setValue:_,state:v,valueRef:y,locale:b,lastChangedValueRef:x,onValueCommitted:S}=os(),{disabled:C,readOnly:w,value:T,inputValue:E}=v,D=a||C||T!=null&&(n?T>=h:T<=g),O=n?fe:ve;function k(e){let t=!l.current;if(l.current=!0,!t){x.current=y.current;return}let n=zs(E,b,u.current);if(n!==null){let t=R(O,e);_(n,t),t.isCanceled||(y.current=n)}}let{pointerHandlers:A,shouldSkipClick:j}=rc({disabled:D||w,elementRef:m,tick(e){let t=d(e);return p(t,{direction:n?1:-1,event:e,reason:O})},onStop(e){let t=x.current??y.current;S(t,L(O,e))}}),M={disabled:D,"aria-label":n?`Increase`:`Decrease`,"aria-controls":f,tabIndex:-1,style:ic,...A,onClick(e){let t=D||w;if(e.defaultPrevented||t||j(e))return;k(e.nativeEvent);let r=d(e),i=y.current;p(r,{direction:n?1:-1,event:e.nativeEvent,reason:O});let a=x.current??y.current;a!==i&&S(a,L(O,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||w||e.button||D||(k(e.nativeEvent),x.current=null,nc(e.pointerType)||m.current?.focus(),A.onPointerDown(e))}},{getButtonProps:N,buttonRef:P}=W({disabled:D||w,native:o,focusableWhenDisabled:!0}),F={...v,disabled:D};return V(`button`,e,{ref:[t,P],state:F,props:[M,c,N],stateAttributesMapping:ss})}var oc=J.forwardRef(function(e,t){return ac(e,t,!0)}),sc=J.forwardRef(function(e,t){return ac(e,t,!1)}),cc=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),lc=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:o,formatOptionsRef:s,getAllowedNonNumericKeys:c,getStepAmount:l,id:u,incrementValue:d,inputMode:f,max:p,min:m,name:h,nameProp:g,setValue:_,state:v,setInputValue:y,locale:b,inputRef:x,onValueCommitted:S,lastChangedValueRef:C,hasPendingCommitRef:w,valueRef:T}=os(),{disabled:D,readOnly:O,required:k,value:A,inputValue:j}=v,{clearErrors:M}=nt(),{validationMode:N,setTouched:P,setFocused:F,invalid:I,shouldValidateOnChange:ee,validation:te}=st(),{labelId:ne}=$e(),re=J.useRef(!1),ie=J.useRef(!1),z=J.useRef(null);return rt(x,u,A,void 0,!D,g),ye(()=>{if(z.current!=null){let e=z.current;z.current=null,x.current?.setSelectionRange(e,e)}}),E(A,()=>{if(M(h),ie.current&&!ee()){ie.current=!1;return}te.change(A)}),V(`input`,e,{ref:[t,x],state:v,props:[{id:u,required:k,disabled:D,readOnly:O,inputMode:f,value:j,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!D&&I?!0:void 0,"aria-labelledby":ne,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||D||(F(!0),re.current))return;re.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||D||(P(!0),F(!1),O))return;let t=!o.current,n=w.current;if(o.current=!0,j.trim()===``){let r=R(G,e.nativeEvent);if(_(null,r),r.isCanceled)return;N===`onBlur`&&te.commit(null),(t||n||A!==null)&&S(null,L(G,e.nativeEvent));return}let r=s.current,i=zs(j,b,r);if(i===null)return;let a=Hs(r),c;c=!t&&!a?A:a?Us(i,r):i;let l=L(ge,e.nativeEvent),u=A!==c,d=t||u||n,f=c;if(u){let t=R(ge,e.nativeEvent);if(ie.current=!0,_(c,t),t.isCanceled){ie.current=!1;return}f=C.current,f===A&&(ie.current=!1)}N===`onBlur`&&te.commit(f),d&&S(f,l);let p=us(f,b,r);j!==p&&y(p)},onChange(e){if(e.nativeEvent.defaultPrevented)return;o.current=!1;let t=e.currentTarget.value;if(t.trim()===``){y(t),_(null,R(G,e.nativeEvent));return}let n=c();if(!Array.from(t).every(e=>Cs(e)||Ps.test(e)||n.has(e)||Es.test(e)))return;let r=zs(t,b,s.current);y(t),r!==null&&_(r,R(ae,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||O||D)return;let t=e.nativeEvent,n=!o.current,r=c(),i=r.has(e.key),{decimal:a,currency:u,percentSign:f}=Rs(b,s.current),h=e.currentTarget.selectionStart,g=e.currentTarget.selectionEnd,v=h===0&&g===j.length,y=e=>h!=null&&g!=null&&e>=h&&e<g;[[Ps,Ms],[Fs,Ns]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=j.search(n),t=e!==-1&&y(e);i=!(Ps.test(j)||Fs.test(j))||v||t}}),[a,u,f].forEach(t=>{if(e.key===t){let e=j.indexOf(t),n=y(e);i=e===-1||v||n}});let x=cc.has(e.key),w=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!w||e.ctrlKey||e.metaKey||i||Cs(e.key)||x)return;let E=null;if(e.key===`Home`&&m!=null?E=m:e.key===`End`&&p!=null&&(E=p),e.key.length>1&&!w&&E===null)return;let k=n?zs(j,b,s.current):null,A=l(e);e.preventDefault(),e.stopPropagation();let M=L(pe,t),N=!1;(w||E!==null)&&(o.current=!0),w?(n||(C.current=T.current),N=d(A,{direction:e.key===`ArrowUp`?1:-1,currentValue:k,event:t,reason:pe})):E!==null&&(N=_(E,R(pe,t))),N&&S(C.current,M)},onPaste(e){if(e.defaultPrevented||O||D)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=j.slice(0,r)+t+j.slice(i),c=zs(a,b,s.current);c!==null&&(o.current=!1,z.current=r+t.length,_(c,R(be,e.nativeEvent)),y(a))}},a,e=>te.getValidationProps(D,e)],stateAttributesMapping:ss})});function uc(e){let t=(0,Rt.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,className:n,size:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s=J.useId(),c=r??s,l;t[5]===n?l=t[6]:(l=K(`flex w-full flex-col items-start gap-2`,n),t[5]=n,t[6]=l);let u;return t[7]!==c||t[8]!==i||t[9]!==o||t[10]!==l?(u=(0,q.jsx)(Ks,{className:l,"data-size":o,"data-slot":`number-field`,id:c,...i}),t[7]=c,t[8]=i,t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function dc(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex w-full justify-between rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] has-aria-invalid:border-destructive/36 has-autofill:bg-foreground/4 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/48 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-within,[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(qs,{className:i,"data-slot":`number-field-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fc(e){let t=(0,Rt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-s-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(qe,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,q.jsx)(sc,{className:i,"data-slot":`number-field-decrement`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function pc(e){let t=(0,Rt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-e-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(yt,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,q.jsx)(oc,{className:i,"data-slot":`number-field-increment`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function mc(e){let t=(0,Rt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=K(`h-8.5 in-data-[size=lg]:h-9.5 in-data-[size=sm]:h-7.5 w-full min-w-0 grow bg-transparent in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] text-center tabular-nums in-data-[size=lg]:leading-9.5 in-data-[size=sm]:leading-7.5 leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:in-data-[size=lg]:h-8.5 sm:in-data-[size=sm]:h-6.5 sm:in-data-[size=lg]:leading-8.5 sm:in-data-[size=sm]:leading-8.5 sm:leading-7.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(lc,{className:i,"data-slot":`number-field-input`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var hc=e({CustomSnoozeDialogHost:()=>xc,requestCustomSnooze:()=>_c}),gc=Pe(()=>({request:null}));function _c(){return gc.getState().request?.resolve(null),new Promise(e=>gc.setState({request:{resolve:e}}))}function vc(e){let t=gc.getState().request;gc.setState({request:null}),t?.resolve(e)}function yc(e){let t=e.getTimezoneOffset();return new Date(e.getTime()-t*6e4).toISOString().slice(0,10)}function bc(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function xc(){let e=(0,Rt.c)(3),t=gc(wc),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0],(0,J.useEffect)(Sc,n);let r;return e[1]===t?r=e[2]:(r=t?(0,q.jsx)(Tc,{}):null,e[1]=t,e[2]=r),r}function Sc(){return Cc}function Cc(){return vc(null)}function wc(e){return e.request}function Tc(){let e=(0,Rt.c)(39),t=(0,J.useId)(),[n]=(0,J.useState)(Oc),[r,i]=(0,J.useState)(`date`),[a,o]=(0,J.useState)(n),[s,c]=(0,J.useState)(!1),l;e[0]===n?l=e[1]:(l=bc(n),e[0]=n,e[1]=l);let[u,d]=(0,J.useState)(l),[f,p]=(0,J.useState)(`2`),[m,h]=(0,J.useState)(`hours`),[g,_]=(0,J.useState)(null),v;e[2]!==f||e[3]!==a||e[4]!==r||e[5]!==u||e[6]!==m?(v=r===`date`?{mode:r,date:yc(a),time:u}:{mode:r,amount:f,unit:m},e[2]=f,e[3]=a,e[4]=r,e[5]=u,e[6]=m,e[7]=v):v=e[7];let y=v,b;e[8]!==y||e[9]!==r?(b=e=>{e.preventDefault();let t=en(y,new Date);if(!t){_(r===`date`?`Choose a valid date and time in the future.`:`Enter a positive duration.`);return}vc({snoozedUntil:t})},e[8]=y,e[9]=r,e[10]=b):b=e[10];let x=b,S;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsxs)(it,{children:[(0,q.jsx)(at,{children:`Custom snooze`}),(0,q.jsx)(lt,{children:`Choose when snoozed threads return to your inbox.`})]}),e[11]=S):S=e[11];let C;e[12]===r?C=e[13]:(C=[r],e[12]=r,e[13]=C);let w,T,E;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{let t=e[0];(t===`date`||t===`duration`)&&i(t),_(null)},T=(0,q.jsx)(ht,{value:`date`,children:`Date and time`}),E=(0,q.jsx)(ht,{value:`duration`,children:`Duration`}),e[14]=w,e[15]=T,e[16]=E):(w=e[14],T=e[15],E=e[16]);let D;e[17]===C?D=e[18]:(D=(0,q.jsxs)(pt,{"aria-label":`Schedule type`,className:`w-full *:flex-1`,value:C,onValueChange:w,children:[T,E]}),e[17]=C,e[18]=D);let O;e[19]!==f||e[20]!==s||e[21]!==a||e[22]!==t||e[23]!==r||e[24]!==u||e[25]!==m?(O=r===`date`?(0,q.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,q.jsx)(zt,{htmlFor:`${t}-date`,children:`Date`}),(0,q.jsxs)(He,{open:s,onOpenChange:c,children:[(0,q.jsxs)(Re,{render:(0,q.jsx)(Ne,{id:`${t}-date`,variant:`outline`,className:`w-full justify-between`}),children:[a.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`}),(0,q.jsx)(gt,{className:`size-4 text-muted-foreground`})]}),(0,q.jsx)(Ve,{align:`start`,"aria-label":`Choose snooze date`,children:(0,q.jsx)(rs,{mode:`single`,required:!0,selected:a,defaultMonth:a,disabled:{before:new Date(new Date().setHours(0,0,0,0))},onSelect:e=>{e&&(o(e),c(!1),_(null))}})})]})]}),(0,q.jsxs)(zt,{className:`flex min-w-0 flex-col items-stretch`,htmlFor:`${t}-time`,children:[`Time`,(0,q.jsx)(Qe,{nativeInput:!0,id:`${t}-time`,className:`h-9 sm:h-8`,type:`time`,required:!0,value:u,onChange:e=>{d(e.target.value),_(null)}})]})]}):(0,q.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(uc,{id:`${t}-amount`,min:0,step:`any`,value:f===``?null:Number(f),onValueChange:e=>{p(e===null?``:String(e)),_(null)},children:[(0,q.jsx)(zt,{htmlFor:`${t}-amount`,children:`Snooze for`}),(0,q.jsxs)(dc,{children:[(0,q.jsx)(fc,{"aria-label":`Decrease duration`}),(0,q.jsx)(mc,{required:!0}),(0,q.jsx)(pc,{"aria-label":`Increase duration`})]})]}),(0,q.jsxs)(zt,{className:`flex min-w-0 flex-col items-stretch`,htmlFor:`${t}-unit`,children:[`Unit`,(0,q.jsxs)(Hn,{value:m,items:{minutes:`Minutes`,hours:`Hours`,days:`Days`},onValueChange:e=>{(e===`minutes`||e===`hours`||e===`days`)&&h(e),_(null)},children:[(0,q.jsx)(Wn,{id:`${t}-unit`,className:`min-w-0`,children:(0,q.jsx)(Gn,{})}),(0,q.jsxs)(Kn,{children:[(0,q.jsx)(qn,{value:`minutes`,children:`Minutes`}),(0,q.jsx)(qn,{value:`hours`,children:`Hours`}),(0,q.jsx)(qn,{value:`days`,children:`Days`})]})]})]})]}),e[19]=f,e[20]=s,e[21]=a,e[22]=t,e[23]=r,e[24]=u,e[25]=m,e[26]=O):O=e[26];let k;e[27]!==D||e[28]!==O?(k=(0,q.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[D,O]}),e[27]=D,e[28]=O,e[29]=k):k=e[29];let A;e[30]===g?A=e[31]:(A=g?(0,q.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:g}):null,e[30]=g,e[31]=A);let j;e[32]!==k||e[33]!==A?(j=(0,q.jsxs)(ct,{children:[k,A]}),e[32]=k,e[33]=A,e[34]=j):j=e[34];let M;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,q.jsxs)(ot,{children:[(0,q.jsx)(Ne,{type:`button`,variant:`outline`,onClick:Ec,children:`Cancel`}),(0,q.jsx)(Ne,{type:`submit`,children:`Snooze`})]}),e[35]=M):M=e[35];let N;return e[36]!==x||e[37]!==j?(N=(0,q.jsx)(dt,{open:!0,onOpenChange:Dc,children:(0,q.jsx)(ut,{className:`sm:max-w-sm`,children:(0,q.jsxs)(`form`,{className:`flex min-h-0 flex-col`,onSubmit:x,children:[S,j,M]})})}),e[36]=x,e[37]=j,e[38]=N):N=e[38],N}function Ec(){return vc(null)}function Dc(e){e||vc(null)}function Oc(){return new Date(Date.now()+36e5)}export{yt as A,Ct as C,Dt as D,Et as E,_t as M,gt as N,wt as O,Mt as S,Tt as T,It as _,Yn as a,kt as b,Wn as c,Vt as d,Qt as f,Lt as g,zt as h,Jn as i,vt as j,xt as k,Gn as l,Ut as m,hc as n,qn as o,$t as p,Hn as r,Kn as s,xc as t,Ht as u,Ft as v,St as w,jt as x,At as y};
|
|
2
|
+
//# sourceMappingURL=sidebarV2CustomSnoozeDialog-B_dtRwFZ.js.map
|