vendor: 4,230 bytes, line 1
1import{o as e,r as t}from"./chunk-CMxvf4Kt.js";import{t as n}from"./react-CiG4YQQ8.js";import{n as r}from"./dist-CrBK8LAr.js";import{t as i}from"./x-Du2rBfAu.js";import{P as a,k as o}from"./dist-4mJf4sTE.js";import{t as s}from"./jsx-runtime-sLPvdpSW.js";import{n as c,t as l}from"./with-selector-51OeuM_G.js";import{l as u,r as d}from"./utils-vklqJKwM.js";import{t as f}from"./check-D8KTTCYQ.js";import{t as p}from"./chevron-down-D2zJCFrg.js";import{t as m}from"./chevron-left-VzlOuQel.js";import{t as h}from"./chevron-right-D_iqLbhW.js";import{a as g,c as _,i as v,l as y,n as b,o as x,r as S,s as C,t as w}from"./select-ChPeOWbo.js";import{t as T}from"./copy-jHwKsNYR.js";import{n as E}from"./dist-1aDuISlN.js";import{n as D,t as O}from"./button-CKyivoOm.js";import{i as k,r as A,t as j}from"./dist-CR5VJj3c.js";import{t as M}from"./dist-B7MCvPz1.js";import{r as N}from"./dist-BAAP2WN2.js";import{t as P}from"./dist-tqZYhec5.js";import{n as F}from"./dist-LiaVwlga.js";import{a as I,c as L,i as ee,l as te,n as ne,o as re,r as ie,s as ae}from"./floating-ui.react-dom-DD6CJ2R5.js";import{C as R,D as oe,E as se,O as ce,S as le,T as ue,_ as de,b as fe,d as z,f as pe,g as me,h as he,k as ge,m as _e,n as ve,p as ye,u as be,v as xe,w as Se,x as Ce,y as we}from"./floating-ui.dom-CRUx2QLQ.js";import{a as Te,d as Ee,n as De,p as Oe,r as ke,s as Ae,t as je}from"./textarea-DdZPPLN4.js";import{t as Me}from"./dist-C2J943E6.js";import{t as Ne}from"./input-DhjQLIa6.js";import{i as Pe,n as Fe,r as Ie,t as Le}from"./input-group-FBUw7cAT.js";var Re=u(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),ze=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Be=u(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),B=e(n(),1),V=e(s(),1),H=`Checkbox`,[Ve,He]=A(H),[Ue,We]=Ve(H);function Ge(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=N({prop:n,defaultProp:i??!1,onChange:c,caller:H}),[m,h]=B.useState(null),[g,_]=B.useState(null),v=B.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:et(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,V.jsx)(Ue,{scope:t,...b,children:$e(d)?d(b):r})}var Ke=`CheckboxTrigger`,qe=B.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=We(Ke,e),h=E(i,u),g=B.useRef(c);return B.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,V.jsx)(k.button,{type:`button`,role:`checkbox`,"aria-checked":et(c)?`mixed`:c,"aria-required":l,"data-state":tt(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:j(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:j(n,e=>{d(e=>et(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});qe.displayName=Ke;var Je=B.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,V.jsx)(Ge,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(qe,{...d,ref:t,__scopeCheckbox:n}),e&&(0,V.jsx)(Qe,{__scopeCheckbox:n})]})})});Je.displayName=H;var Ye=`CheckboxIndicator`,Xe=B.forwardRef((e,t)=>
1{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=We(Ye,n);return(0,V.jsx)(P,{present:r||et(a.checked)||a.checked===!0,children:(0,V.jsx)(k.span,{"data-state":tt(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Xe.displayName=Ye;var Ze=`CheckboxBubbleInput`,Qe=B.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=We(Ze,e),m=E(n,p),h=y(a),g=te(r);B.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=et(a),n.call(e,et(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=B.useRef(et(a)?!1:a);return(0,V.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Qe.displayName=Ze;function $e(e){return typeof e==`function`}function et(e){return e===`indeterminate`}function tt(e){return et(e)?`indeterminate`:e?`checked`:`unchecked`}var nt=[`PageUp`,`PageDown`],U=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],rt={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},it=`Slider`,[at,ot,st]=M(it),[ct,lt]=A(it,[st]),[ut,dt]=ct(it),ft=B.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=B.useRef(new Set),_=B.useRef(0),v=B.useRef(!1),y=o===`horizontal`?ht:gt,[b=[],x]=N({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus({preventScroll:!0,focusVisible:v.current}),v.current=!1,d(e)}}),S=B.useRef(b);function C(e){E(e,Ft(b,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];b[_.current]!==e&&f(b)}function E(e,t,{commit:n}={commit:!1}){let o=Bt(a),s=Me(Vt(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=Mt(e,s,t);if(Rt(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,V.jsx)(ut,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:b,orientation:o,form:m,children:(0,V.jsx)(at.Provider,{scope:e.__scopeSlider,children:(0,V.jsx)(at.Slot,{scope:e.__scopeSlider,children:(0,V.jsx)(y,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:j(h.onPointerDown,()=>{s||(S.current=b,v.current=!1)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>{s||(v.current=!0,E(r,0,{commit:!0}))},onEndKeyDown:()=>{s||(v.current=!0,E(i,b.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!s){v.current=!0;let n=nt.includes(e.key)||e.shiftKey&&U.includes(e.key)?10:1,r=_.current,i=b[r];E(i+a*n*t,r,{commit:!0})}}})})})})});ft.displayName=it;var[pt,mt]=ct(it,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),ht=B.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=B.useState(null),p=E(t,e=>f(e)),m=B.useRef(void 0),h=F(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=zt([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,V.jsx)(pt,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,V.jsx)(_t,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>
1{let t=rt[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),gt=B.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=B.useRef(null),d=E(t,u),f=B.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=zt([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,V.jsx)(pt,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,V.jsx)(_t,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=rt[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),_t=B.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=dt(it,n);return(0,V.jsx)(k.span,{...l,ref:t,onKeyDown:j(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):nt.concat(U).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:j(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:j(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:j(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),vt=`SliderTrack`,yt=B.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=dt(vt,n);return(0,V.jsx)(k.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});yt.displayName=vt;var bt=`SliderRange`,xt=B.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=dt(bt,n),a=mt(bt,n),o=E(t,B.useRef(null)),s=i.values.length,c=i.values.map(e=>Nt(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,V.jsx)(k.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});xt.displayName=bt;var St=`SliderThumb`,[Ct,wt]=ct(St),Tt=`SliderThumbProvider`;function Et(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=dt(Tt,t),o=ot(t),[s,c]=B.useState(null),l=B.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=te(s),d=s?!!a.form||!!s.closest(`form`):!0,f=a.values[l],p=n??(a.name?a.name+(a.values.length>1?`[]`:``):void 0),m=f===void 0?0:Nt(f,a.min,a.max);B.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]);let h={value:f,name:p,form:a.form,isFormControl:d,index:l,thumb:s,onThumbChange:c,percent:m,size:u};return(0,V.jsx)(Ct,{scope:t,...h,children:Ht(i)?i(h):r})}Et.displayName=Tt;var Dt=`SliderThumbTrigger`,Ot=B.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=dt(Dt,n),a=mt(Dt,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=wt(Dt,n),d=E(t,e=>u(e)),f=Pt(o,i.values.length),p=l?.[a.size],m=p?It(p,c,a.direction):0;return(0,V.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${m}px)`},children:(0,V.jsx)(at.ItemSlot,{scope:n,children:(0,V.jsx)(k.span,{role:`slider`,"aria-label":e[`aria-label`]||f,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:d,style:s===void 0?{display:`none`}:e.style,onFocus:j(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})});Ot.displayName=Dt;var kt=B.forwardRef((e,t)=>{let{__scopeSlider:n,name:r,...i}=e;return(0,V.jsx)(Et,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ot,{...i,ref:t,__scopeSlider:n}),r?(0,V.jsx)(jt,{__scopeSlider:n},e):null]})})});kt.displayName=St;var At=`SliderBubbleInput`,jt=B.forwardRef(({__scopeSlider:e,...t},n)=>{let{value:r,name:i,form:a}=wt(At,e),o=B.useRef(null),s=E(o,n),c=y(r);return B.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==r&&n){let t=new Event(`input`,{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[c,r]),(0,V.jsx)(k.input,{style:{display:`none`},name:i,form:a,...t,ref:s,defaultValue:r})});jt.displayName=At;function Mt(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>
1e-t)}function Nt(e,t,n){return Me(100/(n-t)*(e-t),[0,100])}function Pt(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Ft(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function It(e,t,n){let r=e/2;return(r-zt([0,50],[0,r])(t)*n)*n}function Lt(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Rt(e,t){if(t>0){let n=Lt(e);return Math.min(...n)>=t}return!0}function zt(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Bt(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}function Vt(e,t){let n=10**t;return Math.round(e*n)/n}function Ht(e){return typeof e==`function`}var Ut=`Switch`,[Wt,Gt]=A(Ut),[Kt,qt]=Wt(Ut);function Jt(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=N({prop:n,defaultProp:i??!1,onChange:c,caller:Ut}),[m,h]=B.useState(null),[g,_]=B.useState(null),v={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:B.useRef(!1),required:l,defaultChecked:i,isFormControl:m?!!o||!!m.closest(`form`):!0,bubbleInput:g,setBubbleInput:_};return(0,V.jsx)(Kt,{scope:t,...v,children:nn(d)?d(v):r})}var Yt=`SwitchTrigger`,Xt=B.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{value:i,disabled:a,checked:o,required:s,setControl:c,setChecked:l,hasConsumerStoppedPropagationRef:u,isFormControl:d,bubbleInput:f}=qt(Yt,e),p=E(r,c);return(0,V.jsx)(k.button,{type:`button`,role:`switch`,"aria-checked":o,"aria-required":s,"data-state":rn(o),"data-disabled":a?``:void 0,disabled:a,value:i,...n,ref:p,onClick:j(t,e=>{l(e=>!e),f&&d&&(u.current=e.isPropagationStopped(),u.current||e.stopPropagation())})})});Xt.displayName=Yt;var Zt=B.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,V.jsx)(Jt,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Xt,{...d,ref:t,__scopeSwitch:n}),e&&(0,V.jsx)(tn,{__scopeSwitch:n})]})})});Zt.displayName=Ut;var Qt=`SwitchThumb`,$t=B.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=qt(Qt,n);return(0,V.jsx)(k.span,{"data-state":rn(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});$t.displayName=Qt;var en=`SwitchBubbleInput`,tn=B.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=qt(en,e),m=E(n,p),h=y(a),g=te(r);B.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,h,a,i]);let _=B.useRef(a);return(0,V.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});tn.displayName=en;function nn(e){return typeof e==`function`}function rn(e){return e?`checked`:`unchecked`}var an=e(r()),on=c(),sn=l();function cn({className:e,...t}){return(0,V.jsx)(Je,{"data-slot":`checkbox`,className:d(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,V.jsx)(Xe,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,V.jsx)(f,{className:`size-3.5`})})})}var ln=365.2425,un=6048e5,dn=864e5,fn=3600*24;fn*7,fn*ln/12*3;var pn=Symbol.for(`constructDateFrom`);function mn(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&pn in e?e[pn](t):e instanceof Date?new e.constructor(t):new Date(t)}function W(e,t){return mn(t||e,e)}function hn(e,t,n){let r=W(e,n?.in);return isNaN(t)?mn(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function gn(e,t,n){let r=W(e,n?.in);if(isNaN(t))return mn(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=mn(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 _n={};function vn(){return _n}function yn(e,t){let n=vn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=W(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 bn(e,t){return yn(e,{...t,weekStartsOn:1}
vendor: 13,752 bytes, line 1
1)}function xn(e,t){let n=W(e,t?.in),r=n.getFullYear(),i=mn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=bn(i),o=mn(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=bn(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Sn(e){let t=W(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 Cn(e,...t){let n=mn.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function wn(e,t){let n=W(e,t?.in);return n.setHours(0,0,0,0),n}function Tn(e,t,n){let[r,i]=Cn(n?.in,e,t),a=wn(r),o=wn(i),s=+a-Sn(a),c=+o-Sn(o);return Math.round((s-c)/dn)}function En(e,t){let n=xn(e,t),r=mn(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bn(r)}function Dn(e,t,n){return hn(e,t*7,n)}function On(e,t,n){return gn(e,t*12,n)}function kn(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=mn.bind(null,e));let t=W(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),mn(r,n||NaN)}function An(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=mn.bind(null,e));let t=W(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),mn(r,n||NaN)}function jn(e,t,n){let[r,i]=Cn(n?.in,e,t);return+wn(r)==+wn(i)}function Mn(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Nn(e){return!(!Mn(e)&&typeof e!=`number`||isNaN(+W(e)))}function Pn(e,t,n){let[r,i]=Cn(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function Fn(e,t){let n=W(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function In(e,t){let[n,r]=Cn(e,t.start,t.end);return{start:n,end:r}}function Ln(e,t){let{start:n,end:r}=In(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(mn(n,o)),o.setMonth(o.getMonth()+s);return i?c.reverse():c}function Rn(e,t){let n=W(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function zn(e,t){let n=W(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Bn(e,t){let n=W(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Vn(e,t){let{start:n,end:r}=In(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(mn(n,o)),o.setFullYear(o.getFullYear()+s);return i?c.reverse():c}function Hn(e,t){let n=vn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=W(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 Un(e,t){return Hn(e,{...t,weekStartsOn:1})}var Wn={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`}},Gn=(e,t,n)=>{let r,i=Wn[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 Kn(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var qn={date:Kn({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:Kn({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:Kn({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Jn={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Yn=(e,t,n,r)=>Jn[e];function Xn(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 Zn={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:Xn({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Xn({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:Xn({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:Xn({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:Xn({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 Qn(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)?er(s,e=>e.test(o)):$n(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 $n(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function er(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function tr(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 nr={code:`en-US`,formatDistance:Gn,formatLong:qn,formatRelative:Yn,localize:Zn,match:{ordinalNumber:tr({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Qn({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:Qn({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:Qn({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:Qn({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:Qn({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 rr(e,t){let n=W(e,t?.in);return Tn(n,Bn(n))+1}function ir(e,t){let n=W(e,t?.in),r=bn(n)-+En(n);return Math.round(r/un)+1}function ar(e,t){let n=W(e,t?.in),r=n.getFullYear(),i=vn(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=mn(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=yn(o,t),c=mn(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=yn(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function or(e,t){let n=vn(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ar(e,t),a=mn(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),yn(a,t)}function sr(e,t){let n=W(e,t?.in),r=yn(n,t)-+or(n,t);return Math.round(r/un)+1}function G(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var cr={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return G(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):G(n+1,2)},d(e,t){return G(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 G(e.getHours()%12||12,t.length)},H(e,t){return G(e.getHours(),t.length)},m(e,t){return G(e.getMinutes(),t.length)},s(e,t){return G(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return G(Math.trunc(r*10**(n-3)),t.length)}},lr={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},ur={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 cr.y(e,t)},Y:function(e,t,n,r){let i=ar(e,r),a=i>0?i:1-i;return t===`YY`?G(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):G(a,t.length)},R:function(e,t){return G(xn(e),t.length)},u:function(e,t){return G(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 G(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 G(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 cr.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 G(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=sr(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):G(i,t.length)},I:function(e,t,n){let r=ir(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):G(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):cr.d(e,t)},D:function(e,t,n){let r=rr(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):G(r,t.length)},E:function(e,t,n){let r=e.getDay();
vendor: 4,533 bytes, line 1
1switch(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 G(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 G(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 G(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?lr.noon:r===0?lr.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?lr.evening:r>=12?lr.afternoon:r>=4?lr.morning:lr.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 cr.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):cr.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):G(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):G(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):cr.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):cr.s(e,t)},S:function(e,t){return cr.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return fr(r);case`XXXX`:case`XX`:return pr(r);default:return pr(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return fr(r);case`xxxx`:case`xx`:return pr(r);default:return pr(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+dr(r,`:`);default:return`GMT`+pr(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+dr(r,`:`);default:return`GMT`+pr(r,`:`)}},t:function(e,t,n){return G(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return G(+e,t.length)}};function dr(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+G(a,2)}function fr(e,t){return e%60==0?(e>0?`-`:`+`)+G(Math.abs(e)/60,2):pr(e,t)}function pr(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=G(Math.trunc(r/60),2),a=G(r%60,2);return n+i+t+a}var mr=(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`})}},hr=(e,t)=>
vendor: 39,833 bytes, line 1
1{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`})}},gr={p:hr,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return mr(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`});break}return a.replace(`{{date}}`,mr(r,t)).replace(`{{time}}`,hr(i,t))}},_r=/^D+$/,vr=/^Y+$/,yr=[`D`,`DD`,`YY`,`YYYY`];function br(e){return _r.test(e)}function xr(e){return vr.test(e)}function Sr(e,t,n){let r=Cr(e,t,n);if(console.warn(r),yr.includes(e))throw RangeError(r)}function Cr(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 wr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Er=/^'([^]*?)'?$/,Dr=/''/g,Or=/[a-zA-Z]/;function kr(e,t,n){let r=vn(),i=n?.locale??r.locale??nr,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=W(e,n?.in);if(!Nn(s))throw RangeError(`Invalid time value`);let c=t.match(Tr).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=gr[t];return n(e,i.formatLong)}return e}).join(``).match(wr).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Ar(e)};if(ur[t])return{isToken:!0,value:e};if(t.match(Or))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&&xr(a)||!n?.useAdditionalDayOfYearTokens&&br(a))&&Sr(a,t,String(e));let o=ur[a[0]];return o(s,a,i.localize,l)}).join(``)}function Ar(e){let t=e.match(Er);return t?t[1].replace(Dr,`'`):e}function jr(e,t){let n=W(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=mn(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Mr(e,t){return W(e,t?.in).getMonth()}function Nr(e,t){return W(e,t?.in).getFullYear()}function Pr(e,t){return+W(e)>+W(t)}function Fr(e,t){return+W(e)<+W(t)}function Ir(e,t,n){let[r,i]=Cn(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Lr(e,t,n){let[r,i]=Cn(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Rr(e,t,n){let r=W(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=mn(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=jr(o);return r.setMonth(t,Math.min(a,s)),r}function zr(e,t,n){let r=W(e,n?.in);return isNaN(+r)?mn(n?.in||e,NaN):(r.setFullYear(t),r)}function Br(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 Vr={},Hr={};function Ur(e,t){try{let n=(Vr[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in Hr?Hr[n]:Gr(n,n.split(`:`))}catch{if(e in Hr)return Hr[e];let t=e?.match(Wr);return t?Gr(e,t.slice(1)):NaN}}var Wr=/([+-]\d\d):?(\d\d)?/;function Gr(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return Hr[e]=n*60+r>0?n*60+r+i:n*60-r-i}var Kr=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(Ur(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)),Xr(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=-Ur(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Jr(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},qr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!qr.test(e))return;let t=e.replace(qr,`$1UTC`);Kr.prototype[t]&&(e.startsWith(`get`)?Kr.prototype[e]=function(){return this.internal[t]()}:(Kr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Yr(this),+this},Kr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Jr(this),+this}))});function Jr(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ur(e.timeZone,e)*60))}function Yr(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()),Xr(e)}function Xr(e,t){let n=Array.isArray(t)?Zr(t):+e.internal,r=Ur(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=Ur(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(-(Ur(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=Ur(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&&Qr(e)-n===y*60*1e3&&Qr(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=Ur(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)}Jr(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<1800*1e3&&(Date.prototype.setTime.call(e,+e+S),Jr(e))}function Zr(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function Qr(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-Ur(e.timeZone,n)*60)),+n}var $r=class e extends Kr{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} (${Br(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)}},ei=5,ti=4;function ni(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,ei*7-1);return t.getMonth(e)===t.getMonth(a)?ei:ti}function ri(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 ii(e,t){let n=ri(e,t),r=ni(e,t);return t.addDays(n,r*7-1)}var ai={...nr,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>kr(e,t,{locale:nr,...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)=>kr(e,n,{locale:nr,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>kr(e,t,{locale:nr,...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)=>kr(e,n,{locale:nr,...t}),r(e,`cccc`)}}},oi=class e{constructor(e,t){this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?$r.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 $r(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):hn(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):gn(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):Dn(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):On(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Tn(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):Pn(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):Ln(e),this.eachYearOfInterval=e=>{let t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):Vn(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):ii(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):Un(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):Fn(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):Hn(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):zn(e),this.format=(e,t,n)=>{let r=this.overrides?.format?this.overrides.format(e,t,this.options):kr(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):ir(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):Mr(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):Nr(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):sr(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):Pr(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):Fr(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Mn(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):jn(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):Ir(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):Lr(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):kn(e),this.min=e=>this.overrides?.min?this.overrides.min(e):An(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Rr(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):zr(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):ri(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):wn(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):bn(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):Rn(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):yn(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Bn(e),this.options={locale:ai,...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)}};oi.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 si=new oi,ci=class{constructor(e,t,n=si){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)}},li=class{constructor(e,t){this.date=e,this.weeks=t}},ui=class{constructor(e,t){this.days=t,this.weekNumber=e}};function di(e){return B.createElement(`span`,{...e})}function fi(e){let{size:t=24,orientation:n=`left`,className:r,style:i}=e;return B.createElement(`svg`,{className:r,style:i,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&B.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&B.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&B.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&B.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}function pi(e){let{day:t,modifiers:n,...r}=e;return B.createElement(`td`,{...r})}function mi(e){let{day:t,modifiers:n,...r}=e,i=B.useRef(null);return B.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),B.createElement(`button`,{ref:i,...r})}var K;(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`})(K||={});var hi;(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})(hi||={});var gi;(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(gi||={});var _i;(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`})(_i||={});var vi=(0,B.createContext)(void 0);function yi(){let e=(0,B.useContext)(vi);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}function bi(e){let{options:t,className:n,...r}=e,{classNames:i,components:a,styles:o}=yi(),s=[i[K.Dropdown],n].join(` `),c=t?.find(({value:e})=>e===r.value);return B.createElement(`span`,{"data-disabled":r.disabled,className:i[K.DropdownRoot],style:o?.[K.DropdownRoot]},B.createElement(a.Select,{className:s,...r},t?.map(({value:e,label:t,disabled:n})=>B.createElement(a.Option,{key:e,value:e,disabled:n},t))),B.createElement(`span`,{className:i[K.CaptionLabel],style:o?.[K.CaptionLabel],"aria-hidden":!0},c?.label,B.createElement(a.Chevron,{orientation:`down`,size:18,className:i[K.Chevron],style:o?.[K.Chevron]})))}function xi(e){return B.createElement(`div`,{...e})}function Si(e){return B.createElement(`div`,{...e})}function Ci(e){let{calendarMonth:t,displayIndex:n,...r}=e;return B.createElement(`div`,{...r},e.children)}function wi(e){let{calendarMonth:t,displayIndex:n,...r}=e;return B.createElement(`div`,{...r})}function Ti(e){return B.createElement(`table`,{...e})}function Ei(e){return B.createElement(`div`,{...e})}function Di(e){let{components:t}=yi();return B.createElement(t.Dropdown,{...e})}function Oi(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,styles:c,labels:{labelPrevious:l,labelNext:u}}=yi(),d=(0,B.useCallback)(e=>{i&&n?.(e)},[i,n]),f=(0,B.useCallback)(e=>{r&&t?.(e)},[r,t]);return B.createElement(`nav`,{...a},B.createElement(o.PreviousMonthButton,{type:`button`,className:s[K.PreviousMonthButton],style:c?.[K.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:f},B.createElement(o.Chevron,{disabled:r?void 0:!0,className:s[K.Chevron],style:c?.[K.Chevron],orientation:`left`})),B.createElement(o.NextMonthButton,{type:`button`,className:s[K.NextMonthButton],style:c?.[K.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":u(i),onClick:d},B.createElement(o.Chevron,{disabled:i?void 0:!0,orientation:`right`,className:s[K.Chevron],style:c?.[K.Chevron]})))}function ki(e){return B.createElement(`button`,{...e})}function Ai(e){return B.createElement(`option`,{...e})}function ji(e){return B.createElement(`button`,{...e})}function Mi(e){let{rootRef:t,...n}=e;return B.createElement(`div`,{...n,ref:t})}function Ni(e){return B.createElement(`select`,{...e})}function Pi(e){let{week:t,...n}=e;return B.createElement(`tr`,{...n})}function Fi(e){return B.createElement(`th`,{...e})}function Ii(e){return B.createElement(`thead`,{"aria-hidden":!0},B.createElement(`tr`,{...e}))}function Li(e){let{week:t,...n}=e;return B.createElement(`th`,{...n})}function Ri(e){return B.createElement(`th`,{...e})}function zi(e){return B.createElement(`tbody`,{...e})}function Bi(e){let{components:t}=yi();return B.createElement(t.Dropdown,{...e})}var Vi=t({CaptionLabel:()=>di,Chevron:()=>fi,Day:()=>pi,DayButton:()=>mi,Dropdown:()=>bi,DropdownNav:()=>xi,Footer:()=>Si,Month:()=>Ci,MonthCaption:()=>wi,MonthGrid:()=>Ti,Months:()=>Ei,MonthsDropdown:()=>Di,Nav:()=>Oi,NextMonthButton:()=>ki,Option:()=>Ai,PreviousMonthButton:()=>ji,Root:()=>Mi,Select:()=>Ni,Week:()=>Pi,WeekNumber:()=>Li,WeekNumberHeader:()=>Ri,Weekday:()=>Fi,Weekdays:()=>Ii,Weeks:()=>zi,YearsDropdown:()=>Bi});function Hi(e,t,n=!1,r=si){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 Ui(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function Wi(e){return!!(e&&typeof e==`object`&&`from`in e)}function Gi(e){return!!(e&&typeof e==`object`&&`after`in e)}function Ki(e){return!!(e&&typeof e==`object`&&`before`in e)}function qi(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function Ji(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Yi(e,t,n=si){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(Ji(t,n))return t.some(t=>i(e,t));if(Wi(t))return Hi(t,e,!1,n);if(qi(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Ui(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 Gi(t)?a(e,t.after)>0:Ki(t)?a(t.before,e)>0:typeof t==`function`?t(e):!1})}function Xi(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={[hi.focused]:[],[hi.outside]:[],[hi.disabled]:[],[hi.hidden]:[],[hi.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&&Yi(e,a,i)),S=!!(o&&Yi(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&&Yi(e,r,i)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{let t={[hi.focused]:!1,[hi.disabled]:!1,[hi.hidden]:!1,[hi.outside]:!1,[hi.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 Zi(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[hi[r]]?e.push(t[hi[r]]):t[gi[r]]&&e.push(t[gi[r]]),e),[t[K.Day]])}function Qi(e){return{...Vi,...e}}function $i(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 ea(){let e={};for(let t in K)e[K[t]]=`rdp-${K[t]}`;for(let t in hi)e[hi[t]]=`rdp-${hi[t]}`;for(let t in gi)e[gi[t]]=`rdp-${gi[t]}`;for(let t in _i)e[_i[t]]=`rdp-${_i[t]}`;return e}function ta(e,t,n){return(n??new oi(t)).formatMonthYear(e)}function na(e,t,n){return(n??new oi(t)).format(e,`d`)}function ra(e,t=si){return t.format(e,`LLLL`)}function ia(e,t,n){return(n??new oi(t)).format(e,`cccccc`)}function aa(e,t=si){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function oa(){return``}function sa(e,t=si){return t.format(e,`yyyy`)}var ca=t({formatCaption:()=>ta,formatDay:()=>na,formatMonthDropdown:()=>ra,formatWeekNumber:()=>aa,formatWeekNumberHeader:()=>oa,formatWeekdayName:()=>ia,formatYearDropdown:()=>sa});function la(e){return{...ca,...e}}function ua(e,t,n,r){let i=(r??new oi(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}function da(e,t,n){return(n??new oi(t)).formatMonthYear(e)}function fa(e,t,n,r){let i=(r??new oi(n)).format(e,`PPPP`);return t?.today&&(i=`Today, ${i}`),i}function pa(e){return`Choose the Month`}function ma(){return``}var ha=`Go to the Next Month`;function ga(e,t){return ha}function _a(e){return`Go to the Previous Month`}function va(e,t,n){return(n??new oi(t)).format(e,`cccc`)}function ya(e,t){return`Week ${e}`}function ba(e){return`Week Number`}function xa(e){return`Choose the Year`}var Sa=t({labelDayButton:()=>ua,labelGrid:()=>da,labelGridcell:()=>fa,labelMonthDropdown:()=>pa,labelNav:()=>ma,labelNext:()=>ga,labelPrevious:()=>_a,labelWeekNumber:()=>ya,labelWeekNumberHeader:()=>ba,labelWeekday:()=>va,labelYearDropdown:()=>xa}),Ca=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e);function wa(e,t){let n=t.locale?.labels??{};return{...Sa,...e??{},labelDayButton:Ca(ua,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Ca(pa,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Ca(ga,e?.labelNext,n.labelNext),labelPrevious:Ca(_a,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Ca(ya,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Ca(xa,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Ca(da,e?.labelGrid,n.labelGrid),labelGridcell:Ca(fa,e?.labelGridcell,n.labelGridcell),labelNav:Ca(ma,e?.labelNav,n.labelNav),labelWeekNumberHeader:Ca(ba,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Ca(va,e?.labelWeekday,n.labelWeekday)}}function Ta(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 Ea(e,t={},n={}){let r={...t?.[K.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n?.[e]}}),r}function Da(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 Oa(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 ka(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 $r(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($r.tz(e)),newDate:(t,n,r)=>new $r(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 $r(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 $r(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 $r(n.getFullYear(),0,1,12,0,0,e);for(;o.getFullYear()<=r.getFullYear();)i.push(new $r(o,e)),o.setFullYear(o.getFullYear()+1,0,1);return i},getWeek:(e,t)=>sr(o(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>ir(o(e)),differenceInCalendarDays:(e,t)=>Tn(o(e),o(t)),differenceInCalendarMonths:(e,t)=>Pn(o(e),o(t))}}var Aa=e=>e instanceof HTMLElement?e:null,ja=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],Ma=e=>Aa(e.querySelector(`[data-animated-month]`)),Na=e=>Aa(e.querySelector(`[data-animated-caption]`)),Pa=e=>Aa(e.querySelector(`[data-animated-weeks]`)),Fa=e=>Aa(e.querySelector(`[data-animated-nav]`)),Ia=e=>Aa(e.querySelector(`[data-animated-weekdays]`));function La(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,B.useRef)(null),s=(0,B.useRef)(r),c=(0,B.useRef)(!1);(0,B.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[_i.caption_after_enter]:n[_i.caption_before_enter],p=d?n[_i.weeks_after_enter]:n[_i.weeks_before_enter],m=o.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(ja(h).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=Ma(e);t&&e.contains(t)&&e.removeChild(t);let n=Na(e);n&&n.classList.remove(f);let r=Pa(e);r&&r.classList.remove(p)}),o.current=h):o.current=null,c.current||u||i)return;let g=m instanceof HTMLElement?ja(m):[],_=ja(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=Fa(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=Na(i);s&&s.classList.add(f);let l=Pa(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=Ia(o);m&&(m.style.opacity=`0`);let h=Na(o);h&&(h.classList.add(d?n[_i.caption_before_exit]:n[_i.caption_after_exit]),h.addEventListener(`animationend`,u));let _=Pa(o);_&&_.classList.add(d?n[_i.weeks_before_exit]:n[_i.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}function Ra(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 za(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 Ba(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 Va(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 Ha(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 li(m,_.reduce((e,t)=>{let i=n.ISOWeek?l(t):u(t),a=e.find(e=>e.weekNumber===i),o=new ci(t,m,r);return a?a.days.push(o):e.push(new ui(i,[o])),e},[]));return e.push(y),e},[]);return n.reverseMonths?m.reverse():m}function Ua(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 Wa(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 Ga(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 Ka(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}function qa(e,t){let[n,r]=(0,B.useState)(e);return[t===void 0?n:t,r]}function Ja(e,t){let[n,r]=Ua(e,t),{startOfMonth:i,endOfMonth:a}=t,o=Va(e,n,r,t),[s,c]=qa(o,e.month?o:void 0);(0,B.useEffect)(()=>{c(Va(e,n,r,t))},[e.timeZone]);let{months:l,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,B.useMemo)(()=>{let i=Ba(s,r,{numberOfMonths:e.numberOfMonths},t),o=Ha(i,Ra(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:Ka(o),days:za(o),previousMonth:Ga(s,n,e,t),nextMonth:Wa(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 Ya;(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(Ya||={});function Xa(e){return!e[hi.disabled]&&!e[hi.hidden]&&!e[hi.outside]}function Za(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);Xa(e)&&(e[hi.focused]&&a<Ya.FocusedModifier?(i=o,a=Ya.FocusedModifier):r?.isEqualTo(o)&&a<Ya.LastFocused?(i=o,a=Ya.LastFocused):n(o.date)&&a<Ya.Selected?(i=o,a=Ya.Selected):e[hi.today]&&a<Ya.Today&&(i=o,a=Ya.Today))}return i||=e.find(e=>Xa(t(e))),i}function Qa(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 $a(e,t,n,r,i,a,o,s=0){if(s>365)return;let c=Qa(e,t,n.date,r,i,a,o),l=!!(a.disabled&&Yi(c,a.disabled,o)),u=!!(a.hidden&&Yi(c,a.hidden,o)),d=new ci(c,c,o);return!l&&!u?d:$a(e,t,d,r,i,a,o,s+1)}function eo(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,B.useState)(),c=Za(t.days,n,r||(()=>!1),o),[l,u]=(0,B.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=$a(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 to(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=qa(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 no(e,t,n=0,r=0,i=!1,a=si){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 ro(e,t,n=si){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 io(e,t,n=si){return Hi(e,t.from,!1,n)||Hi(e,t.to,!1,n)||Hi(t,e.from,!1,n)||Hi(t,e.to,!1,n)}function ao(e,t,n=si){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?Hi(e,t,!1,n):Ji(t,n)?t.some(t=>Hi(e,t,!1,n)):Wi(t)?t.from&&t.to?io(e,{from:t.from,to:t.to},n):!1:qi(t)?ro(e,t.dayOfWeek,n):Ui(t)?n.isAfter(t.before,t.after)?io(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Yi(e.from,t,n)||Yi(e.to,t,n):Gi(t)||Ki(t)?Yi(e.from,t,n)||Yi(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 oo(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[c,l]=qa(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}:no(a,u,f,p,o,t)}return r&&n&&m?.from&&m.to&&ao({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&&Hi(u,e,!1,t)}}function so(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=qa(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 co(e,t){let n=so(e,t),r=to(e,t),i=oo(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}function lo(e,t){return e instanceof $r&&e.timeZone===t?e:new $r(e,t)}function uo(e,t,n){if(!n)return lo(e,t);let r=lo(e,t),i=new $r(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function fo(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?uo(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?uo(e,t,n):e):Wi(e)?{...e,from:e.from?lo(e.from,t):e.from,to:e.to?lo(e.to,t):e.to}:Ui(e)?{before:uo(e.before,t,n),after:uo(e.after,t,n)}:Gi(e)?{after:uo(e.after,t,n)}:Ki(e)?{before:uo(e.before,t,n)}:e}function po(e,t,n){return e&&(Array.isArray(e)?e.map(e=>fo(e,t,n)):fo(e,t,n))}function mo(e){let t=e,n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&=lo(t.today,n),t.month&&=lo(t.month,n),t.defaultMonth&&=lo(t.defaultMonth,n),t.startMonth&&=lo(t.startMonth,n),t.endMonth&&=lo(t.endMonth,n),t.mode===`single`&&t.selected?t.selected=lo(t.selected,n):t.mode===`multiple`&&t.selected?t.selected=t.selected?.map(e=>lo(e,n)):t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?lo(t.selected.from,n):t.selected.from,to:t.selected.to?lo(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=po(t.disabled,n)),t.hidden!==void 0&&(t.hidden=po(t.hidden,n)),t.modifiers)){let e={};Object.keys(t.modifiers).forEach(r=>{e[r]=po(t.modifiers?.[r],n)}),t.modifiers=e}let{components:r,formatters:i,labels:a,dateLib:o,locale:s,classNames:c}=(0,B.useMemo)(()=>{let e={...ai,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?ka(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new oi({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:Qi(t.components),formatters:la(t.formatters),labels:wa(t.labels,a.options),locale:e,classNames:{...ea(),...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,onDayCl
1ick: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=Ja(t,o),{days:j,months:M,navStart:N,navEnd:P,previousMonth:F,nextMonth:I,goToMonth:L}=A,ee=Xi(j,t,N,P,o),{isSelected:te,select:ne,selected:re}=co(t,o)??{},{blur:ie,focused:ae,isFocusTarget:R,moveFocus:oe,setFocused:se}=eo(t,A,ee,te??(()=>!1),o),{labelDayButton:ce,labelGridcell:le,labelGrid:ue,labelMonthDropdown:de,labelNav:fe,labelPrevious:z,labelNext:pe,labelWeekday:me,labelWeekNumber:he,labelWeekNumberHeader:ge,labelYearDropdown:_e}=a,ve=(0,B.useMemo)(()=>Da(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),ye=u!==void 0||m!==void 0,be=(0,B.useCallback)(()=>{F&&(L(F),b?.(F))},[F,L,b]),xe=(0,B.useCallback)(()=>{I&&(L(I),y?.(I))},[L,I,y]),Se=(0,B.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),se(e),!t.disabled&&(ne?.(e.date,t,n),m?.(e.date,t,n))},[ne,m,se]),Ce=(0,B.useCallback)((e,t)=>n=>{se(e),h?.(e.date,t,n)},[h,se]),we=(0,B.useCallback)((e,t)=>n=>{ie(),p?.(e.date,t,n)},[ie,p]),Te=(0,B.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];oe(e,t)}g?.(e.date,n,r)},[oe,g,t.dir]),Ee=(0,B.useCallback)((e,t)=>n=>{_?.(e.date,t,n)},[_]),De=(0,B.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),Oe=(0,B.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setMonth(o.startOfMonth(e),r);L(o.addMonths(i,-t))},[o,L]),ke=(0,B.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=o.setYear(o.startOfMonth(e),r);L(o.addMonths(i,-t))},[o,L]),{className:Ae,style:je}=(0,B.useMemo)(()=>({className:[c[K.Root],t.className].filter(Boolean).join(` `),style:{...S?.[K.Root],...t.style}}),[c,t.className,t.style,S]),Me=$i(t),Ne=e=>{let t=S?.[K.Dropdown],n=S?.[e];if(!(!t&&!n))return{...t,...n}},Pe=(0,B.useRef)(null);La(Pe,!!t.animate,{classNames:c,months:M,focused:ae,dateLib:o});let Fe={dayPickerProps:t,selected:re,select:ne,isSelected:te,months:M,nextMonth:I,previousMonth:F,goToMonth:L,getModifiers:ee,components:r,classNames:c,styles:S,labels:a,formatters:i};return B.createElement(vi.Provider,{value:Fe},B.createElement(r.Root,{rootRef:t.animate?Pe:void 0,className:Ae,style:je,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`],...Me},B.createElement(r.Months,{className:c[K.Months],style:S?.[K.Months]},!t.hideNavigation&&!d&&B.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[K.Nav],style:S?.[K.Nav],"aria-label":fe(),onPreviousClick:be,onNextClick:xe,previousMonth:F,nextMonth:I}),M.map((e,n)=>{let a=t.reverseMonths?M.length-1-n:n;return B.createElement(r.Month,{"data-animated-month":t.animate?`true`:void 0,className:c[K.Month],style:S?.[K.Month],key:n,displayIndex:n,calendarMonth:e},d===`around`&&!t.hideNavigation&&n===0&&B.createElement(r.PreviousMonthButton,{type:`button`,className:c[K.PreviousMonthButton],style:S?.[K.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":F?void 0:!0,"aria-label":z(F),onClick:be,"data-animated-button":t.animate?`true`:void 0},B.createElement(r.Chevron,{disabled:F?void 0:!0,className:c[K.Chevron],style:S?.[K.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),B.createElement(r.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:c[K.MonthCaption],style:S?.[K.MonthCaption],calendarMonth:e,displayIndex:n},l?.startsWith(`dropdown`)?B.createElement(r.DropdownNav,{className:c[K.Dropdowns],style:S?.[K.Dropdowns]},(()=>{let n=l===`dropdown`||l===`dropdown-months`?B.createElement(r.MonthsDropdown,{key:`month`,className:c[K.MonthsDropdown],"aria-label":de(),disabled:!!t.disableNavigation,onChange:Oe(e.date,a),options:Ta(e.date,N,P,i,o),style:Ne(K.MonthsDropdown),value:o.getMonth(e.date)}):B.createElement(`span`,{key:`month`},T(e.date,o)),s=l===`dropdown`||l===`dropdown-years`?B.createElement(r.YearsDropdown,{key:`year`,className:c[K.YearsDropdown],"aria-label":_e(o.options),disabled:!!t.disableNavigation,onChange:ke(e.date,a),options:Oa(N,P,i,o,!!t.reverseYears),style:Ne(K.Years
vendor: 2,240 bytes, line 1
1Dropdown),value:o.getYear(e.date)}):B.createElement(`span`,{key:`year`},k(e.date,o));return o.getMonthYearOrder()===`year-first`?[s,n]:[n,s]})(),B.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))):B.createElement(r.CaptionLabel,{className:c[K.CaptionLabel],style:S?.[K.CaptionLabel],role:`status`,"aria-live":`polite`},C(e.date,o.options,o))),d===`around`&&!t.hideNavigation&&n===f-1&&B.createElement(r.NextMonthButton,{type:`button`,className:c[K.NextMonthButton],style:S?.[K.NextMonthButton],tabIndex:I?void 0:-1,"aria-disabled":I?void 0:!0,"aria-label":pe(I),onClick:xe,"data-animated-button":t.animate?`true`:void 0},B.createElement(r.Chevron,{disabled:I?void 0:!0,className:c[K.Chevron],style:S?.[K.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===f-1&&d===`after`&&!t.hideNavigation&&B.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[K.Nav],style:S?.[K.Nav],"aria-label":fe(),onPreviousClick:be,onNextClick:xe,previousMonth:F,nextMonth:I}),B.createElement(r.MonthGrid,{role:`grid`,"aria-multiselectable":u===`multiple`||u===`range`,"aria-label":ue(e.date,o.options,o)||void 0,className:c[K.MonthGrid],style:S?.[K.MonthGrid]},!t.hideWeekdays&&B.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:c[K.Weekdays],style:S?.[K.Weekdays]},x&&B.createElement(r.WeekNumberHeader,{"aria-label":ge(o.options),className:c[K.WeekNumberHeader],style:S?.[K.WeekNumberHeader],scope:`col`},D()),ve.map(e=>B.createElement(r.Weekday,{"aria-label":me(e,o.options,o),className:c[K.Weekday],key:String(e),style:S?.[K.Weekday],scope:`col`},O(e,o.options,o)))),B.createElement(r.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:c[K.Weeks],style:S?.[K.Weeks]},e.weeks.map(e=>B.createElement(r.Week,{className:c[K.Week],key:e.weekNumber,style:S?.[K.Week],week:e},x&&B.createElement(r.WeekNumber,{week:e,style:S?.[K.WeekNumber],"aria-label":he(e.weekNumber,{locale:s}),className:c[K.WeekNumber],scope:`row`,role:`rowheader`},E(e.weekNumber,o)),e.days.map(e=>{let{date:n}=e,i=ee(e);
1if(i[hi.focused]=!i.hidden&&!!ae?.isEqualTo(e),i[gi.selected]=te?.(n)||i.selected,Wi(re)){let{from:e,to:t}=re;i[gi.range_start]=!!(e&&t&&o.isSameDay(n,e)),i[gi.range_end]=!!(e&&t&&o.isSameDay(n,t)),i[gi.range_middle]=Hi(re,n,!0,o)}let a=Ea(i,S,t.modifiersStyles),s=Zi(i,c,t.modifiersClassNames),l=!ye&&!i.hidden?le(n,i,o.options,o):void 0;return B.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&&ye?B.createElement(r.DayButton,{className:c[K.DayButton],style:S?.[K.DayButton],type:`button`,day:e,modifiers:i,disabled:!i.focused&&i.disabled||void 0,"aria-disabled":i.focused&&i.disabled||void 0,tabIndex:R(e)?0:-1,"aria-label":ce(n,i,o.options,o),onClick:Se(e,i),onBlur:we(e,i),onFocus:Ce(e,i),onKeyDown:Te(e,i),onMouseEnter:Ee(e,i),onMouseLeave:De(e,i)},w(n,o.options,o)):!i.hidden&&w(e.date,o.options,o))}))))))})),t.footer&&B.createElement(r.Footer,{className:c[K.Footer],style:S?.[K.Footer],role:`status`,"aria-live":`polite`},t.footer)))}function ho({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r=`label`,buttonVariant:i=`ghost`,formatters:a,components:o,...s}){let c=ea();return(0,V.jsx)(mo,{showOutsideDays:n,className:d(`group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...a},classNames:{root:d(`w-fit`,c.root),months:d(`relative flex flex-col gap-4 md:flex-row`,c.months),month:d(`flex w-full flex-col gap-4`,c.month),nav:d(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,c.nav),button_previous:d(D({variant:i}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,c.button_previous),button_next:d(D({variant:i}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,c.button_next),month_caption:d(`flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)`,c.month_caption),dropdowns:d(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,c.dropdowns),dropdown_root:d(`relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50`,c.dropdown_root),dropdown:d(`absolute inset-0 bg-popover opacity-0`,c.dropdown),caption_label:d(`font-medium select-none`,r===`label`?`text-sm`:`flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground`,c.caption_label),weekdays:d(`flex`,c.weekdays),weekday:d(`flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none`,c.weekday),week:d(`mt-2 flex w-full`,c.week),week_number_header:d(`w-(--cell-size) select-none`,c.week_number_header),week_number:d(`text-[0.8rem] text-muted-foreground select-none`,c.week_number),day:d(`group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md`,s.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-md`:`[&:first-child[data-selected=true]_button]:rounded-l-md`,c.day),range_start:d(`rounded-l-md bg-accent`,c.range_start),range_middle:d(`rounded-none`,c.range_middle),range_end:d(`rounded-r-md bg-accent`,c.range_end),today:d(`rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none`,c.today),outside:d(`text-muted-foreground aria-selected:text-muted-foreground`,c.outside),disabled:d(`text-muted-foreground opacity-50`,c.disabled),hidden:d(`invisible`,c.hidden),...t},components:{Root:({className:e,rootRef:t,...n})=>(0,V.jsx)(`div`,{"data-slot":`calendar`,ref:t,className:d(e),...n}),Chevron:({className:e,orientation:t,...n})=>t===`left`?(0,V.jsx)(m,{className:d(`size-4`,e),...n}):t===`right`?(0,V.jsx)(h,{className:d(`size-4`,e),...n}):(0,V.jsx)(p,{className:d(`size-4`,e),...n}),DayButton:go,WeekNumber:({children:e,...t})=>(0,V.jsx)(`td`,{...t,children:(0,V.jsx)(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})}),...o},...s})}function go({className:e,day:t,modifiers:n,...r}){let i=ea(),a=B.useRef(null);return B.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),(0,V.jsx)(O,{ref:a,variant:`ghost`,size:`icon`,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:d(`flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70`,i.day,e),...r})}function _o({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=B.useRef(e!==void 0),[a,o]=B.useState(t);return[i?e:a,B.useCallback(e=>{i||o(e)},[])]}var vo={...B},yo={};function bo(e,t){let n=B.useRef(yo);return n.current===yo&&(n.current=e(t)),n}var xo=vo.useInsertionEffect,So=xo&&xo!==vo.useLayoutEffect?xo:e=>e();function q(e){let t=bo(Co).current;return t.next=e,So(t.effect),t.trampoline}function Co(){let e={next:void 0,callback:wo,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wo(){}var J=typeof document<`u`?B.useLayoutEffect:()=>{},To=B.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Eo(){return B.useContext(To)}function Do(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=q(i),o=B.useRef(0),s=bo(ko).current,c=bo(Oo).current,[l,u]=B.useState(0),d=B.useRef(l),f=q((e,t)=>
1{c.set(e,t??null),d.current+=1,u(d.current)}),p=q(e=>{c.delete(e),d.current+=1,u(d.current)}),m=B.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Ao).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);J(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),J(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),J(()=>()=>{n.current=[]},[n]),J(()=>()=>{r&&(r.current=[])},[r]);let h=q(e=>(s.add(e),()=>{s.delete(e)}));J(()=>{s.forEach(e=>e(m))},[s,m]);let g=B.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,V.jsx)(To.Provider,{value:g,children:t})}function Oo(){return new Map}function ko(){return new Set}function Ao(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var jo=B.createContext(void 0);function Mo(){return B.useContext(jo)?.direction??`ltr`}function No(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Po=No(`https://base-ui.com/production-error`,`Base UI`);function Fo(e,t,n,r){let i=bo(Lo).current;return Ro(i,e,t,n,r)&&Bo(i,[e,t,n,r]),i.callback}function Io(e){let t=bo(Lo).current;return zo(t,e)&&Bo(t,e),t.callback}function Lo(){return{callback:null,cleanup:null,refs:[]}}function Ro(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function zo(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Bo(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var Vo=19;function Ho(e){return Vo>=e}function Uo(e){if(!B.isValidElement(e))return null;let t=e,n=t.props;return(Ho(19)?n?.ref:t.ref)??null}function Wo(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Go(){}var Ko=Object.freeze([]),qo=Object.freeze({});function Jo(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Yo(e,t){return typeof e==`function`?e(t):e}function Xo(e,t){return typeof e==`function`?e(t):e}var Zo={};function Qo(e,t,n,r,i){if(!n&&!r&&!i&&!e)return es(t);let a=es(e);return t&&(a=ts(a,t)),n&&(a=ts(a,n)),r&&(a=ts(a,r)),i&&(a=ts(a,i)),a}function $o(e){if(e.length===0)return Zo;if(e.length===1)return es(e[0]);let t=es(e[0]);for(let n=1;n<e.length;n+=1)t=ts(t,e[n]);return t}function es(e){return as(e)?{...os(e,Zo)}:ns(e)}function ts(e,t){return as(t)?os(t,e):rs(e,t)}function ns(e){let t={...e};for(let e in t){let n=t[e];is(e,n)&&(t[e]=cs(n))}return t}function rs(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Wo(e.style,r);break;case`className`:e[n]=us(e.className,r);break;default:is(n,r)?e[n]=ss(e[n],r):e[n]=r}}return e}function is(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function as(e){return typeof e==`function`}function os(e,t){return as(e)?e(t):e??Zo}function ss(e,t){return t?e?(...n)=>{let r=n[0];if(ds(r)){let i=r;ls(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:cs(t):e}function cs(e){return e&&((...t)=>{let n=t[0];return ds(n)&&ls(n),e(...t)})}function ls(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function us(e,t){return t?e?t+` `+e:t:e}function ds(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function fs(e,t,n={}){let r=t.render,i=ps(t,n);return n.enabled===!1?null:gs(e,r,i,n.state??qo)}function ps(e,t={}){let{className:n,style:r,render:i}=e,{state:a=qo,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Yo(n,a):void 0,d=l?Xo(r,a):void 0,f=l?Jo(a,c):qo,p=l&&s?ms(s):void 0,m=l?Wo(f,p)??{}:qo;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Io([m.ref,Uo(i),...o]):m.ref=Fo(m.ref,Uo(i),o):Fo(null,null)),l?(u!==void 0&&(m.className=us(m.className,u)),d!==void 0&&(m.style=Wo(m.style,d)),m):qo}function ms(e){return Array.isArray(e)?$o(e):Qo(void 0,e)}var hs=Symbol.for(`react.lazy`);function gs(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Qo(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===hs&&(i=B.Children.toArray(t)[0]),B.cloneElement(i,e)}if(e&&typeof e==`string`)return _s(e,n);throw Error(Po(8))}function _s(e,t){return e===`button`?(0,B.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,B.createElement)(`img`,{alt:``,...t,key:t.key}):B.createElement(e,t)}var vs=`none`,ys=`trigger-press`,bs=`outside-press`,xs=`item-press`,Ss=`close-press`,Cs=`clear-press`,ws=`input-change`,Ts=`input-clear`,Es=`input-press`,Ds=`focus-out`,Os=`escape-key`,ks=`list-navigation`;function Y(e,t,n,r){let i=!1,a=!1,o=r??qo;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}
1function As(e,t,n){let r=n??qo;return{reason:e,event:t??new Event(`base-ui`),...r}}var js=0;function Ms(e,t=`mui`){let[n,r]=B.useState(e),i=e||n;return B.useEffect(()=>{n??(js+=1,r(`${t}-${js}`))},[n,t]),i}var Ns=vo.useId;function Ps(e,t){if(Ns!==void 0){let n=Ns();return e??(t?`${t}-${n}`:n)}return Ms(e,t)}function Fs(e){return Ps(e,`base-ui`)}var Is=[];function Ls(e){B.useEffect(e,Is)}var Rs=null;globalThis.requestAnimationFrame;var zs=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Bs=class e{static create(){return new e}static request(e){return zs.request(e)}static cancel(e){return zs.cancel(e)}currentId=Rs;request(e){this.cancel(),this.currentId=zs.request(()=>{this.currentId=Rs,e()})}cancel=()=>{this.currentId!==Rs&&(zs.cancel(this.currentId),this.currentId=Rs)};disposeEffect=()=>this.cancel};function Vs(){let e=bo(Bs.create).current;return Ls(e.disposeEffect),e}function Hs(e,t=!1,n=!1){let[r,i]=B.useState(e&&t?`idle`:void 0),[a,o]=B.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),J(()=>{if(!e&&a&&r!==`ending`&&n){let e=Bs.request(()=>{i(`ending`)});return()=>{Bs.cancel(e)}}},[e,a,r,n]),J(()=>{if(!e||t)return;let n=Bs.request(()=>{i(void 0)});return()=>{Bs.cancel(n)}},[t,e]),J(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Bs.request(()=>{i(`idle`)});return()=>{Bs.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var Us=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Ws(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=Eo(),f=B.useRef(-1),[p,m]=B.useState(a??(i===Us.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=B.useRef(null),g=B.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return J(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),J(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),B.useMemo(()=>({ref:g,index:p}),[p,g])}var Gs=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Ks={[Gs.startingStyle]:``},qs={[Gs.endingStyle]:``},Js={transitionStatus(e){return e===`starting`?Ks:e===`ending`?qs:null}},Ys=B.createContext(void 0);function Xs(e=!1){let t=B.useContext(Ys);if(t===void 0&&!e)throw Error(Po(16));return t}function Zs(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:B.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Qs(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=B.useRef(null),s=Xs(!0),c=a??s!==void 0,{props:l}=Zs({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=B.useCallback(()=>{let e=o.current;$s(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return J(u,[u]),{getButtonProps:B.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Qo({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ls(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=$s(a),l=!i&&ec(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(ls(e),a?.(e),e.target===e.currentTarget&&i&&c&&$s(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:q(e=>{o.current=e,u()})}}function $s(e){return he(e)&&e.tagName===`BUTTON`}function ec(e){return!!(e?.tagName===`A`&&e?.href)}var tc=typeof navigator<`u`,nc=dc(),rc=pc(),ic=fc(),ac=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),oc=nc.platform===`MacIntel`&&nc.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(nc.platform),sc=tc&&/firefox/i.test(ic),cc=tc&&/apple/i.test(navigator.vendor);tc&&/Edg/i.test(ic);var lc=tc&&/android/i.test(rc)||/android/i.test(ic);tc&&rc.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var uc=ic.includes(`jsdom/`);function dc(){if(!tc)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function fc(){if(!tc)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function pc(){if(!tc)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var mc=`data-base-ui-focusable`,hc=`ArrowLeft`,gc=`ArrowRight`,_c=`ArrowUp`,vc=`ArrowDown`;function yc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function X(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;
1if(n&&we(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bc(e){return`composedPath`in e?e.composedPath()[0]:e.target}function xc(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Sc(e){return e.matches(`html,body`)}function Cc(e){return he(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function wc(e){return e?e.getAttribute(`role`)===`combobox`&&Cc(e):!1}function Tc(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ec(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Ec(e,t.id,n)])}function Dc(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Oc(e){e.preventDefault(),e.stopPropagation()}function kc(e){return`nativeEvent`in e}function Ac(e){return e.pointerType===``&&e.isTrusted?!0:lc&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function jc(e){return uc?!1:!lc&&e.width===0&&e.height===0||lc&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Mc(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Nc(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Pc(e,t,n){return Math.floor(e/t)!==n}function Fc(e,t){return t<0||t>=e.length}function Ic(e,t){return Rc(e.current,{disabledIndices:t})}function Lc(e,t){return Rc(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Rc(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Uc(e,a,r));return a}function zc(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Uc(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=R(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Uc(e,r,s))return r}};d&&Oc(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Rc(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Rc(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Fc(e,f)&&(f=u)}if(n===`both`){let n=R(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Oc(t),u%o===o-1?r&&(f=Rc(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Rc(e,{startingIndex:u,disabledIndices:s}),r&&Pc(f,o,n)&&(f=Rc(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Pc(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Oc(t),u%o===0?r&&(f=Rc(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Rc(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Pc(f,o,n)&&(f=Rc(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Pc(f,o,n)&&(f=u));let c=R(l/o)===n;Fc(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Rc(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Bc(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>
1r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Vc(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Hc(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Uc(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Gc(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Wc(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Gc(e,t=e?be(e):null){return!e||!e.isConnected||!t||Wc(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}function Kc(e){return e?.ownerDocument||document}var qc=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Jc(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return we(n)?n.host:null}function Yc(e){for(let t of Array.from(e.children))if(z(t)===`summary`)return t;return null}function Xc(e,t){let n=Yc(t);return!!n&&(e===n||X(n,e))}function Zc(e){let t=e?z(e):``;return e!=null&&e.matches(qc)&&(t!==`summary`||e.parentElement!=null&&z(e.parentElement)===`details`&&Yc(e.parentElement)===e)&&(t!==`details`||Yc(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Qc(e){if(!Zc(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Jc(t)){let n=t!==e,r=z(t)===`slot`;if(t.hasAttribute(`inert`)||n&&z(t)===`details`&&!t.open&&!Xc(e,t)||t.hasAttribute(`hidden`)||!r&&!$c(t,n))return!1}return!0}function $c(e,t){let n=be(e);return t?n.display!==`none`:Gc(e,n)}function el(e){let t=e.tabIndex;if(t<0){let t=z(e);
1if(t===`details`||t===`audio`||t===`video`||he(e)&&e.isContentEditable)return 0}return t}function tl(e){if(z(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function nl(e,t){let n=tl(e);if(!n)return!0;let r=t.find(e=>{let t=tl(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=tl(e);return t?.name===n.name&&t.form===n.form})===n}function rl(e){if(he(e)&&z(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return he(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function il(e,t){rl(e).forEach(e=>{Zc(e)&&t.push(e),il(e,t)})}function al(e,t,n){rl(e).forEach(e=>{he(e)&&e.matches(t)&&n.push(e),al(e,t,n)})}function ol(e){return Qc(e)&&el(e)>=0}function sl(e){let t=[];return il(e,t),t.filter(Qc)}function cl(e){let t=sl(e);return t.filter(e=>el(e)>=0&&nl(e,t))}function ll(e,t){let n=cl(e),r=n.length;if(r===0)return;let i=yc(Kc(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ul(e){return ll(Kc(e).body,1)||e}function dl(e){return ll(Kc(e).body,-1)||e}function fl(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!X(n,r)}function pl(e){cl(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ml(e){let t=[];al(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function hl(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function gl(e){let t=bo(_l,e).current;return t.next=e,J(t.effect),t}function _l(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function vl(e){return e==null?e:`current`in e?e.current:e}function yl(e,t=!1,n=!0){let r=Vs();return q((i,a=null)=>{r.cancel();let o=vl(e);if(o==null)return;let s=o,c=()=>{an.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Gs.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function bl(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=q(i),o=yl(r,n,!1);B.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function xl(e){let t=B.useRef(!0);t.current&&(t.current=!1,e())}var Sl=0,Cl=class e{static create(){return new e}currentId=Sl;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Sl,t()},e)}isStarted(){return this.currentId!==Sl}clear=()=>{this.currentId!==Sl&&(clearTimeout(this.currentId),this.currentId=Sl)};disposeEffect=()=>this.clear};function wl(){let e=bo(Cl.create).current;return Ls(e.disposeEffect),e}var Tl={},El={},Dl=``;function Ol(e){if(typeof document>`u`)return!1;let t=Kc(e);return ye(t).innerWidth-t.documentElement.clientWidth>0}function kl(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Kc(e),n=t.documentElement,r=t.body,i=xe(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Al(e){let t=Kc(e),n=t.documentElement,r=t.body,i=xe(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function jl(e){let t=Kc(e),n=t.documentElement,r=t.body,i=ye(n),a=0,o=0,s=!1,c=Bs.create();if(ac&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Tl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Dl=n.style.scrollBehavior,El={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=xe(n)?n:r;if(s=kl(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}
1px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Tl),Object.assign(r.style,El),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Dl)}function d(){u(),c.request(l)}l();let f=hl(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Ml=new class{lockCount=0;restore=null;timeoutLock=Cl.create();timeoutUnlock=Cl.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Kc(e).documentElement,n=ye(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=Go;return}let r=oc||!Ol(e);this.restore=r?Al(e):jl(e)}};function Nl(e=!0,t=null){J(()=>{if(e)return Ml.acquire(t)},[e,t])}function Pl(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Fl={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Il={...Fl,position:`fixed`,top:0,left:0},Ll={...Fl,position:`absolute`},Rl=B.forwardRef(function(e,t){let[n,r]=B.useState();J(()=>{cc&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,V.jsx)(`span`,{...e,ref:t,style:Il,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function zl(e){return`data-base-ui-${e}`}var Bl=0;function Vl(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Bl);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Go;let o=requestAnimationFrame(a);return Bl=o,()=>{Bl===o&&(cancelAnimationFrame(o),Bl=0)}}var Hl={inert:new WeakMap,"aria-hidden":new WeakMap},Ul=`data-base-ui-inert`,Wl={inert:new WeakSet,"aria-hidden":new WeakSet},Gl=new WeakMap,Kl=0;function ql(e){return Wl[e]}function Jl(e){return e?we(e)?e.host:Jl(e.parentNode):null}var Yl=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Jl(t);return e.contains(n)?n:null}).filter(e=>e!=null),Xl=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Zl=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{z(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ql(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=Yl(t,e),u=i?Yl(t,a):[],d=new Set(u),f=i?Zl(t,Xl(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=Hl[o],n=ql(o);c=n,s=e;let r=Yl(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);Zl(t,Xl(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Gl.get(e)||0)+1;Gl.set(e,t),m.push(e),t===1&&e.setAttribute(Ul,``)}),Kl+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Gl.get(e)||0)-1;Gl.set(e,t),t||e.removeAttribute(Ul)}),--Kl,Kl||(Hl.inert=new WeakMap,Hl[`aria-hidden`]=new WeakMap,Wl.inert=new WeakSet,Wl[`aria-hidden`]=new WeakSet,Gl=new WeakMap)}}function $l(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Kc(e[0]).body;return Ql(e,o,n,r,{mark:i,markerIgnoreElements:a})}var eu={style:{transition:`none`}},tu={fallbackAxisSide:`none`},nu={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},ru=B.createContext(null),iu=()=>B.useContext(ru),au=zl(`portal`);function ou(e={}){let{ref:t,container:n,componentProps:r=qo,elementProps:i}=e,a=Ps(),o=iu()?.portalNode,[s,c]=B.useState(null),[l,u]=B.useState(null),d=q(e=>{e!==null&&u(e)}),f=B.useRef(null);J(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(de(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);
1let p=fs(`div`,r,{ref:[t,d],props:[{id:a,[au]:``},i]});return{portalNode:l,portalSubtree:s&&p?an.createPortal(p,s):null}}var su=B.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=ou({container:o,ref:t,componentProps:e,elementProps:c}),d=B.useRef(null),f=B.useRef(null),p=B.useRef(null),m=B.useRef(null),[h,g]=B.useState(null),_=B.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;B.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&fl(e)&&(e.type===`focusin`?_.current&&=(ml(l),!1):(pl(l),_.current=!0))}return Pl(hl(l,`focusin`,e,!0),hl(l,`focusout`,e,!0))},[l,v]),B.useEffect(()=>{!l||y!==!1||(ml(l),_.current=!1)},[y,l]);let x=B.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,V.jsxs)(B.Fragment,{children:[u,(0,V.jsxs)(ru.Provider,{value:x,children:[b&&l&&(0,V.jsx)(Rl,{"data-type":`outside`,ref:d,onFocus:e=>{fl(e,l)?p.current?.focus():dl(h?h.domReference:null)?.focus()}}),b&&l&&(0,V.jsx)(`span`,{"aria-owns":l.id,style:nu}),l&&an.createPortal(a,l),b&&l&&(0,V.jsx)(Rl,{"data-type":`outside`,ref:f,onFocus:e=>{fl(e,l)?m.current?.focus():(ul(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Y(`focu
1s-out`,e.nativeEvent)))}})]})]})});function cu(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var lu=B.createContext(null),uu=B.createContext(null),du=()=>B.useContext(lu)?.id||null,fu=e=>{let t=B.useContext(uu);return e??t};function pu(e,t){let n=ye(bc(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var mu=20,hu=[];function gu(){hu=hu.filter(e=>e.deref()?.isConnected)}function _u(e){gu(),e&&z(e)!==`body`&&(hu.push(new WeakRef(e)),hu.length>mu&&(hu=hu.slice(-20)))}function vu(){return gu(),hu[hu.length-1]?.deref()}function yu(e){return e?ol(e)?e:cl(e)[0]||e:null}function bu(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=sl(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return ol(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function xu(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=q(()=>b.current.floatingContext?.nodeId),S=i===!1,C=wc(_)&&S,w=B.useRef([`content`]),T=gl(i),E=gl(a),D=gl(l),O=fu(p),k=iu(),A=B.useRef(!1),j=B.useRef(!1),M=B.useRef(!1),N=B.useRef(null),P=B.useRef(``),F=B.useRef(``),I=B.useRef(null),L=B.useRef(null),ee=Fo(I,f,k?.beforeInsideRef),te=Fo(L,k?.afterInsideRef),ne=wl(),re=wl(),ie=Vs(),ae=k!=null,R=Tc(v),oe=q((e=R)=>e?cl(e):[]),se=q(()=>m?.().filter(e=>e!=null)??[]);B.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&X(R,yc(Kc(R)))&&oe().length===0&&!C&&Oc(e)}return hl(Kc(R),`keydown`,e)},[r,R,s,C,oe]),B.useEffect(()=>{if(r||!g)return;let e=Kc(R);function t(){M.current=!1}function n(e){let t=bc(e),n=se();M.current=!(X(v,t)||X(_,t)||X(k?.portalNode,t)||n.some(e=>e===t||X(e,t))),F.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0)}function i(){F.current=`keyboard`}return Pl(hl(e,`pointerdown`,n,!0),hl(e,`pointerup`,t,!0),hl(e,`pointercancel`,t,!0),hl(e,`keydown`,i,!0))},[r,v,_,R,g,k,se]),B.useEffect(()=>{if(r||!c)return;let e=Kc(R);function t(){j.current=!0,re.start(0,()=>{j.current=!1})}function n(e){let t=bc(e);ol(t)&&(N.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=bc(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=se(),f=n?.hasAttribute(zl(`focus-guard`))&&[I.current,L.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,vl(d),vl(u)].includes(n),p=!(X(_,n)||X(v,n)||X(n,v)||X(k?.portalNode,n)||l.some(e=>e===n||X(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>
1X(e,n))||f||O&&(Ec(O.nodesRef.current,a).find(e=>X(e.context?.elements.floating,n)||X(e.context?.elements.domReference,n))||Dc(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Tc(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&R&&bu(R,w),o&&r!==_&&!Gc(i)&&yc(e)===e.body){if(he(R)&&(R.focus(),o===`popup`)){ie.request(()=>{R.focus()});return}let e=oe(),t=N.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||R;he(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==vu())&&(A.current=!0,h.setOpen(!1,Y(Ds,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ne.start(0,()=>{b.current.insideReactTree=!1}))}let l=he(_)?_:null;if(!(!v&&!l))return Pl(l&&hl(l,`focusout`,i),l&&hl(l,`pointerdown`,t),v&&hl(v,`focusin`,n),v&&hl(v,`focusout`,i),v&&k&&hl(v,`focusout`,a,!0))},[r,_,v,R,s,O,k,h,c,o,oe,C,x,w,b,ne,re,ie,u,d,se]),B.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${zl(`portal`)}
1]`)||[]),t=(O?Dc(O.nodesRef.current,x()):[]).find(e=>wc(e.context?.elements.domReference||null))?.context?.elements.domReference,n=$l([v,...e,I.current,L.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...se(),t,vl(d),vl(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=$l([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,se]),J(()=>{if(!g||r||!he(R))return;let e=Kc(R),t=yc(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||X(R,t))return;let i=null,a=()=>(i??=oe(R),i[0]||R),o;o=r===!0||r===null?a():vl(r),o||=a();let s=X(R,yc(e));Vl(o,{preventScroll:o===R,shouldFocus(){if(s)return!0;let t=yc(e);return!(t!==o&&X(R,t))}})})},[r,g,R,oe,T,D]),J(()=>{if(r||!R)return;let e=Kc(R);_u(yc(e));function t(e){if(e.open||(P.current=pu(e.nativeEvent,F.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(Ac(e.nativeEvent)||jc(e.nativeEvent))A.current=!1;else{let e=!1;Kc(R).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(P.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:vu()||null;let n=_?.isConnected?_:vu();return vl(t)||n||null}return()=>{y.off(`openchange`,t);let r=yc(e),i=se(),a=X(v,r)||i.some(e=>e===r||X(e,r))||O&&Ec(O.nodesRef.current,x(),!1).some(e=>X(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=yu(s),n=typeof o!=`boolean`;o&&!A.current&&he(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,R,E,y,O,_,x,se]),J(()=>{if(!ac||g||!v)return;let e=yc(Kc(v));!he(e)||!Cc(e)||X(v,e)&&e.blur()},[g,v]),J(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),J(()=>{if(!(r||!R))return bu(R,w),()=>{queueMicrotask(gu)}},[r,R,w]);let ce=!r&&(s?!C:!0)&&(ae||s);return(0,V.jsxs)(B.Fragment,{children:[ce&&(0,V.jsx)(Rl,{"data-type":`inside`,ref:ee,onFocus:e=>{if(s){let e=oe();Vl(e[e.length-1])}else k?.portalNode&&(A.current=!1,fl(e,k.portalNode)?ul(_)?.focus():vl(d??k.beforeOutsideRef)?.focus())}}),n,ce&&(0,V.jsx)(Rl,{"data-type":`inside`,ref:te,onFocus:e=>{s?Vl(oe()[0]):k?.portalNode&&(c&&(A.current=!0),fl(e,k.portalNode)?dl(_)?.focus():vl(u??k.afterOutsideRef)?.focus())}})]})}function Su(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=ys}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=B.useRef(void 0),f=Vs(),p=wl(),m=B.useMemo(()=>{function e(e,t,n,r){let i=Y(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||Mc(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=bc(o);if(Cc(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}Mc(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return B.useMemo(()=>n?{reference:m}:qo,[n,m])}var Cu={intentional:`onClick`,sloppy:`onPointerDown`};function wu(){return!1}function Tu(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Eu(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=wu,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=fu(l),h=q(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=q(()=>a),{escapeKey:y,outsidePress:b}=Tu(c),x=B.useRef(!1),S=B.useRef(!1),C=B.useRef(!1),w=B.useRef(!1),T=B.useRef(``),E=B.useRef(null),D=wl(),O=wl(),k=q(()=>{O.clear(),p.current.insideReactTree=!1}),A=q(e=>{let t=p.current.floatingContext?.nodeId;
1return(m?Ec(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=q(e=>xc(e,u.select(`floatingElement`))||xc(e,u.select(`domReferenceElement`))),M=q(e=>{o()&&u.setOpen(!1,Y(ys,e.nativeEvent))}),N=q(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=Y(Os,kc(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=q(()=>{p.current.insideReactTree=!0,O.start(0,k)}),F=q(e=>{if(!d||!n||e.button!==0)return;let t=bc(e.nativeEvent);X(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),I=q(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});B.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new Cl,t=new Cl;function i(){e.clear(),w.current=!0}function a(){e.start(fe()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Ec(m.nodesRef.current,t).some(t=>xc(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=bc(e),r=`[${zl(`inert`)}]`,i=_e(n)?n.getRootNode():null,a=Array.from((we(i)?i:Kc(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>X(e,n))))return;let s=_e(n)?n:null;for(;s&&!me(s);){let e=pe(s);if(me(e)||!_e(e))break;s=e}if(!(a.length&&_e(n)&&!Sc(n)&&!X(n,u.select(`floatingElement`))&&a.every(e=>!X(s,e)))){if(he(n)&&!(`touches`in e)){let t=me(n),r=be(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,Y(bs,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function P(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function F(e,t){let n=bc(e);if(!n)return;let r=hl(n,e.type,()=>{t(e),r()})}function I(e){T.current=`touch`,F(e,P)}function L(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&F(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function ee(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function te(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function ne(e){F(e,te)}function re(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function ie(e){F(e,re)}let ae=Kc(f),R=Pl(r&&Pl(hl(ae,`keydown`,N),hl(ae,`compositionstart`,i),hl(ae,`compositionend`,a)),_&&Pl(hl(ae,`click`,L,!0),hl(ae,`pointerdown`,L,!0),hl(ae,`pointerup`,ee,!0),hl(ae,`pointercancel`,ee,!0),hl(ae,`mousedown`,L,!0),hl(ae,`mouseup`,ee,!0),hl(ae,`touchstart`,I,!0),hl(ae,`touchmove`,ne,!0),hl(ae,`touchend`,ie,!0)));return()=>{R(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,N,k,v,A,j,m,u,D]),B.useEffect(k,[g,k]);let L=B.useMemo(()=>({onKeyDown:N,[Cu[s]]:M,...s!==`intentional`&&{onClick:M}}),[N,M,s]),ee=B.useMemo(()=>({onKeyDown:N,onPointerDown:I,onMouseDown:I,onClickCapture:P,onMouseDownCapture(e){P(),F(e)},onPointerDownCapture(e){P(),F(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,F,I]);return B.useMemo(()=>n?{reference:L,floating:ee,trigger:L}:{},[n,L,ee])}var Z=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(Po(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);
1else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Du=[],Ou=void 0;function ku(){return Ou}function Au(e){Du.push(e)}var ju=Ho(19)?Nu:Pu;function Q(e,t,n,r,i){return ju(e,t,n,r,i)}function Mu(e,t,n,r,i){let a=B.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,on.useSyncExternalStore)(e.subscribe,a,a)}Au({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,on.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Nu(e,t,n,r,i){let a=ku();if(!a)return Mu(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Pu(e,t,n,r,i){return(0,sn.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Fu=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Q(this,e,t,n,r)}},Iu=class extends Fu{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){B.useDebugValue(e);let n=this;J(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;J(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;J(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){B.useDebugValue(e);let n=this,r=t!==void 0;J(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return B.useDebugValue(e),Q(this,this.selectors[e],t,n,r)}useContextCallback(e,t){B.useDebugValue(e);let n=q(t??Go);this.context[e]=n}useStateSetter(e){let t=B.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Lu={open:Z(e=>e.open),transitionStatus:Z(e=>e.transitionStatus),domReferenceElement:Z(e=>e.domReferenceElement),referenceElement:Z(e=>e.positionReference??e.referenceElement),floatingElement:Z(e=>e.floatingElement),floatingId:Z(e=>e.floatingId)},Ru=class extends Iu{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:cu(),nested:n,triggerElements:i},Lu),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Nc(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>
1{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}},zu={tabIndex:-1,[mc]:``},Bu=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Vu(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Ps(),a=du()!=null,o=bo(()=>new Ru({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Bu,floatingId:i,syncOnly:!1,nested:a})).current;return J(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=_e(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Hu(e={}){let{nodeId:t,externalTree:n}=e,r=Vu(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=B.useState(null),[f,p]=B.useState(void 0),[m,h]=B.useState(void 0),g=B.useRef(null),_=fu(n),v=B.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=L({...e,elements:{...v,...u&&{reference:u}}}),b=_e(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=B.useCallback(e=>{let t=_e(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=B.useCallback(e=>{(_e(e)||e===null)&&(g.current=e,p(e)),(_e(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!_e(e))&&y.refs.setReference(e)},[y.refs,p]),w=B.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=B.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=B.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=B.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return J(()=>{s&&(g.current=s)},[s]),J(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),B.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var Uu=`Escape`;function Wu(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Gu(e,t){return Wu(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ku(e,t,n){return Wu(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function qu(e,t,n){return Wu(t,n?e===hc:e===gc,e===vc)}function Ju(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Uu:Wu(t,n?e===gc:e===hc,e===_c)}function Yu(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,cols:v=1,id:y,resetOnPointerLeave:b=!0,externalTree:x}=t,S=`rootStore`in e?e.rootStore:e,C=S.useState(`open`),w=S.useState(`floatingElement`),T=S.useState(`domReferenceElement`),E=S.context.dataRef,D=Tc(w),O=wc(T),k=gl(D),A=du(),j=fu(x),M=B.useRef(f),N=B.useRef(o??-1),P=B.useRef(null),F=B.useRef(!0),I=q(e=>{i(N.current===-1?null:N.current,e)}),L=B.useRef(I),ee=B.useRef(!!w),te=B.useRef(C),ne=B.useRef(!1),re=B.useRef(!1),ie=B.useRef(null),ae=gl(h),R=gl(C),oe=gl(o),se=gl(b),ce=Vs(),le=Vs(),ue=q(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):ie.current=Vl(e,{sync:ne.current,preventScroll:!0})}let t=n.current[N.current],r=re.current;t&&e(t),(ne.current?e=>e():e=>ce.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),ge&&(r||!F.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});J(()=>{E.current.orientation=g},[E,g]),J(()=>{a&&(C&&w?(N.current=o??-1,M.current&&o!=null&&(re.current=!0,I())):ee.current&&(N.current=-1,L.current()))},[a,C,w,o,I]),J(()=>{if(a){if(!C){ne.current=!1;return}if(w)if(r==null){if(ne.current=!1,oe.current!=null)return;if(ee.current&&(N.current=-1,ue()),(!te.current||!ee.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>le.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||Ku(P.current,g,u)||l?Ic(n):Lc(n),P.current=null,I())};t()}}else Fc(n.current,r)||(N.current=r,ue(),re.current=!1)}},[a,C,w,r,oe,l,n,g,u,I,ue,le]),J(()=>{if(!a||w||!j||d||!ee.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=yc(Kc(w)),r=e.some(e=>e.context&&X(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[a,w,j,A,d]),J(()=>{L.current=I,te.current=C,ee.current=!!w}),J(()=>{C||(P.current=null,M.current=f)},[C,f]);let de=r!=null,fe=q(e=>{if(!R.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,I(e))}),z=q(()=>_??j?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation),pe=q(()=>Ic(n,ae.current)),me=q(e=>{if(F.current=!1,ne.current=!0,e.which===229||!R.current&&e.currentTarget===k.current)return;if(l&&Ju(e.key,g,u,v)){Gu(e.key,z())||Oc(e),S.setOpen(!1,Y(ks,e.nativeEvent)),he(T)&&(d?j?.events.emit(`virtualfocus`,T):T.focus());return}let t=N.current,r=Ic(n,h),i=Lc(n,h);if(O||(e.key===`Home`&&(Oc(e),N.current=r,I(e)),e.key===`End`&&(Oc(e),N.current=i,I(e))),v>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),a=Bc(t,v,!1),o=a.findIndex(e=>e!=null&&!Uc(n.current,e,h)),s=a.reduce((e,t,r)=>t!=null&&!Uc(n.current,t,h)?r:e,-1),l=a[zc(a.map(e=>e==null?null:n.current[e]),{event:e,orientation:g,loopFocus:c,rtl:u,cols:v,disabledIndices:Hc([...(typeof h==`function`?null:h)||n.current.map((e,t)=>Uc(n.current,t,h)?t:void 0),void 0],a),minIndex:o,maxIndex:s,prevIndex:Vc(N.current>i?r:N.current,t,a,v,e.key===`ArrowDown`?`bl`:e.key===(u?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(l!=null&&(N.current=l,I(e)),g===`both`)return}if(Gu(e.key,g)){if(Oc(e),C&&!d&&yc(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Ku(e.key,g,u)?r:i,I(e);return}Ku(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(ne.current=!1,N.current=r):N.current=Rc(n.current,{startingIndex:t,disabledIndices:h}
1):N.current=Math.min(i,Rc(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(ne.current=!1,N.current=i):N.current=Rc(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,Rc(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),Fc(n.current,N.current)&&(N.current=-1),I(e)}}),ge=B.useMemo(()=>({onFocus(e){ne.current=!0,fe(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){ne.current=!0,re.current=!1,p&&fe(e)},onPointerLeave(e){if(!R.current||!F.current||e.pointerType===`touch`)return;ne.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&se.current&&(ie.current?.(),ie.current=null,N.current=-1,I(e),!d)){let e=k.current,t=yc(Kc(e));e&&X(e,t)&&e.focus({preventScroll:!0})}}}),[fe,R,k,p,n,I,se,d]),_e=B.useMemo(()=>d&&C&&de&&{"aria-activedescendant":`${y}-${r}`},[d,C,de,y,r]),ve=B.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...O?{}:_e,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&C&&!d){let t=bc(e.nativeEvent);if(t&&!X(k.current,t))return;Oc(e),S.setOpen(!1,Y(Ds,e.nativeEvent)),he(T)&&T.focus();return}me(e)},onPointerMove(){F.current=!0}}),[_e,me,k,g,O,S,C,d,T]),ye=B.useMemo(()=>{function e(e){S.setOpen(!0,Y(ks,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Ac(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&jc(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=S.select(`open`);F.current=!1;let r=t.key.startsWith(`Arrow`),i=qu(t.key,z(),u),a=Gu(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return me(t);if(!(!n&&!m&&r)){if(o){let e=Gu(t.key,z());P.current=l&&e?null:t.key}if(l){i&&(Oc(t),n?(N.current=pe(),I(t)):e(t));return}a&&(oe.current!=null&&(N.current=oe.current),Oc(t),!n&&m?e(t):me(t),n&&I(t))}},onFocus(e){S.select(`open`)&&!d&&(N.current=-1,I(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[me,f,pe,l,I,S,m,g,z,u,oe,d]),be=B.useMemo(()=>({..._e,...ye}),[_e,ye]);return B.useMemo(()=>a?{reference:be,floating:ve,item:ge,trigger:ye}:{},[a,be,ve,ye,ge])}function Xu(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,onTyping:o,enabled:s=!0,resetMs:c=750,selectedIndex:l=null}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=wl(),p=B.useRef(``),m=B.useRef(l??i??-1),h=B.useRef(null),g=q(e=>{function t(e){let t=r?.current[e];return!t||Gc(t)}function s(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let u=n.current;if(p.current.length>0&&e.key===` `&&(Oc(e),o?.(!0)),p.current.length>0&&p.current[0]!==` `&&s(u,p.current)===-1&&e.key!==` `&&o?.(!1),u==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;d&&e.key!==` `&&(Oc(e),o?.(!0));let g=p.current===``;g&&(m.current=l??i??-1),u.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&p.current===e.key&&(p.current=``,m.current=h.current),p.current+=e.key,f.start(c,()=>{p.current=``,m.current=h.current,o?.(!1)});let _=((g?l??i??-1:m.current)??0)+1,v=s(u,p.current,_);v===-1?e.key!==` `&&(p.current=``,o?.(!1)):(a?.(v),h.current=v)}),_=q(e=>{let t=e.relatedTarget,n=u.select(`domReferenceElement`),r=u.select(`floatingElement`);X(n,t)||X(r,t)||(f.clear(),p.current=``,m.current=h.current,o?.(!1))});J(()=>{!d&&l!==null||(f.clear(),h.current=null,p.current!==``&&(p.current=``))},[d,l,f]),J(()=>{d&&p.current===``&&(m.current=l??i??-1)},[d,l,i]);let v=B.useMemo(()=>({onKeyDown:g,onBlur:_}),[g,_]);return B.useMemo(()=>s?{reference:v,floating:v}:{},[s,v])}var Zu=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Gs.startingStyle]=`startingStyle`,e[e.endingStyle=Gs.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Qu=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),$u={[Qu.popupOpen]:``},ed={[Qu.popupOpen]:``,[Qu.pressed]:``},td={[Zu.open]:``},nd={[Zu.closed]:``},rd={[Zu.anchorHidden]:``},id={open(e){return e?$u:null}},ad={open(e){return e?ed:null}},od={open(e){return e?td:nd},anchorHidden(e){return e?rd:null}};function sd(e){return Ho(19)?e:e?`true`:void 0}var cd=B.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,V.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function ld(e){let t=B.useRef(``),n=B.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:B.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ud(e,t){let n=B.useRef(e),r=q(t);J(()=>{n.current!==e&&r(n.current)},[e,r]),J(()=>{n.current=e},[e])}function dd(e,t){let{onClick:n,onPointerDown:r}=ld(q((n,r)=>{(typeof e==`function`?e():e)||t(r||(oc?`touch`:``))}));return B.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function fd(e){let[t,n]=B.useState(null),r=dd(e,n);return ud(e,t=>{t&&!e&&n(null)}),B.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var pd=B.createContext(void 0),md=B.createContext(void 0),hd=B.createContext(void 0),gd=B.createContext(``);function _d(){let e=B.useContext(pd);if(!e)throw Error(Po(22));return e}function vd(){let e=B.useContext(md);if(!e)throw Error(Po(23));return e}function yd(){let e=B.useContext(hd);if(!e)throw Error(Po(24));return e}function bd(){return B.useContext(gd)}var xd=(e,t)=>Object.is(e,t);
1function Sd(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Cd(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Sd(t,e,n))}function wd(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Sd(e,t,n))}function Td(e,t,n){return e.filter(e=>!Sd(t,e,n))}function Ed(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Dd(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Od(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Dd(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 kd(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 Ed(e)}function Ad(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Ed(e.value):Ed(e)}var $={id:Z(e=>e.id),labelId:Z(e=>e.labelId),items:Z(e=>e.items),selectedValue:Z(e=>e.selectedValue),hasSelectionChips:Z(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Z(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Z((e,t)=>t?Od(e.items):!1),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMounted:Z(e=>e.forceMounted),inline:Z(e=>e.inline),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>Sd(t,e,n)):Sd(t,r,n)}),transitionStatus:Z(e=>e.transitionStatus),popupProps:Z(e=>e.popupProps),inputProps:Z(e=>e.inputProps),triggerProps:Z(e=>e.triggerProps),itemProps:Z(e=>e.itemProps),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),triggerElement:Z(e=>e.triggerElement),inputElement:Z(e=>e.inputElement),inputGroupElement:Z(e=>e.inputGroupElement),popupSide:Z(e=>e.popupSide),openMethod:Z(e=>e.openMethod),inputInsidePopup:Z(e=>e.inputInsidePopup),inputOwnsFormValue:Z(e=>e.inputOwnsFormValue),selectionMode:Z(e=>e.selectionMode),name:Z(e=>e.name),form:Z(e=>e.form),disabled:Z(e=>e.disabled),readOnly:Z(e=>e.readOnly),required:Z(e=>e.required),grid:Z(e=>e.grid),virtualized:Z(e=>e.virtualized),itemToStringLabel:Z(e=>e.itemToStringLabel),isItemEqualToValue:Z(e=>e.isItemEqualToValue),modal:Z(e=>e.modal),autoHighlight:Z(e=>e.autoHighlight),submitOnItemClick:Z(e=>e.submitOnItemClick)},jd=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Md={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Nd={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Pd={disabled:!1,...Nd},Fd={valid(e){return e===null?null:e?{[jd.valid]:``}:{[jd.invalid]:``}}},Id={invalid:void 0,name:void 0,validityData:{state:Md,errors:[],error:``,value:``,initialValue:null},setValidityData:Go,disabled:void 0,touched:Nd.touched,setTouched:Go,dirty:Nd.dirty,setDirty:Go,filled:Nd.filled,setFilled:Go,focused:Nd.focused,setFocused:Go,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Pd,markedDirtyRef:{current:!1},registerFieldControl:Go,validation:{getValidationProps:(e=qo)=>e,getInputValidationProps:(e=qo)=>e,inputRef:{current:null},commit:async()=>{}}},Ld=B.createContext(Id);function Rd(e=!0){let t=B.useContext(Ld);if(t.setValidityData===Go&&!e)throw Error(Po(28));return t}function zd(e,t,n,r,i=!0){let{registerFieldControl:a}=Rd(),o=B.useRef(null);o.current||=Symbol(),J(()=>{let s=o.current;if(!(!s||!i))return a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)}},[e,i,r,t,a,n])}var Bd=B.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Go,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Vd(){return B.useContext(Bd)}var Hd=B.createContext({controlId:void 0,registerControlId:Go,labelId:void 0,setLabelId:Go,messageIds:[],setMessageIds:Go,getDescriptionProps:e=>e});function Ud(){return B.useContext(Hd)}function Wd(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=Ud(),o=Fs(t),s=n?i:void 0,c=bo(()=>Symbol(`labelable-control`)),l=B.useRef(!1),u=B.useRef(t!=null),d=q(()=>{!l.current||a===Go||(l.current=!1,a(c.current,void 0))});return J(()=>{if(a===Go)return;let e;if(n){let n=r?.current;e=_e(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),B.useEffect(()=>d,[d]),i??o}function Gd(e,t){return(n,r)=>{if(n==null)return!1;let i=kd(n,t);return e.contains(i,r)}}function Kd(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=kd(r,t),o=n==null?``:kd(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var qd=new Map;function Jd(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${Yd(e.locale)}|${JSON.stringify(t)}`,r=qd.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;
1let r=kd(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=kd(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=kd(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return qd.set(n,a),a}function Yd(e){return Array.isArray(e)?e.map(e=>Yd(e)).join(`,`):e==null?``:String(e)}var Xd=Jd,Zd=Symbol(`none`),Qd={value:Zd,index:-1};function $d(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u=`none`,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:v=!1,items:y,filteredItems:b,filter:x,openOnInputClick:S=!0,autoHighlight:C=!1,keepHighlight:w=!1,highlightItemOnHover:T=!0,loopFocus:E=!0,itemToStringLabel:D,itemToStringValue:O,isItemEqualToValue:k=xd,virtualized:A=!1,inline:j=!1,fillInputOnItemPress:M=!0,modal:N=!1,limit:P=-1,autoComplete:F=`list`,formAutoComplete:I,locale:L,submitOnItemClick:ee=!1}=e,{clearErrors:te}=Vd(),{setDirty:ne,validityData:re,shouldValidateOnChange:ie,setFilled:ae,name:R,disabled:oe,setTouched:se,setFocused:ce,validationMode:le,validation:ue}=Rd(),de=Mo(),fe=Wd({id:t}),z=Xd({locale:L}),[pe,me]=B.useState(!1),[he,ge]=B.useState(null),_e=B.useRef([]),ve=B.useRef([]),ye=B.useRef(null),be=B.useRef(null),xe=B.useRef(null),Se=B.useRef(null),Ce=B.useRef(null),we=B.useRef(!0),Te=B.useRef(!1),Ee=B.useRef(null),De=B.useRef(null),Oe=B.useRef(null),ke=B.useRef(Qd),Ae=B.useRef(null),je=B.useRef([]),Me=B.useRef([]),Ne=oe||m,Pe=R??f,Fe=u===`multiple`,Ie=u===`single`,Le=s!==void 0||o!==void 0,Re=y!==void 0,ze=b!==void 0,Be;Be=C===`always`?`always`:C?`input-change`:!1;let[H,Ve]=_o({controlled:i,default:Fe?r??Ko:r,name:`Combobox`,state:`selectedValue`}),He=B.useMemo(()=>x===null?()=>!0:x===void 0?Ie&&!pe?Kd(z,D,H):Gd(z,D):x,[x,Ie,H,pe,z,D]),Ue=bo(()=>Le?o??``:Ie?kd(H,D):``).current,[We,Ge]=_o({controlled:s,default:Ue,name:`Combobox`,state:`inputValue`}),[Ke,qe]=_o({controlled:c,default:l,name:`Combobox`,state:`open`}),Je=Dd(y),Ye=he??(We===``?``:String(We).trim()),Xe=Ie?kd(H,D):``,Ze=Ie&&!pe&&Ye!==``&&Xe!==``&&Xe.length===Ye.length&&z.contains(Xe,Ye),Qe=Ze?``:Ye,$e=Re&&ze&&Ze,et=B.useMemo(()=>y?Je?y.flatMap(e=>e.items):y:Ko,[y,Je]),tt=B.useMemo(()=>{if(b&&!$e)return b;if(!y)return Ko;if(Je){let e=y,t=[],n=0;for(let r of e){if(P>-1&&n>=P)break;let e=Qe===``?r.items:r.items.filter(e=>He(e,Qe,D));if(e.length===0)continue;let i=P>-1?P-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Qe===``)return P>-1?et.slice(0,P):et;let e=[];for(let t of et){if(P>-1&&e.length>=P)break;He(t,Qe,D)&&e.push(t)}return e},[b,$e,y,Je,Qe,P,He,D,et]),nt=B.useMemo(()=>Je?tt.flatMap(e=>e.items):tt,[tt,Je]),U=bo(()=>new Fu({id:fe,labelId:void 0,selectedValue:H,open:Ke,filter:He,query:Ye,items:y,selectionMode:u,listRef:_e,labelsRef:ve,popupRef:ye,emptyRef:Ce,inputRef:be,startDismissRef:xe,endDismissRef:Se,keyboardActiveRef:we,chipsContainerRef:Ee,clearRef:De,valuesRef:je,allValuesRef:Me,selectionEventRef:Oe,name:Pe,form:p,disabled:Ne,readOnly:h,required:g,grid:v,isGrouped:Je,virtualized:A,openOnInputClick:S,itemToStringLabel:D,isItemEqualToValue:k,modal:N,autoHighlight:Be,submitOnItemClick:ee,hasInputValue:Le,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:j,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:qo,positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`,onOpenChangeComplete:n||Go,setOpen:Go,setInputValue:Go,setSelectedValue:Go,setIndices:Go,onItemHighlighted:Go,handleSelection:Go,forceMount:Go,requestSubmit:Go})).current,rt=u===`none`?We:H,it=B.useMemo(()=>u===`none`?rt:Array.isArray(H)?H.map(e=>Ad(e,O)):Ad(H,O),[rt,O,u,H]),at=q(d),ot=q(n),st=Q(U,$.activeIndex),ct=Q(U,$.selectedIndex),lt=Q(U,$.positionerElement),ut=Q(U,$.listElement),dt=Q(U,$.triggerElement),ft=Q(U,$.inputElement),pt=Q(U,$.inputGroupElement),mt=Q(U,$.inline),ht=Q(U,$.inputInsidePopup),gt=Q(U,$.inputOwnsFormValue),_t=gl(dt),{mounted:vt,setMounted:yt,transitionStatus:bt}=Hs(Ke),{openMethod:xt,triggerProps:St}=fd(Ke),Ct=q(()=>it);zd(ht?_t:be,fe,rt,Ct);let wt=q(()=>{y?ve.current=nt.map(e=>kd(e,D)):U.set(`forceMounted`,!0)}),Tt=B.useRef(H);J(()=>{H!==Tt.current&&wt()},[wt,H]);let Et=q(e=>{U.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)ke.current!==Qd&&
1(ke.current=Qd,at(void 0,As(t,void 0,{index:-1})));else{let n=je.current[e.activeIndex];ke.current={value:n,index:e.activeIndex},at(n,As(t,void 0,{index:e.activeIndex}))}}),Dt=q((t,n)=>{if(Te.current=n.reason===Ts,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&me(!0),Ae.current={hasQuery:e},e&&Be&&U.state.activeIndex==null&&U.set(`activeIndex`,0)}}Ge(t)}}),Ot=q((t,n)=>{if(Ke!==t&&(n.reason===`escape-key`&&Re&&nt.length===0&&!U.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&Fe&&ht&&!mt&&he!==null&&(me(!1),ge(null),We!==``&&Dt(``,Y(Ts,n.event))),!t&&pe&&(Ie?(mt||ge(Ye),Ye===``&&me(!1)):Fe&&(mt||ge(Ye),ht&&Et({activeIndex:null}),(!ht||mt)&&Dt(``,Y(Ts,n.event)))),qe(t),!t&&ht&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(se(!0),ce(!1),le===`onBlur`)))){let e=u===`none`?We:H;ue.commit(e)}}),kt=q((e,t)=>{a?.(e,t),!t.isCanceled&&(Ve(e),(u===`none`&&ye.current&&M||Ie&&!U.state.inputInsidePopup)&&Dt(kd(e,D),Y(t.reason,t.event)),Ie&&e!=null&&t.reason!==`input-change`&&pe&&!mt&&ge(Ye))}),At=q((e,t)=>
1{let n=t;if(n===void 0){if(st===null)return;n=je.current[st]}let r=bc(e),i=Oe.current??e;Oe.current=null;let a=Y(xs,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&Ot(!1,a);return}if(Fe){let e=Array.isArray(H)?H:[];if(kt(Cd(e,n,U.state.isItemEqualToValue)?Td(e,n,U.state.isItemEqualToValue):[...e,n],a),!(be.current&&be.current.value.trim()!==``))return;U.state.inputInsidePopup?Dt(``,Y(Ts,a.event)):Ot(!1,a)}else kt(n,a),Ot(!1,a)}),jt=q(()=>{if(!U.state.submitOnItemClick)return;let e=ue.inputRef.current?.form??U.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Mt=q(()=>{if(yt(!1),ot?.(!1),me(!1),ge(null),Et(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Fe&&be.current&&be.current.value!==``&&!Te.current&&Dt(``,Y(Ts)),Ie)if(U.state.inputInsidePopup)be.current&&be.current.value!==``&&Dt(``,Y(Ts));else{let e=kd(H,D);be.current&&be.current.value!==e&&Dt(e,Y(e===``?Ts:vs))}}),Nt=B.useMemo(()=>mt&<?{current:lt.closest(`[role="dialog"]`)}:ye,[mt,lt]);bl({enabled:!e.actionsRef,open:Ke,ref:Nt,onComplete(){Ke||Mt()}}),B.useImperativeHandle(e.actionsRef,()=>({unmount:Mt}),[Mt]),J(function(){if(Ke||u===`none`)return;let e=y?et:Me.current;if(Fe){let t=Array.isArray(H)?H:[],n=t[t.length-1],r=wd(e,n,k);Et({selectedIndex:r===-1?null:r})}else{let t=wd(e,H,k);Et({selectedIndex:t===-1?null:t})}},[Ke,H,y,u,et,Fe,k,Et]),J(()=>{y&&(je.current=nt,_e.current.length=nt.length)},[y,nt]),J(()=>{let e=Ae.current;if(e&&(e.hasQuery?Be&&U.set(`activeIndex`,0):Be===`always`&&U.set(`activeIndex`,0),Ae.current=null),!Ke&&!mt)return;let t=Re||ze?nt:je.current,n=U.state.activeIndex;if(n==null){if(Be===`always`&&t.length>0){U.set(`activeIndex`,0);return}ke.current!==Qd&&(ke.current=Qd,U.state.onItemHighlighted(void 0,As(vs,void 0,{index:-1})));return}if(n>=t.length){ke.current!==Qd&&(ke.current=Qd,U.state.onItemHighlighted(void 0,As(vs,void 0,{index:-1}))),U.set(`activeIndex`,null);return}let r=t[n],i=ke.current.value,a=i!==Zd&&Sd(r,i,U.state.isItemEqualToValue);(ke.current.index!==n||!a)&&(ke.current={value:r,index:n},U.state.onItemHighlighted(r,As(vs,void 0,{index:n})))},[st,Be,ze,Re,nt,mt,Ke,U]),J(()=>{if(u===`none`){ae(String(We)!==``);return}ae(Fe?Array.isArray(H)&&H.length>0:H!=null)},[ae,u,We,H,Fe]),B.useEffect(()=>{Re&&Be&&nt.length===0&&Et({activeIndex:null})},[Re,Be,nt.length,Et]),ud(Ye,()=>{!Ke||Ye===``||Ye===String(Ue)||me(!0)}),ud(H,()=>{if(u!==`none`&&(te(Pe),ne(H!==re.initialValue),ie()?ue.commit(H):ue.commit(H,!0),Ie&&!Le&&!ht)){let e=kd(H,D);We!==e&&Dt(e,Y(vs))}}),ud(We,()=>{u===`none`&&(te(Pe),ne(We!==re.initialValue),ie()?ue.commit(We):ue.commit(We,!0))}),ud(y,()=>{if(!Ie||Le||ht||pe)return;let e=kd(H,D);We!==e&&Dt(e,Y(vs))});let Pt=Vu({open:mt?!0:Ke,onOpenChange:Ot,elements:{reference:ht?dt:ft,floating:lt}}),Ft,It;mt||(Ft=v?`grid`:`listbox`,It=Ke?`true`:`false`);let Lt=B.useMemo(()=>{let e=ft?.tagName===`INPUT`,t=ft==null||e,n=t||Ke,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=It,r[`aria-haspopup`]=Ft,r[`aria-controls`]=Ke?ut?.id:void 0,r[`aria-autocomplete`]=F),{reference:r,floating:{role:`presentation`}}},[ft,Ke,It,Ft,ut?.id,F]),Rt=Su(Pt,{enabled:!h&&!Ne&&S,event:`mousedown-only`,toggle:!1,touchOpenDelay:ht?0:100,reason:Es}),zt=Eu(Pt,{enabled:!h&&!Ne&&!mt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:mt?!0:void 0,outsidePress(e){let t=bc(e);return!X(dt,t)&&!X(De.current,t)&&!X(Ee.current,t)&&!X(pt,t)}}),Bt=Yu(Pt,{enabled:!h&&!Ne,id:fe,listRef:_e,activeIndex:st,selectedIndex:ct,virtual:!0,loopFocus:E,allowEscape:E&&!Be,focusItemOnOpen:pe||u===`none`&&!Be?!1:`auto`,focusItemOnHover:T,resetOnPointerLeave:!w,cols:v?2:1,orientation:v?`horizontal`:void 0,rtl:de===`rtl`,disabledIndices:Ko,onNavigate(e,t){!t&&!Ke||bt===`ending`||Et(t?{activeIndex:e,type:we.current?`keyboard`:`pointer`}:{activeIndex:e})}}),Vt=B.useMemo(()=>Qo(Bt.reference,zt.reference,Rt.reference,Lt.reference),[Bt.reference,zt.reference,Rt.reference,Lt.reference]),Ht=B.useMemo(()=>Qo(zu,Bt.floating,zt.floating,Lt.floating),[Bt.floating,zt.floating,Lt.floating]),Ut=B.useMemo(()=>{let e=Bt.item;return e?{...e,onFocus:void 0}:qo},[Bt.item]);xl(()=>{U.update({inline:j,popupProps:Ht,inputProps:Vt,triggerProps:St,itemProps:Ut,setOpen:Ot,setInputValue:Dt,setSelectedValue:kt,setIndices:Et,onItemHighlighted:at,handleSelection:At,forceMount:wt,requestSubmit:jt})}),J(()=>{U.update({id:fe,selectedValue:H,open:Ke,mounted:vt,transitionStatus:bt,items:y,inline:j,popupProps:Ht,inputProps:Vt,triggerProps:St,openMethod:xt,itemProps:Ut,selectionMode:u,name:Pe,form:p,disabled:Ne,readOnly:h,required:g,grid:v,isGrouped:Je,virtualized:A,onOpenChangeComplete:ot,openOn
1InputClick:S,itemToStringLabel:D,modal:N,autoHighlight:Be,isItemEqualToValue:k,submitOnItemClick:ee,hasInputValue:Le,requestSubmit:jt,inputOwnsFormValue:u===`none`&&(j||!U.state.inputInsidePopup)})},[U,fe,H,Ke,vt,bt,y,Ht,Vt,Ut,xt,St,u,Pe,Ne,h,g,ue,v,Je,A,ot,S,D,N,k,ee,Le,j,jt,Be,p]);let Wt=Fo(_,ue.inputRef),Gt=B.useMemo(()=>({query:Ye,hasItems:Re,filteredItems:tt,flatFilteredItems:nt}),[Ye,Re,tt,nt]),Kt=B.useMemo(()=>Array.isArray(rt)?``:Ad(rt,O),[rt,O]),qt=Fe&&Array.isArray(H)&&H.length>0,Jt=Fe||u===`none`&>?void 0:Pe,Yt=B.useMemo(()=>!Fe||!Array.isArray(H)||!Pe?null:H.map(e=>{let t=Ad(e,O);return(0,V.jsx)(`input`,{type:`hidden`,form:p,name:Pe,value:t},t)}),[Fe,H,p,Pe,O]),Xt=(0,V.jsxs)(B.Fragment,{children:[e.children,(0,V.jsx)(`input`,{...ue.getInputValidationProps({onFocus(){if(ht){dt?.focus();return}(be.current||dt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Ne||h){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=Y(vs,e.nativeEvent);function r(){if(Fe)return;if(u===`none`){ne(t!==re.initialValue),Dt(t,n),ie()&&ue.commit(t);return}let e=je.current.find(e=>Ad(e,O).toLowerCase()===t.toLowerCase()||kd(e,D).toLowerCase()===t.toLowerCase());e!=null&&(ne(e!==re.initialValue),kt?.(e,n),ie()&&ue.commit(e))}y?r():(wt(),queueMicrotask(r))}}),id:fe&&Jt==null?`${fe}-hidden-input`:void 0,form:p,name:Jt,autoComplete:I,disabled:Ne,required:g&&!qt,readOnly:h,value:Kt,ref:Wt,style:Jt?Ll:Il,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Yt]});return(0,V.jsx)(pd.Provider,{value:U,children:(0,V.jsx)(md.Provider,{value:Pt,children:(0,V.jsx)(hd.Provider,{value:Gt,children:(0,V.jsx)(gd.Provider,{value:We,children:Xt})})})})}var ef={...ad,...Fd,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null};function tf(e){let t=e.getBoundingClientRect(),n=ye(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function nf(e,t){return e??t}var rf=2,af=B.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=Rd(),{labelId:h}=Ud(),g=_d(),{filteredItems:_}=yd(),v=Q(g,$.selectionMode),y=Q(g,$.disabled),b=Q(g,$.readOnly),x=Q(g,$.required),S=Q(g,$.mounted),C=Q(g,$.popupSide),w=Q(g,$.positionerElement),T=Q(g,$.listElement),E=Q(g,$.triggerProps),D=Q(g,$.triggerElement),O=Q(g,$.inputInsidePopup),k=Q(g,$.id),A=Q(g,$.labelId),j=Q(g,$.open),M=Q(g,$.selectedValue),N=Q(g,$.activeIndex),P=Q(g,$.selectedIndex),F=Q(g,$.hasSelectedValue),I=vd(),L=bd(),ee=wl(),te=u||y||a,ne=_.length===0,re=S&&w?C:null;Wd({id:O?o:void 0});let ie=O?o??k:o,ae=nf(h,A),R=B.useRef(``);function oe(e){R.current=e.pointerType}let se=I.useState(`domReferenceElement`);B.useEffect(()=>{O&&D&&D!==se&&I.set(`domReferenceElement`,D)},[D,se,I,O]);let{reference:ce}=Xu(I,{enabled:!j&&!b&&!y&&v===`single`,listRef:g.state.labelsRef,activeIndex:N,selectedIndex:P,onMatch(e){let t=g.state.valuesRef.current[e];t!==void 0&&g.state.setSelectedValue(t,Y(`none`))}}),{reference:le}=Su(I,{enabled:!b&&!y,event:`mousedown`}),{buttonRef:ue,getButtonProps:de}=Qs({native:i,disabled:te}),fe={...l,open:j,disabled:te,popupSide:re,listEmpty:ne,placeholder:v===`none`?!1:!F};return fs(`button`,e,{ref:[t,ue,q(e=>{g.set(`triggerElement`,e)})],state:fe,props:[E,le,ce,{id:ie,tabIndex:O?0:-1,role:O?`combobox`:void 0,"aria-expanded":j?`true`:`false`,"aria-haspopup":O?`dialog`:`listbox`,"aria-controls":j?T?.id:void 0,"aria-required":O&&x||void 0,"aria-labelledby":ae,onPointerDown:oe,onPointerEnter:oe,onFocus(){f(!0),!(te||b)&&ee.start(0,g.state.forceMount)},onBlur(e){if(!X(w,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=v===`none`?L:M;m.commit(e)}},onMouseDown(e){if(te||b||(O||I.set(`domReferenceElement`,e.currentTarget),g.state.forceMount(),R.current!==`touch`&&(g.state.inputRef.current?.focus(),O||e.preventDefault()),j))return;let t=Kc(e.currentTarget);function n(e){if(!D)return;let t=bc(e),n=g.state.positionerElement,r=g.state.listElement;if(X(D,t)||X(n,t)||X(r,t)||t===D)return;let i=tf(D),a=e.clientX>=i.left-rf&&e.clientX<=i.right+rf,o=e.clientY>
1=i.top-rf&&e.clientY<=i.bottom+rf;a&&o||g.state.setOpen(!1,Y(`cancel-open`,e))}O&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){te||b||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(Oc(e),g.state.setOpen(!0,Y(ks,e.nativeEvent)),g.state.inputRef.current?.focus())}},m?m.getValidationProps(c):c,de],stateAttributesMapping:ef})}),of=B.createContext(void 0);function sf(){return B.useContext(of)}var cf=B.createContext(void 0);function lf(e){let t=B.useContext(cf);if(t===void 0&&!e)throw Error(Po(21));return t}var uf=B.forwardRef(function(e,t){let n=_d(),{buttonRef:r,getButtonProps:i}=Qs({native:!1}),a=Fo(t,r);function o(e){n.state.setOpen(!1,Y(Ss,e.nativeEvent,e.currentTarget))}return(0,V.jsx)(`span`,{ref:a,...i({onClick:o}),"aria-label":`Dismiss`,tabIndex:void 0,style:Ll})}),df=B.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=Rd(),{labelId:m}=Ud(),h=sf(),g=!!lf(!0),_=_d(),{filteredItems:v}=yd(),y=bd(),b=Mo(),x=Q(_,$.required),S=Q(_,$.disabled),C=Q(_,$.readOnly),w=Q(_,$.name),T=Q(_,$.form),E=Q(_,$.selectionMode),D=Q(_,$.autoHighlight),O=Q(_,$.inputProps),k=Q(_,$.triggerProps),A=Q(_,$.open),j=Q(_,$.mounted),M=Q(_,$.selectedValue),N=Q(_,$.popupSide),P=Q(_,$.positionerElement),F=Q(_,$.id),I=Q(_,$.inline),L=Q(_,$.modal),ee=!!D,te=j&&P?N:null,ne=l||S||i,re=v.length===0,ie=g||I,ae=!ie||L,R=Fs(a??(ie?void 0:F)),oe=nf(m,void 0),se=g?Nd:c,[ce,le]=B.useState(null),ue=B.useRef(!1),de=B.useRef(null),fe=B.useRef(!1),z=E===`none`&&!g,pe=q(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.state.setInputValue(``,Y(vs)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:z})}),me=g||!p?s:p.getValidationProps(s),he={...se,open:A,disabled:ne,readOnly:C,popupSide:te,listEmpty:re};function ge(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,i=b===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=M.length-1?M.length-2:n;t=r>=0?r:void 0,_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&M.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&M.length>0&&(_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let _e=fs(`input`,e,{state:he,ref:[t,_.state.inputRef,pe],props:[O,k,{type:`text`,value:e.value??ce??y,"aria-readonly":C||void 0,"aria-required":x||void 0,"aria-labelledby":oe,disabled:ne,readOnly:C,required:E===`none`?x:void 0,form:T,...z&&w&&{name:w},id:R,onFocus(){if(d(!0),!I||!fe.current)return;fe.current=!1;let e=de.current;e==null||!Object.hasOwn(_.state.valuesRef.current,e)||_.state.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=_.state.activeIndex;if(I&&e!==null&&D!==`always`&&(de.current=e,fe.current=!0,_.state.setIndices({activeIndex:null})),f===`onBlur`){let e=E===`none`?y:M;p.commit(e)}},onCompositionStart(e){lc||(ue.current=!0,le(e.currentTarget.value))},onCompositionEnd(e){ue.current=!1;let t=e.currentTarget.value;le(null),_.state.setInputValue(t,Y(ws,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=ue.current||!n;if(ue.current){let t=e.currentTarget.value;le(t),t===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.state.setOpen(!1,Y(Ts,e.nativeEvent));let n=t.trim(),i=ee&&n!==``;!C&&!ne&&n&&r&&(_.state.setOpen(!0,Y(ws,e.nativeEvent)),ee||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),A&&_.state.activeIndex!==null&&!i&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}_.state.setInputValue(e.currentTarget.value,Y(ws,e.nativeEvent));let i=e.currentTarget.value===``,a=Y(Ts,e.nativeEvent);i&&!_.state.inputInsidePopup&&(E===`single`&&_.state.setSelectedValue(null,a),_.state.openOn
1InputClick||_.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!C&&!ne&&o&&r&&(_.state.setOpen(!0,Y(ws,e.nativeEvent)),ee||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),A&&_.state.activeIndex!==null&&!ee&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(ne||C||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;_.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){Oc(e);let n=sc&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Oc(e);let i=sc&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!j&&e.key===`Escape`){let t=E===`multiple`&&Array.isArray(M)?M.length===0:M===null,n=Y(Os,e.nativeEvent),r=E===`multiple`?[]:null;_.state.setInputValue(``,n),_.state.setSelectedValue(r,n),!t&&!_.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(M)&&M.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:M.length-1,r=M.filter((e,t)=>t!==n);_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`}),_.state.setSelectedValue(r,Y(vs,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=ge(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&_.state.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&A){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(I)return;_.state.setOpen(!1,Y(vs,n));return}Oc(e);let r=_.state.listRef.current[t];r&&(_.state.selectionEventRef.current=n,r.click(),_.state.selectionEventRef.current=null)}},onPointerMove(){_.state.keyboardActiveRef.current=!1},onPointerDown(){_.state.keyboardActiveRef.current=!1}},me],stateAttributesMapping:ef}),ve=g?(0,V.jsx)(Ld.Provider,{value:Id,children:_e}):_e;return(0,V.jsxs)(B.Fragment,{children:[A&&ae&&(0,V.jsx)(uf,{ref:_.state.startDismissRef}),ve]})}),ff={...Js,...id},pf=B.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Rd(),u=_d(),d=Q(u,$.selectionMode),f=Q(u,$.disabled),p=Q(u,$.readOnly),m=Q(u,$.open),h=Q(u,$.selectedValue),g=Q(u,$.hasSelectionChips),_=bd(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=Qs({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=Hs(v),T={disabled:y,visible:v,open:m,transitionStatus:C};bl({open:v,ref:u.state.clearRef,onComplete(){v||w(!1)}});let E=fs(`button`,e,{state:T,ref:[t,b,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,Y(Cs,e.nativeEvent)),d===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(h)?[]:null,Y(Cs,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,x],stateAttributesMapping:ff});return o||S?E:null}),mf=B.createContext(null);function hf(){return B.useContext(mf)}function gf(e){let{children:t}=e,{filteredItems:n}=yd(),r=hf(),i=r?r.items:n;return i?(0,V.jsx)(B.Fragment,{children:i.map(t)}):null}var _f=B.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=_d(),l=vd(),u=!!lf(!0),{filteredItems:d,hasItems:f}=yd(),p=Q(c,$.selectionMode),m=Q(c,$.grid),h=Q(c,$.popupProps),g=Q(c,$.virtualized),_=p===`multiple`,v=d.length===0,y=q(e=>{c.set(`positionerElement`,e)}),b=q(e=>{c.set(`listElement`,e)}),x=B.useMemo(()=>typeof o==`function`?n||=(0,V.jsx)(gf,{children:o}):o,[o]),S={empty:v},C=l.useState(`floatingId`),w=fs(`div`,e,{state:S,ref:[t,b,u?null:y],props:[h,{children:x,tabIndex:-1,id:C,role:m?`grid`:`listbox`,"aria-multiselectable":_?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Oc(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});return g?w:(0,V.jsx)(Do,{elementsRef:c.state.listRef,labelsRef:f?void 0:c.state.labelsRef,children:w})}),vf=`â `;function yf(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function bf(){let e=wl(),t=B.useRef(null);return B.useEffect(()=>{if(oc)return;let n=t.current;if(n==null)return;let r=yf(n);if(r==null)return;
1let i=r.nodeValue??``,a=`${i}${vf}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var xf=B.createContext(void 0);function Sf(){let e=B.useContext(xf);if(e===void 0)throw Error(Po(20));return e}var Cf=B.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=_d(),a=Q(i,$.mounted),o=Q(i,$.forceMounted);return a||n||o?(0,V.jsx)(xf.Provider,{value:n,children:(0,V.jsx)(su,{ref:t,...r})}):null}),wf=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=le(e,t)||{};if(l==null)return{};let f=oe(u),p={x:n,y:r},m=ue(i),h=se(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Ce(k,j,A),N=!c.arrow&&Se(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),Tf=(e,t)=>({...wf(e),options:[e,t]}),Ef={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await ie().fn(e)).data?.referenceHidden||a}}}},Df={sideX:`left`,sideY:`top`};function Of(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function kf(e,t,n){let{rects:r,placement:i}=e;return{side:Of(t,ce(i),n),align:Se(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Af(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=B.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=q(D),k=D?O:t,A=gl(t),j=gl(h),M=Mo()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,F=c,L=+(r===`bottom`),te=+(r===`top`),ie=+(r===`right`),R=+(r===`left`);typeof F==`number`?F={top:F+L,right:F+R,bottom:F+te,left:F+ie}:F&&={top:(F.top||0)+L,right:(F.right||0)+R,bottom:(F.bottom||0)+te,left:(F.left||0)+ie};let oe={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:F},se=B.useRef(null),le=gl(i),ue=gl(o),de=typeof i==`function`?0:i,fe=typeof o==`function`?0:o,z=[];f&&z.push(f),z.push(I(e=>{let t=kf(e,r,M),n=typeof le.current==`function`?le.current(t):le.current,i=typeof ue.current==`function`?ue.current(t):ue.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[de,fe,M,r]));let pe=T===`none`&&w!==`shift`,me=!pe&&(l||_||w===`shift`),he=w===`none`?null:ne({...oe,padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),_e=pe?null:re(e=>{let t=Kc(e.elements.floating).documentElement;return{...oe,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:me,limiter:l||_?void 0:ee(e=>{if(!se.current)return{};let{width:t,height:n}=se.current.getBoundingClientRect(),r=ge(ce(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})}},[oe,l,_,F,T]);w===`shift`||T===`shift`||a===`center`?z.push(_e,he):z.push(he,_e),z.push(ae({...oe,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=ye(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Tf(e=>({element:se.current||Kc(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=ce(a),l=ge(c),u=se.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(kf(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,me&&l===`y`&&b?S:x),{}}},Ef,y),J(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let be=B.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:xe,elements:Ce,x:we,y:Te,middlewareData:Ee,update:De,placement:Oe,context:ke,isPositioned:Ae,floatingStyles:je}=Hu({rootContext:m,open:p?h:void 0,placement:P,middleware:z,strategy:n,whileElementsMounted:p?void 0:(...e)=>ve(...e,be),nodeId:v,externalTree:x}),{sideX:Me,sideY:Ne}=Ee.adaptiveOrigin||Df,Pe=Ae?n:`fixed`,Fe=B.useMemo(()=>{let e=y?{position:Pe,[Me]:we,[Ne]:Te}:{position:Pe,...je};return Ae||(e.opacity=0),e},[y,Pe,Me,we,Ne,Te,je,Ae]),Ie=B.useRef(null);J(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(jf(t)?t.current:t)||null;n!==Ie.current&&(xe.setPositionReference(n),Ie.current=n)},[h,xe,k,A]),B.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&jf(e)&&e.current!==Ie.current&&(xe.setPositionReference(e.current),Ie.current=e.current)},[h,xe,k,A]),B.useEffect(()=>{if(p&&h&&Ce.domReference&&Ce.floating)return ve(Ce.domReference,Ce.floating,De,be)},[p,h,Ce,De,be]);let Le=ce(Oe),Re=Of(r,Le,M),ze=Se(Oe)||`center`,Be=!!Ee.hide?.referenceHidden;J(()=>{b&&h&&Ae&&C(Le)},[b,h,Ae,Le]);let V=B.useMemo(()=>
1({position:`absolute`,top:Ee.arrow?.y,left:Ee.arrow?.x}),[Ee.arrow]),H=Ee.arrow?.centerOffset!==0;return B.useMemo(()=>({positionerStyles:Fe,arrowStyles:V,arrowRef:se,arrowUncentered:H,side:Re,align:ze,physicalSide:Le,anchorHidden:Be,refs:xe,context:ke,isPositioned:Ae,update:De}),[Fe,V,se,H,Re,ze,Le,Be,xe,ke,Ae,De])}function jf(e){return e!=null&&`current`in e}function Mf(e){return e===`starting`?eu:qo}function Nf(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),fs(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Mf(r),i],stateAttributesMapping:od})}var Pf=20;function Ff(e,t,n,r){let[i,a]=B.useState(!1);J(()=>{if(!e||!t||n==null){a(!1);return}let r=Kc(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Pf)},[e,t,n]),Nl(e&&(!t||i),r)}var If=B.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=tu,style:g,..._}=e,v=_d(),{filteredItems:y}=yd(),b=vd(),x=Sf(),S=Q(v,$.modal),C=Q(v,$.open),w=Q(v,$.mounted),T=Q(v,$.openMethod),E=Q(v,$.positionerElement),D=Q(v,$.triggerElement),O=Q(v,$.inputElement),k=Q(v,$.inputGroupElement),A=Q(v,$.inputInsidePopup),j=Q(v,$.transitionStatus),M=y.length===0,N=Af({anchor:i??(A?D:k??O),floatingRootContext:b,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:h,lazyFlip:!0});Ff(C&&S,T===`touch`,E,D);let P={open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:M};J(()=>{v.set(`popupSide`,N.side)},[v,N.side]);let F=q(e=>{v.set(`positionerElement`,e)}),I=Nf(e,P,{styles:N.positionerStyles,transitionStatus:j,props:_,refs:[t,F],hidden:!w,inert:!C});return(0,V.jsxs)(cf.Provider,{value:N,children:[w&&S&&(0,V.jsx)(cd,{inert:sd(!C),cutout:k??O??D}),I]})}),Lf={...od,...Js},Rf=B.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_d(),l=lf(),u=vd(),{filteredItems:d}=yd(),f=Q(c,$.mounted),p=Q(c,$.open),m=Q(c,$.openMethod),h=Q(c,$.transitionStatus),g=Q(c,$.inputInsidePopup),_=Q(c,$.inputElement),v=Q(c,$.modal),y=d.length===0;bl({open:p,ref:c.state.popupRef,onComplete(){p&&c.state.onOpenChangeComplete(!0)}});let b=fs(`div`,e,{state:{open:p,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:y},ref:[t,c.state.popupRef],props:[{role:g?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=bc(e.nativeEvent);m!==`touch`&&(X(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},Mf(h),s],stateAttributesMapping:Lf}),x=a===void 0?g?e=>e===`touch`?c.state.popupRef.current:_:!1:a,S;S=o??(g?void 0:!1);let C=!g||v;return(0,V.jsx)(xu,{context:u,disabled:!f,modal:C,openInteractionType:m,initialFocus:x,returnFocus:S,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,V.jsxs)(B.Fragment,{children:[b,C&&(0,V.jsx)(uf,{ref:c.state.endDismissRef})]})})}),zf=B.createContext(void 0);function Bf(){let e=B.useContext(zf);if(!e)throw Error(Po(19));return e}var Vf=B.createContext(!1);function Hf(){return B.useContext(Vf)}var Uf=B.memo(B.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,index:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=B.useRef(!1),d=B.useRef(null),f=Ws({index:o,textRef:d,indexGuessBehavior:Us.GuessFromOrder}),p=_d(),m=Hf(),{flatFilteredItems:h,hasItems:g}=yd(),_=Q(p,$.open),v=Q(p,$.selectionMode),y=Q(p,$.readOnly),b=Q(p,$.virtualized),x=Q(p,$.isItemEqualToValue),S=v!==`none`,C=o??(b?wd(h,a,x):f.index),w=f.index!==-1,T=Q(p,$.id),E=Q(p,$.isActive,C),D=Q(p,$.isSelected,a),O=Q(p,$.itemProps),k=B.useRef(null),A=T!=null&&w?`${T}-${C}`:void 0,j=D&&S;J(()=>{if(!(w&&(b||o!=null)))return;let e=p.state.listRef.current;return e[C]=k.current,()=>{delete e[C]}},[w,b,C,o,p]),J(()=>{if(!w||g)return;let e=p.state.valuesRef.current;return e[C]=a,v!==`none`&&p.state.allValuesRef.current.push(a),()=>{delete e[C]}},[w,g,C,a,p,v]),J(()=>{if(!_){u.current=!1;return}if(!w||g)return;let e=p.state.selectedValue;Sd(a,Array.isArray(e)?e[e.length-1]:e,x)&&p.set(`selectedIndex`,C)},[w,g,_,p,C,a,x]);let{getButtonProps:M,buttonRef:N}=Qs({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),P={disabled:s,selected:j,highlighted:E};function F(e){function t(){p.state.handleSelection(e,a)}p.state.submitOnItemClick?(an.flushSync(t),p.state.requestSubmit()):t()}let I={id:A,role:m?`gridcell`:`option`,"aria-selected":S?j:void 0,tabIndex:void 0,onPointerDownCapture(e){u.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){s||y||F(e.nativeEvent)},onMouseUp(e){let t=u.current;u.current=!1,!(s||y||e.button!==0||t||!E)&&F(e.nativeEvent)}},L=fs(`div`,e,{ref:[N,t,f.ref,k],state:P,props:[O,I,l,M]}),ee=B.useMemo(()=>({selected:j,textRef:d}),[j,d]);return(0,V.jsx)(zf.Provider,{value:ee,children:L})})),Wf=B.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=yd(),c=_d(),l=bf(),u=s.length===0?a:null;return fs(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});function Gf(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,V.jsx)($d,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Kf=B.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=Bf();return n||r?(0,V.jsx)(qf,{...e,ref:t}):null}),qf=B.memo(B.forwardRef((e,t)=>
1{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Bf(),c=B.useRef(null),{transitionStatus:l,setMounted:u}=Hs(s),d=fs(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`âï¸`},o],stateAttributesMapping:Js});return bl({open:s,ref:c,onComplete(){s||u(!1)}}),d})),Jf=Gf;function Yf({className:e,children:t,...n}){return(0,V.jsxs)(af,{"data-slot":`combobox-trigger`,className:d(`[&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,V.jsx)(p,{"data-slot":`combobox-trigger-icon`,className:`pointer-events-none size-4 text-muted-foreground`})]})}function Xf({className:e,...t}){return(0,V.jsx)(pf,{"data-slot":`combobox-clear`,render:(0,V.jsx)(Ie,{variant:`ghost`,size:`icon-xs`}),className:d(e),...t,children:(0,V.jsx)(i,{className:`pointer-events-none`})})}function Zf({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:i=!1,...a}){return(0,V.jsxs)(Le,{className:d(`w-auto`,e),children:[(0,V.jsx)(df,{render:(0,V.jsx)(Pe,{disabled:n}),...a}),(0,V.jsxs)(Fe,{align:`inline-end`,children:[r&&(0,V.jsx)(Ie,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:n,children:(0,V.jsx)(Yf,{})}),i&&(0,V.jsx)(Xf,{disabled:n})]}),t]})}function Qf({className:e,side:t=`bottom`,sideOffset:n=6,align:r=`start`,alignOffset:i=0,anchor:a,...o}){return(0,V.jsx)(Cf,{children:(0,V.jsx)(If,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:a,className:`isolate z-50`,children:(0,V.jsx)(Rf,{"data-slot":`combobox-content`,"data-chips":!!a,className:d(`group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o})})})}function $f({className:e,...t}){return(0,V.jsx)(_f,{"data-slot":`combobox-list`,className:d(`max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0`,e),...t})}function ep({className:e,children:t,...n}){return(0,V.jsxs)(Uf,{"data-slot":`combobox-item`,className:d(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,V.jsx)(Kf,{"data-slot":`combobox-item-indicator`,render:(0,V.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,V.jsx)(f,{className:`pointer-events-none size-4 pointer-coarse:size-5`})})]})}function tp({className:e,...t}){return(0,V.jsx)(Wf,{"data-slot":`combobox-empty`,className:d(`hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex`,e),...t})}function np({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=B.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,V.jsxs)(ft,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:d(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...a,children:[(0,V.jsx)(yt,{"data-slot":`slider-track`,className:d(`relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,V.jsx)(xt,{"data-slot":`slider-range`,className:d(`absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,V.jsx)(kt,{"data-slot":`slider-thumb`,className:`block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}function rp({className:e,size:t=`default`,...n}){return(0,V.jsx)(Zt,{"data-slot":`switch`,"data-size":t,className:d(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,V.jsx)($t,{"data-slot":`switch-thumb`,className:d(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dar
1k:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}function ip(e){if(e instanceof Date)return e;if(typeof e==`string`){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}}function ap(e){let t=e=>e.toString().padStart(2,`0`);return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}function op({getValue:e,isDisabled:t}){let{localization:n}=o(),[r,i]=(0,B.useState)(!1);async function a(){let t=e();if(t)try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1500)}catch(e){Oe.error(e instanceof Error?e.message:String(e))}}return(0,V.jsx)(Ie,{"aria-label":n.settings.copyToClipboard,title:n.settings.copyToClipboard,onClick:a,disabled:t,children:r?(0,V.jsx)(f,{}):(0,V.jsx)(T,{})})}function sp({name:e,field:t,isPending:n}){let r=a(t),i=(0,B.useRef)(null);if(t.render)return(0,V.jsx)(V.Fragment,{children:t.render({name:e,field:t,isPending:n})});if(r===`hidden`)return(0,V.jsx)(`input`,{type:`hidden`,name:e,value:t.defaultValue==null?``:t.defaultValue instanceof Date?t.defaultValue.toISOString():String(t.defaultValue)});if(r===`textarea`)return(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsx)(je,{id:e,name:e,defaultValue:t.defaultValue==null?void 0:String(t.defaultValue),placeholder:t.placeholder,required:t.required,readOnly:t.readOnly,disabled:n}),(0,V.jsx)(Te,{})]});if(r===`number`){let r=t.formatOptions?.maximumFractionDigits;return(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsx)(Ne,{id:e,name:e,type:`number`,inputMode:r?`decimal`:`numeric`,min:t.min,max:t.max,step:t.step??(r?1/10**r:void 0),defaultValue:t.defaultValue==null?void 0:typeof t.defaultValue==`number`?t.defaultValue:String(t.defaultValue),placeholder:t.placeholder,required:t.required,readOnly:t.readOnly,disabled:n}),(0,V.jsx)(Te,{})]})}if(r===`slider`)return(0,V.jsx)(cp,{name:e,field:t,isPending:n});if(r===`switch`)return(0,V.jsxs)(De,{orientation:`horizontal`,children:[(0,V.jsx)(rp,{id:e,name:e,defaultChecked:t.defaultValue===!0||t.defaultValue===`true`,disabled:n||t.readOnly}),(0,V.jsx)(ke,{children:(0,V.jsx)(Ae,{htmlFor:e,children:t.label})})]});if(r===`checkbox`)return(0,V.jsxs)(De,{orientation:`horizontal`,children:[(0,V.jsx)(cn,{id:e,name:e,defaultChecked:t.defaultValue===!0||t.defaultValue===`true`,required:t.required,disabled:n||t.readOnly}),(0,V.jsx)(ke,{children:(0,V.jsx)(Ae,{htmlFor:e,children:t.label})})]});if(r===`select`)return(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsxs)(w,{name:e,defaultValue:t.defaultValue==null?void 0:String(t.defaultValue),required:t.required,disabled:n||t.readOnly,children:[(0,V.jsx)(v,{id:e,className:`w-full`,children:(0,V.jsx)(g,{placeholder:t.placeholder})}),(0,V.jsx)(b,{children:t.options?.map(e=>(0,V.jsx)(S,{value:e.value,children:e.label},e.value))})]}),(0,V.jsx)(Te,{})]});if(r===`combobox`)return(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsxs)(Jf,{items:t.options??[],name:e,defaultValue:t.defaultValue==null?void 0:String(t.defaultValue),required:t.required,disabled:n||t.readOnly,children:[(0,V.jsx)(Zf,{placeholder:t.placeholder,id:e}),(0,V.jsxs)(Qf,{children:[(0,V.jsx)(tp,{children:`No items found.`}),(0,V.jsx)($f,{children:e=>(0,V.jsx)(ep,{value:e,children:e.label},e.value)})]})]}),(0,V.jsx)(Te,{})]});if(r===`date`||r===`datetime`)return(0,V.jsx)(lp,{name:e,field:t,isPending:n});let o=t.prefix!=null,s=t.suffix!=null||t.copyable,c=t.type===`number`,l=t.formatOptions?.maximumFractionDigits,u=c?`number`:void 0,d=c?l?`decimal`:`numeric`:void 0,f=l?1/10**l:void 0;return o||s?(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsxs)(Le,{children:[o&&(0,V.jsx)(Fe,{align:`inline-start`,children:t.prefix}),(0,V.jsx)(Pe,{ref:i,id:e,name:e,type:u,inputMode:d,step:f,defaultValue:t.defaultValue==null?void 0:String(t.defaultValue),placeholder:t.placeholder,required:t.required,readOnly:t.readOnly,disabled:n}),t.copyable?(0,V.jsx)(Fe,{align:`inline-end`,children:(0,V.jsx)(op,{getValue:()=>i.current?.value,isDisabled:n})}):t.suffix!=null&&(0,V.jsx)(Fe,{align:`inline-end`,children:t.suffix})]}),(0,V.jsx)(Te,{})]}):(0,V.jsxs)(De,{children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsx)(Ne,{id:e,name:e,type:u,inputMode:d,step:f,defaultValue:t.defaultValue==null?void 0:String(t.defaultValue),placeholder:t.placeholder,required:t.required,readOnly:t.readOnly,disabled:n}),(0,V.jsx)(Te,{})]})}function cp({name:e,field:t,isPending:n}){let r=t.formatOptions?.maximumFractionDigits,i=t.min??0,a=t.max??100,o=t.step??(r?1/10**r:1),[s,c]=(0,B.useState)(typeof t.defaultValue==`number`?t.defaultValue:t.defaultValue==null?i:Number(t.defaultValue)),l=new Intl.NumberFormat(void 0,t.formatOptions);return(0,V.jsxs)(De,{children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(Ee,{htmlFor:e,children:t.label}),(0,V.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:l.format(s)})]}),(0,V.jsx)(np,{id:e,name:e,value:[s],onValueChange:([e])=>c(e??i),min:i,max:a,step:o,disabled:n||t.readOnly}),(0,V.jsx)(Te,{})]})}
1function lp({name:e,field:t,isPending:n}){let{localization:r}=o(),i=a(t)===`datetime`,[s,c]=(0,B.useState)(ip(t.defaultValue)),[l,u]=(0,B.useState)(i&&s?ap(s):``),[f,m]=(0,B.useState)(!1),[h,g]=(0,B.useState)(),v=``;if(s)if(i&&l&&l.trim()!==``){let[e=`0`,t=`0`,n=`0`]=l.split(`:`),r=new Date(s);r.setHours(Number(e),Number(t),Number(n),0),v=r.toISOString()}else{let e=new Date(s);e.setHours(0,0,0,0),v=e.toISOString()}return(0,V.jsxs)(De,{"data-invalid":!!h,children:[(0,V.jsx)(Ee,{htmlFor:`${e}-date`,children:t.label}),(0,V.jsxs)(`div`,{className:`relative flex gap-2`,children:[(0,V.jsx)(`input`,{type:`text`,name:e,value:v,onChange:()=>{},required:t.required,tabIndex:-1,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 h-full w-full opacity-0`,onInvalid:e=>{e.preventDefault(),g(e.target.validationMessage)}}),(0,V.jsxs)(x,{open:f,onOpenChange:m,children:[(0,V.jsx)(_,{asChild:!0,children:(0,V.jsxs)(O,{type:`button`,variant:`outline`,id:`${e}-date`,"data-empty":!s,"aria-invalid":!!h,disabled:n||t.readOnly,className:d(`flex-1 justify-between font-normal`,`data-[empty=true]:text-muted-foreground`),children:[s?kr(s,`PPP`):(0,V.jsx)(`span`,{children:t.placeholder}),i?(0,V.jsx)(p,{}):(0,V.jsx)(Re,{})]})}),(0,V.jsx)(C,{className:`w-auto overflow-hidden p-0`,align:`start`,children:(0,V.jsx)(ho,{mode:`single`,selected:s,defaultMonth:s,captionLayout:`dropdown`,onSelect:e=>{c(e),e&&g(void 0),i||m(!1)}})})]}),i&&(0,V.jsxs)(De,{className:`w-32`,children:[(0,V.jsx)(Ee,{htmlFor:`${e}-time`,className:`sr-only`,children:r.settings.time}),(0,V.jsx)(Ne,{type:`time`,id:`${e}-time`,step:`1`,value:l,onChange:e=>u(e.target.value),disabled:n||t.readOnly,className:`appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none`})]})]}),(0,V.jsx)(Te,{children:h})]})}export{ze as i,cn as n,Be as r,sp as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.